/* ==============================================================================
   iSolution India — ActionGate: Progressive Social & Video Content Locker
   ============================================================================== */

/* Modal Backdrop */
.ag-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 14, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.ag-backdrop.ag-visible {
  opacity: 1;
  visibility: visible;
}

html.light .ag-backdrop {
  background: rgba(15, 23, 42, 0.65);
}

/* Modal Dialog Box */
.ag-modal {
  background: rgba(13, 20, 30, 0.98);
  border: 1px solid rgba(5, 195, 221, 0.3);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8), 0 0 32px rgba(5, 195, 221, 0.2);
  padding: 32px 28px 24px 28px;
  position: relative;
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-pure, #ffffff);
  font-family: var(--font-body, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
  box-sizing: border-box;
}

.ag-backdrop.ag-visible .ag-modal {
  transform: translateY(0) scale(1);
}

html.light .ag-modal {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(2, 132, 162, 0.25);
  box-shadow: 0 24px 60px -10px rgba(15, 23, 42, 0.22), 0 4px 20px rgba(2, 132, 162, 0.12);
  color: #0f172a;
}

/* Close / Skip button */
.ag-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.ag-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

html.light .ag-close-btn {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #64748b;
}

/* Header Badge & Steps */
.ag-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(5, 195, 221, 0.15);
  color: var(--primary, #05c3dd);
  border: 1px solid rgba(5, 195, 221, 0.3);
  margin-bottom: 12px;
}

html.light .ag-step-badge {
  background: rgba(2, 132, 162, 0.1);
  color: #0284a2;
  border-color: rgba(2, 132, 162, 0.25);
}

.ag-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(5, 195, 221, 0.12);
  color: var(--primary, #05c3dd);
  border: 1px solid rgba(5, 195, 221, 0.25);
}

.ag-icon-google {
  background: rgba(234, 67, 53, 0.12);
  color: #ea4335;
  border-color: rgba(234, 67, 53, 0.25);
}

.ag-icon-youtube {
  background: rgba(255, 0, 0, 0.12);
  color: #ff0000;
  border-color: rgba(255, 0, 0, 0.25);
}

.ag-icon-instagram {
  background: rgba(225, 48, 108, 0.12);
  color: #e1306c;
  border-color: rgba(225, 48, 108, 0.25);
}

.ag-icon-x {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

html.light .ag-icon-x {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
}

.ag-icon-video {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
}

.ag-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.3;
}

.ag-desc {
  font-size: 0.925rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.55;
  margin: 0 0 20px;
}

html.light .ag-desc {
  color: #64748b;
}

/* Progress Tracker Pills */
.ag-progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.ag-step-dot {
  width: 28px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease;
}

html.light .ag-step-dot {
  background: rgba(15, 23, 42, 0.1);
}

.ag-step-dot.ag-done {
  background: #10b981;
}

.ag-step-dot.ag-active {
  background: var(--primary, #05c3dd);
}

html.light .ag-step-dot.ag-active {
  background: #0284a2;
}

/* Action Primary Button */
.ag-action-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--primary, #05c3dd);
  color: #000000;
  box-shadow: 0 8px 24px -4px rgba(5, 195, 221, 0.4);
}

.ag-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(5, 195, 221, 0.55);
}

html.light .ag-action-btn {
  background: #0284a2;
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(2, 132, 162, 0.35);
}

html.light .ag-action-btn:hover {
  background: #0369a1;
}

/* Secondary Confirm / Next button */
.ag-confirm-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.925rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ag-confirm-btn:hover {
  background: #10b981;
  color: #ffffff;
}

/* Video Stage Wrapper */
.ag-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ag-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.ag-timer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

html.light .ag-timer-box {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.ag-timer-bar {
  height: 4px;
  background: #10b981;
  border-radius: 9999px;
  transition: width 1s linear;
}

/* Skip link */
.ag-skip-wrap {
  margin-top: 14px;
}

.ag-skip-link {
  font-size: 0.8125rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.ag-skip-link:hover {
  color: var(--text-pure, #ffffff);
}

html.light .ag-skip-link:hover {
  color: #0f172a;
}
