/* ==========================================================================
   CreatorLabs Theme for Basic to Advance Excel + AI Masterclass
   Design: Exact copy of CreatorLabs (fatafatenglish.creatorlabs.in/add-to-cart)
   Functionality: Direct Zero-Step Cashfree Checkout Modal + Pre-fill
   ========================================================================== */

@import url('./creatorlabs.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-gray-bg: #F9FAFB;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-gray-bg);
  color: #111827;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Rounded-xs helper */
.rounded-xs {
  border-radius: 2px;
}

/* ==========================================================================
   CASHFREE DROP-IN CHECKOUT IN-PAGE MODAL
   ========================================================================== */
.cashfree-dropin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cashfree-dropin-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cashfree-dropin-container {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  height: 90vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.cashfree-dropin-overlay.is-open .cashfree-dropin-container {
  transform: scale(1);
}

.cashfree-dropin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #006633; /* Cashfree Brand Green */
  color: #FFFFFF;
  flex-shrink: 0;
}

.dropin-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropin-brand-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dropin-attendee-tag {
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  color: #FFFFFF;
  display: none;
  align-items: center;
  gap: 5px;
}

.dropin-price-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.dropin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-dropin-action {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease;
  text-decoration: none;
}

.btn-dropin-action:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

.cashfree-dropin-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #F8F9FA;
}

.dropin-iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #FFFFFF;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.dropin-iframe-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-pulse-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #10B981;
  border-top-color: transparent;
  animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
  to { transform: rotate(360deg); }
}

.loader-main-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.loader-sub-text {
  font-size: 0.78rem;
  color: #64748B;
}

.cashfree-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ==========================================================================
   STATIC POPUP MODALS (CURRICULUM & TERMS)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-box-large {
  max-width: 640px;
}

.modal-backdrop.is-open .modal-box {
  transform: translateY(0);
}

.btn-close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #F1F5F9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #64748B;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-close-modal:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.modal-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.details-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
}

.details-subtitle {
  font-size: 0.8rem;
  color: #6B7280;
  margin: 0 0 16px 0;
}

.detail-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
}

.detail-item:last-child {
  border-bottom: none;
}

.item-badge {
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.75rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-item strong {
  display: block;
  font-size: 0.875rem;
  color: #111827;
}

.detail-item p {
  font-size: 0.78rem;
  color: #4B5563;
  margin: 2px 0 0 0;
}

.bonus-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}

.bonus-box h4 {
  color: #166534;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.bonus-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: #15803D;
}

.bonus-box li {
  margin-bottom: 4px;
}

.modal-action-row {
  margin-top: 16px;
}

.btn-modal-action {
  width: 100%;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-action:hover {
  background: #1D4ED8;
}

.terms-scroll {
  font-size: 0.8rem;
  color: #4B5563;
  line-height: 1.5;
  margin-top: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 8px;
}

.terms-scroll p {
  margin-bottom: 10px;
}

/* ==========================================================================
   RESPONSIVE TWEAKS FOR MOBILE
   ========================================================================== */
@media (max-width: 640px) {
  .cashfree-dropin-container {
    height: 94vh;
    max-height: 94vh;
    border-radius: 12px;
  }
  .cashfree-dropin-header {
    padding: 10px 14px;
  }
  .dropin-brand-title {
    font-size: 0.825rem;
  }
}
