/* ------------------------------------------------------------- */
/* PRICING GRIDS, MODALS, AUTH WIZARD & CHECKOUT STYLES          */
/* ------------------------------------------------------------- */

/* Tier Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s ease;
}

.plan-card.featured {
  border: 2px solid var(--brand-blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .plan-card.featured {
  border-color: var(--brand-blue);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 1.25rem;
  background: var(--brand-blue);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.5rem 0 1rem 0;
}

.plan-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.plan-features li {
  font-size: 0.85rem;
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: min(90vh, calc(100dvh - 2rem));
  margin: auto;
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.96) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.auth-tab-switch {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--brand-blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg-input);
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover, 
.form-input:-webkit-autofill:focus, 
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--bg-input, #FFFFFF) inset !important;
  -webkit-text-fill-color: var(--text-main, #0F172A) !important;
  transition: background-color 5000s ease-in-out 0s;
}

[data-theme="dark"] .form-input:-webkit-autofill,
[data-theme="dark"] .form-input:-webkit-autofill:hover, 
[data-theme="dark"] .form-input:-webkit-autofill:focus, 
[data-theme="dark"] .form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #1E293B inset !important;
  -webkit-text-fill-color: #F8FAFC !important;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.step-dot.active {
  color: var(--brand-blue);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.step-dot.active .step-num {
  background: var(--brand-blue);
  color: #FFFFFF;
}

/* Modal Plan Selection Cards */
.tier-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tier-select-option {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
  color: var(--text-main);
}

.tier-select-option:hover {
  border-color: var(--brand-blue);
  background: var(--bg-subtle);
}

.tier-select-option.selected {
  border-color: var(--brand-blue);
  background: var(--badge-blue-bg);
}

/* Promo Code Input Bar */
.promo-box-container {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.promo-input-group {
  display: flex;
  gap: 0.5rem;
}

.promo-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--bg-input);
  color: var(--text-main);
}

.promo-tag-applied {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #DCFCE7;
  color: var(--status-green);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  border: 1px solid #BBF7D0;
}

[data-theme="dark"] .promo-tag-applied {
  background: rgba(34, 197, 94, 0.18);
  color: #86EFAC;
  border-color: rgba(34, 197, 94, 0.35);
}

.price-summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.price-row.total {
  border-top: 1px solid var(--border-color);
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pay-method-btn {
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.pay-method-btn.active {
  border-color: var(--brand-blue);
  background: var(--badge-blue-bg);
  color: var(--brand-blue);
}

/* ------------------------------------------------------------- */
/* SITE STANDARD CUSTOM CONFIRMATION & ALERT DIALOG MODALS       */
/* ------------------------------------------------------------- */
.custom-dialog-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-dialog-backdrop.open {
  display: flex !important;
}

.custom-dialog-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog-header {
  padding: 1.5rem 1.5rem 0.75rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.custom-dialog-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.custom-dialog-icon-wrap.warning {
  background: #FEF3C7;
  border: 1.5px solid #FDE68A;
  color: #D97706;
}

[data-theme="dark"] .custom-dialog-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

.custom-dialog-icon-wrap.info,
.custom-dialog-icon-wrap.primary {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: var(--brand-blue);
}

[data-theme="dark"] .custom-dialog-icon-wrap.info,
[data-theme="dark"] .custom-dialog-icon-wrap.primary {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93C5FD;
}

.custom-dialog-icon-wrap.danger {
  background: #FEE2E2;
  border: 1.5px solid #FECACA;
  color: #DC2626;
}

[data-theme="dark"] .custom-dialog-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.custom-dialog-header-text {
  flex: 1;
  min-width: 0;
}

.custom-dialog-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.custom-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.2px;
}

.custom-dialog-close {
  background: none;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  border-radius: 4px;
}

.custom-dialog-close:hover {
  color: var(--text-main);
}

.custom-dialog-message {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.custom-dialog-preview-box {
  margin: 0.5rem 1.5rem 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.custom-dialog-footer {
  padding: 1rem 1.5rem 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.custom-dialog-btn-cancel {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.custom-dialog-btn-cancel:hover {
  background: var(--border-color);
}

.custom-dialog-btn-confirm {
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  border: 1.5px solid var(--brand-blue);
  background: var(--brand-blue);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.custom-dialog-btn-confirm:hover {
  background: var(--brand-blue-hover);
  border-color: var(--brand-blue-hover);
}

.custom-dialog-btn-confirm.danger {
  background: var(--status-red);
  border-color: var(--status-red);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.custom-dialog-btn-confirm.danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}

/* First-Time Welcome Modal & Signin-Signup Prompt Styles */
.welcome-modal-dialog {
  max-width: 520px;
  width: 100%;
  margin: auto;
  border: 1px solid var(--border-color);
  max-height: min(92vh, calc(100dvh - 2rem));
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.welcome-modal-dialog::-webkit-scrollbar {
  width: 5px;
}

.welcome-modal-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.welcome-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.25);
  border-radius: 4px;
}

.welcome-modal-dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}

.signin-signup-prompt {
  transition: all 0.2s ease;
}

.signin-signup-prompt:hover {
  border-color: var(--brand-blue);
}

[data-theme="dark"] .signin-signup-prompt {
  background: rgba(30, 41, 59, 0.7);
  border-color: #334155;
}

[data-theme="dark"] #welcome-modal-backdrop .welcome-modal-dialog {
  background: var(--bg-card);
  border-color: #334155;
}

/* SMS OTP Login Method Tabs & Controls */
.signin-method-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.15rem;
  background: var(--bg-card-subtle, #F1F5F9);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #E2E8F0);
}

.signin-method-tab {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text-muted, #64748B);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.signin-method-tab.active {
  background: var(--bg-card, #FFFFFF);
  color: var(--text-main, #0F172A);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .signin-method-tabs {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .signin-method-tab {
  color: #94A3B8;
}

[data-theme="dark"] .signin-method-tab.active {
  background: #08261E;
  color: #A7F3D0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.sms-country-code-pill {
  padding: 0.65rem 0.85rem;
  background: var(--bg-card-subtle, #F1F5F9);
  border: 1px solid var(--border-color, #CBD5E1);
  border-radius: 8px;
  font-weight: 700;
  color: var(--text-main, #1E293B);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

[data-theme="dark"] .sms-country-code-pill {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #F8FAFC;
}

.sms-otp-target-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-main, #1E293B);
}

[data-theme="dark"] .sms-otp-target-banner {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #E2E8F0;
}


