/* ==========================================================================
   iTradeAIMS Portal Theme - Option 1: Clean Unboxed 2-Column Checkout
   - Header sticks to top
   - Middle section center-aligned
   - Footer sticks to bottom (NO dots, clean mobile stack)
   - Zero desktop scroll
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Layout Root & Viewport Centering
   -------------------------------------------------------------------------- */
html, body {
  background-color: #000000 !important;
  color: #f8fafc !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  height: 100%;
}

.portal-checkout-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000000 !important;
  color: #f8fafc;
  font-family: var(--font-primary, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  margin: 0;
  padding: 0;
}

.portal-checkout-layout #portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.opt1-checkout-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Header: Sticks to Top
   -------------------------------------------------------------------------- */
.opt1-header {
  width: 100%;
  background: #000000;
  border-bottom: 1px solid #16171f;
  padding: 18px 36px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
}

.opt1-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.opt1-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.opt1-brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.opt1-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.775rem;
  font-weight: 500;
  color: #8b92a3;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #1a1a24;
}

.opt1-lock-icon {
  color: #10b981;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. Middle Section: In Middle, Center-Aligned Vertically & Horizontally
   -------------------------------------------------------------------------- */
.opt1-main-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 36px 24px;
  box-sizing: border-box;
}

.opt1-main-inner {
  width: 100%;
  max-width: 960px;
}

.opt1-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;
}

/* --------------------------------------------------------------------------
   3. Left Column: Product Summary (Price Shown ONCE)
   -------------------------------------------------------------------------- */
.opt1-left-col {
  display: flex;
  flex-direction: column;
}

.opt1-summary-box {
  display: flex;
  flex-direction: column;
}

.opt1-product-heading {
  margin-bottom: 24px;
}

.opt1-product-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.opt1-product-subtitle {
  font-size: 0.775rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

/* Pricing Area - Simple & Clean without extra borders or pills */
.opt1-pricing-area {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.opt1-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #8b92a3;
  padding: 8px 0;
}

.opt1-price-label {
  color: #8b92a3;
}

.opt1-price-val {
  font-weight: 500;
  color: #cbd5e1;
}

.opt1-saved-val {
  color: #10b981 !important;
  font-weight: 600;
}

/* Single Total Line - ONLY border is directly after Total due today */
.opt1-total-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 0 20px 0;
  border-top: none !important;
  border-bottom: 1px solid #16171f !important;
}

.opt1-total-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
}

.opt1-total-val {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Promo Code Box */
.opt1-promo-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt1-promo-toggle {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color var(--transition-fast, 0.15s ease);
}

.opt1-promo-toggle:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.opt1-promo-fields {
  display: flex;
  gap: 8px;
}

.opt1-promo-input {
  flex: 1;
  background: #090a0e;
  border: 1px solid #1f212a;
  border-radius: 6px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.825rem;
  outline: none;
  text-transform: uppercase;
  transition: border-color var(--transition-fast, 0.15s ease);
}

.opt1-promo-input:focus {
  border-color: #3b82f6;
}

.opt1-promo-btn {
  background: #14161f;
  color: #e2e8f0;
  border: 1px solid #232533;
  border-radius: 6px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast, 0.15s ease);
}

.opt1-promo-btn:hover {
  background: #1c1e2b;
  color: #ffffff;
}

.opt1-promo-msg {
  font-size: 0.775rem;
  padding: 4px 8px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   4. Right Column: Personal Details & Form
   -------------------------------------------------------------------------- */
.opt1-right-col {
  display: flex;
  flex-direction: column;
}

.opt1-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.opt1-form-header {
  margin-bottom: 2px;
}

.opt1-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Form Inputs */
.opt1-fields-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt1-row-2 {
  display: flex;
  gap: 12px;
}

.opt1-row-2 > .opt1-field {
  flex: 1;
  min-width: 0;
}

.opt1-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.opt1-label-input {
  font-size: 0.775rem;
  font-weight: 500;
  color: #8b92a3;
}

.opt1-label-input .req {
  color: #f43f5e;
}

.opt1-input {
  background: #090a0e;
  border: 1px solid #1f212a;
  border-radius: 7px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}

.opt1-input::placeholder {
  color: #434857;
}

.opt1-input:hover {
  border-color: #2b2e3b;
}

.opt1-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.opt1-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.opt1-pwd-wrap .opt1-input {
  padding-right: 40px;
}

.opt1-pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast, 0.15s ease);
}

.opt1-pwd-toggle:hover {
  color: #ffffff;
}

/* Logged-In User Box */
.opt1-logged-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 12px 14px;
}

.opt1-logged-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.opt1-logged-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.opt1-logged-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.opt1-logged-email {
  font-size: 0.75rem;
  color: #8b92a3;
}

.opt1-logout-link {
  font-size: 0.775rem;
  font-weight: 600;
  color: #f43f5e;
  text-decoration: none;
}

.opt1-logout-link:hover {
  text-decoration: underline;
}

/* Compliance Text */
.opt1-compliance {
  font-size: 0.725rem;
  color: #64748b;
  line-height: 1.45;
  margin: 4px 0 6px 0;
}

.opt1-compliance a {
  color: #8b92a3;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast, 0.15s ease);
}

.opt1-compliance a:hover {
  color: #ffffff;
}

/* CTA Action Button */
.opt1-action-wrap {
  margin-top: 6px;
}

.opt1-submit-btn {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all var(--transition-fast, 0.15s ease);
}

.opt1-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.opt1-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.opt1-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.opt1-btn-arrow {
  transition: transform var(--transition-fast, 0.15s ease);
}

.opt1-submit-btn:hover:not(:disabled) .opt1-btn-arrow {
  transform: translateX(3px);
}

.opt1-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.775rem;
  color: #8b92a3;
  margin-top: 8px;
}

.opt1-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Alert Box */
.opt1-alert {
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.opt1-alert-error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.opt1-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* --------------------------------------------------------------------------
   5. Footer: Sticks to Bottom, NO DOTS, Clean Gap
   -------------------------------------------------------------------------- */
.opt1-footer {
  width: 100%;
  border-top: 1px solid #16171f;
  padding: 18px 36px;
  box-sizing: border-box;
  background: #000000;
  margin-top: auto;
}

.opt1-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.opt1-footer-stripe {
  display: flex;
  align-items: center;
}

.opt1-stripe-badge {
  height: 24px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition-fast, 0.15s ease);
}

.opt1-stripe-badge:hover {
  opacity: 1;
}

.opt1-footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.opt1-footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.775rem;
  font-weight: 500;
  transition: color var(--transition-fast, 0.15s ease);
}

.opt1-footer-links a:hover {
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   6. Mobile Responsive Adaptation
   - Logo on top, security badge below it small size
   - Middle content stacks
   - Footer: "Secured by Stripe" first, then the 3 links under it (NO dots)
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .portal-checkout-layout {
    justify-content: flex-start;
  }

  .opt1-checkout-root {
    min-height: auto;
  }

  /* Header: Logo top, badge below small size */
  .opt1-header {
    padding: 16px 20px;
    position: static;
  }

  .opt1-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .opt1-brand-logo {
    height: 24px;
  }

  .opt1-security-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    gap: 5px;
  }

  /* Middle: Clean stacking */
  .opt1-main-area {
    padding: 24px 16px 36px;
  }

  .opt1-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .opt1-left-col {
    order: -1;
  }

  /* Footer: "Secured by Stripe" on top, 3 links under it, NO dots */
  .opt1-footer {
    padding: 22px 16px;
    position: static;
  }

  .opt1-footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .opt1-footer-stripe {
    order: 1;
  }

  .opt1-footer-links {
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
  }

  .opt1-footer-links a {
    font-size: 0.75rem;
  }
}
