/**
 * Iron TV Shop Redesign — Checkout Page
 * Brand: Navy + Orange (matches irontvfrance.com)
 * Scope: body.itsr-checkout-page
 */

body.itsr-checkout-page {
  --c-navy-900: #0A1F44;
  --c-navy-800: #142E5C;
  --c-navy-50:  #EEF2FB;
  --c-orange-600: #E85A2C;
  --c-orange-500: #FF6B35;
  --c-orange-50:  #FFF1EB;
  --c-bg:        #FAFAFC;
  --c-border:    #E8ECF3;
  --c-text:      #0A1F44;
  --c-text-2:    #5A6B85;
  --c-text-3:    #8893A8;
  --c-success:   #10B981;
  --c-danger:    #EF4444;

  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  color: var(--c-text);
  background: var(--c-bg);
}

/* ════════════════════════════════════════════════════════════════
   CHECKOUT HEADER + STEP INDICATOR
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .itsr-checkout-header {
  margin-bottom: 32px;
}

body.itsr-checkout-page .itsr-checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 540px;
  margin: 0 auto 28px;
}

body.itsr-checkout-page .itsr-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.itsr-checkout-page .itsr-step .num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-border);
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s;
}
body.itsr-checkout-page .itsr-step .num svg {
  width: 18px;
  height: 18px;
}

body.itsr-checkout-page .itsr-step span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

body.itsr-checkout-page .itsr-step.done .num {
  background: var(--c-success);
  color: #fff;
}
body.itsr-checkout-page .itsr-step.done span {
  color: var(--c-success);
}

body.itsr-checkout-page .itsr-step.active .num {
  background: linear-gradient(135deg, var(--c-orange-500), var(--c-orange-600));
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 90, 44, 0.4);
}
body.itsr-checkout-page .itsr-step.active span {
  color: var(--c-orange-600);
}

body.itsr-checkout-page .itsr-step-bar {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  margin: 0 8px;
  margin-bottom: 28px; /* align with circles */
  border-radius: 1px;
  max-width: 70px;
}
body.itsr-checkout-page .itsr-step-bar.done {
  background: var(--c-success);
}

/* ════════════════════════════════════════════════════════════════
   2-COLUMN LAYOUT - FIXED (notices + steps span full width)
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page form.woocommerce-checkout,
body.itsr-checkout-page .woocommerce-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  gap: 0 32px !important;
  align-items: start !important;
}

/* Full-width: notices + step indicator */
body.itsr-checkout-page form.woocommerce-checkout > .woocommerce-notices-wrapper,
body.itsr-checkout-page .woocommerce-checkout > .woocommerce-notices-wrapper {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  margin-bottom: 16px !important;
}

body.itsr-checkout-page form.woocommerce-checkout > .itsr-checkout-header,
body.itsr-checkout-page .woocommerce-checkout > .itsr-checkout-header {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  margin-bottom: 28px !important;
}

/* Left column: customer details (spans rows 3-4) */
body.itsr-checkout-page form.woocommerce-checkout > #customer_details,
body.itsr-checkout-page .woocommerce-checkout > #customer_details {
  grid-column: 1 !important;
  grid-row: 3 / 5 !important;
  width: 100% !important;
  float: none !important;
}

/* Right column row 3: order review heading */
body.itsr-checkout-page form.woocommerce-checkout > #order_review_heading,
body.itsr-checkout-page .woocommerce-checkout > #order_review_heading {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 100% !important;
  float: none !important;
  margin: 0 0 16px !important;
}

/* Right column row 4: order review body */
body.itsr-checkout-page form.woocommerce-checkout > #order_review,
body.itsr-checkout-page .woocommerce-checkout > #order_review {
  grid-column: 2 !important;
  grid-row: 4 !important;
  width: 100% !important;
  float: none !important;
}

body.itsr-checkout-page #customer_details {
  width: 100% !important;
}

/* ════════════════════════════════════════════════════════════════
   CUSTOMER DETAILS COLUMN
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .woocommerce-billing-fields,
body.itsr-checkout-page .woocommerce-shipping-fields,
body.itsr-checkout-page .woocommerce-additional-fields {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 20px;
}

body.itsr-checkout-page .woocommerce-billing-fields h3,
body.itsr-checkout-page .woocommerce-shipping-fields h3,
body.itsr-checkout-page #order_review_heading,
body.itsr-checkout-page .woocommerce-additional-fields h3 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--c-navy-900) !important;
  margin: 0 0 20px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--c-border) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Form fields */
body.itsr-checkout-page .form-row {
  margin-bottom: 16px !important;
  padding: 0 !important;
}
body.itsr-checkout-page .form-row label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-2) !important;
  margin-bottom: 6px !important;
}
body.itsr-checkout-page .form-row label .required,
body.itsr-checkout-page .form-row label abbr {
  color: var(--c-orange-600) !important;
  text-decoration: none !important;
  border: none !important;
  margin-left: 2px;
}

body.itsr-checkout-page .form-row input.input-text,
body.itsr-checkout-page .form-row textarea,
body.itsr-checkout-page .select2-container--default .select2-selection--single,
body.itsr-checkout-page .form-row .select2-selection {
  width: 100% !important;
  border: 1.5px solid var(--c-border) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: var(--c-text) !important;
  background: #fff !important;
  height: auto !important;
  min-height: 46px !important;
  box-shadow: none !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.itsr-checkout-page .form-row input.input-text:focus,
body.itsr-checkout-page .form-row textarea:focus,
body.itsr-checkout-page .select2-container--default.select2-container--focus .select2-selection--single,
body.itsr-checkout-page .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--c-orange-500) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1) !important;
}

body.itsr-checkout-page .form-row .description {
  font-size: 12px !important;
  color: var(--c-text-3) !important;
  margin-top: 6px !important;
  font-style: normal !important;
  line-height: 1.5;
}

body.itsr-checkout-page .form-row.woocommerce-validated input.input-text {
  border-color: var(--c-success) !important;
}
body.itsr-checkout-page .form-row.woocommerce-invalid input.input-text {
  border-color: var(--c-danger) !important;
}

/* Select2 fix */
body.itsr-checkout-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 22px !important;
  padding: 0 !important;
  color: var(--c-text) !important;
  font-size: 14px !important;
}
body.itsr-checkout-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: 10px !important;
}

/* ════════════════════════════════════════════════════════════════
   ORDER REVIEW COLUMN (sticky)
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page #order_review {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 28px 26px;
  position: sticky;
  top: 100px;
}

body.itsr-checkout-page .woocommerce-checkout-review-order-table {
  width: 100% !important;
  margin-bottom: 16px !important;
  background: var(--c-bg);
  border-radius: 10px;
  padding: 8px 14px;
}

body.itsr-checkout-page .woocommerce-checkout-review-order-table th,
body.itsr-checkout-page .woocommerce-checkout-review-order-table td {
  border: none !important;
  padding: 10px 0 !important;
  font-size: 13px !important;
}

body.itsr-checkout-page .woocommerce-checkout-review-order-table thead {
  display: none !important;
}

body.itsr-checkout-page .cart_item td {
  color: var(--c-text) !important;
  font-weight: 500;
}
body.itsr-checkout-page .cart_item .product-name {
  font-weight: 600 !important;
  color: var(--c-navy-900) !important;
}
body.itsr-checkout-page .cart_item .product-total {
  text-align: right !important;
  font-weight: 700 !important;
  color: var(--c-navy-900) !important;
}

body.itsr-checkout-page .cart-subtotal,
body.itsr-checkout-page .tax-rate {
  border-top: 1px solid var(--c-border) !important;
}
body.itsr-checkout-page .cart-subtotal th,
body.itsr-checkout-page .cart-subtotal td {
  font-weight: 600 !important;
  color: var(--c-text-2) !important;
}

body.itsr-checkout-page .order-total {
  border-top: 2px solid var(--c-navy-900) !important;
  margin-top: 6px;
}
body.itsr-checkout-page .order-total th,
body.itsr-checkout-page .order-total td {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--c-navy-900) !important;
  padding-top: 14px !important;
}
body.itsr-checkout-page .order-total .amount,
body.itsr-checkout-page .order-total bdi {
  color: var(--c-orange-600) !important;
  font-size: 22px !important;
}

/* ════════════════════════════════════════════════════════════════
   ORDER EXTRAS (3 trust items before payment)
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .itsr-order-extras {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), rgba(255, 107, 53, 0.04));
  border: 1px dashed var(--c-border);
  border-radius: 12px;
}

body.itsr-checkout-page .itsr-order-extra-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.itsr-checkout-page .itsr-order-extra-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--c-success);
  margin-top: 2px;
}

body.itsr-checkout-page .itsr-order-extra-item strong {
  display: block;
  color: var(--c-navy-900);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

body.itsr-checkout-page .itsr-order-extra-item span {
  font-size: 11px;
  color: var(--c-text-2);
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════
   PAYMENT METHODS
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page #payment {
  background: transparent !important;
  border-radius: 0 !important;
}

body.itsr-checkout-page #payment ul.payment_methods {
  list-style: none !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: none !important;
}

body.itsr-checkout-page #payment ul.payment_methods li {
  background: var(--c-bg) !important;
  border: 1.5px solid var(--c-border) !important;
  border-radius: 10px !important;
  margin: 0 0 8px !important;
  padding: 14px 16px !important;
  transition: border-color 0.2s, background 0.2s;
  list-style: none !important;
}

body.itsr-checkout-page #payment ul.payment_methods li:has(input:checked),
body.itsr-checkout-page #payment ul.payment_methods li.wc-payment-method-selected {
  border-color: var(--c-orange-500) !important;
  background: var(--c-orange-50) !important;
}

body.itsr-checkout-page #payment ul.payment_methods li label {
  font-weight: 700 !important;
  color: var(--c-navy-900) !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
body.itsr-checkout-page #payment ul.payment_methods li label img {
  max-height: 22px !important;
  width: auto !important;
}

body.itsr-checkout-page #payment ul.payment_methods li .payment_box {
  background: #fff !important;
  border-radius: 8px !important;
  padding: 14px !important;
  margin-top: 10px !important;
  font-size: 13px !important;
  color: var(--c-text-2) !important;
}

body.itsr-checkout-page #payment ul.payment_methods li .payment_box::before {
  display: none !important;
}

/* Terms & conditions */
body.itsr-checkout-page .woocommerce-terms-and-conditions-wrapper {
  padding: 12px 0;
  font-size: 12px;
  color: var(--c-text-2);
}
body.itsr-checkout-page .form-row.terms label {
  text-transform: none !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  color: var(--c-text-2) !important;
}
body.itsr-checkout-page .form-row.terms label a {
  color: var(--c-orange-600);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   PLACE ORDER BUTTON
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page #place_order,
body.itsr-checkout-page button#place_order {
  width: 100% !important;
  background: linear-gradient(135deg, var(--c-orange-500), var(--c-orange-600)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(232, 90, 44, 0.36) !important;
  transition: all 0.2s !important;
  text-transform: none !important;
  text-shadow: none !important;
  margin-top: 10px !important;
}
body.itsr-checkout-page #place_order:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 90, 44, 0.45) !important;
}
body.itsr-checkout-page #place_order:active {
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════
   CHECKOUT TRUST (below place order)
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .itsr-checkout-trust {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--c-border);
  text-align: center;
}

body.itsr-checkout-page .itsr-payment-logos {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
body.itsr-checkout-page .itsr-payment-logos img {
  height: 26px;
  width: auto;
  max-width: 64px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  object-fit: contain;
}

body.itsr-checkout-page .itsr-checkout-secure {
  font-size: 12px;
  color: var(--c-text-2);
  margin: 0 0 8px !important;
  line-height: 1.5;
}

body.itsr-checkout-page .itsr-checkout-help {
  font-size: 12px;
  color: var(--c-text-2);
  margin: 0 !important;
}
body.itsr-checkout-page .itsr-checkout-help a {
  color: #25D366;
  font-weight: 700;
  text-decoration: none;
}
body.itsr-checkout-page .itsr-checkout-help a:hover {
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════════
   COUPON / LOGIN
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .woocommerce-form-coupon-toggle,
body.itsr-checkout-page .woocommerce-form-login-toggle {
  background: var(--c-navy-50) !important;
  border: 1px dashed var(--c-navy-800) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
}

body.itsr-checkout-page .woocommerce-form-coupon-toggle .woocommerce-info,
body.itsr-checkout-page .woocommerce-form-login-toggle .woocommerce-info {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--c-navy-800) !important;
}
body.itsr-checkout-page .woocommerce-form-coupon-toggle a,
body.itsr-checkout-page .woocommerce-form-login-toggle a {
  color: var(--c-orange-600) !important;
  font-weight: 700 !important;
}

body.itsr-checkout-page .woocommerce-form-coupon {
  background: #fff !important;
  border: 1px solid var(--c-border) !important;
  border-radius: 10px !important;
  padding: 18px !important;
  margin-bottom: 16px !important;
}
body.itsr-checkout-page .woocommerce-form-coupon button {
  background: var(--c-navy-900) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 10px 18px !important;
  border: none !important;
  font-weight: 600 !important;
}

/* Notices */
body.itsr-checkout-page .woocommerce-notices-wrapper .woocommerce-message,
body.itsr-checkout-page .woocommerce-notices-wrapper .woocommerce-info,
body.itsr-checkout-page .woocommerce-notices-wrapper .woocommerce-error {
  border-radius: 10px !important;
  padding: 14px 18px !important;
  font-size: 13px !important;
  margin-bottom: 20px !important;
  border-left-width: 4px !important;
}
body.itsr-checkout-page .woocommerce-message {
  background: #ECFDF5 !important;
  color: #065F46 !important;
  border-left-color: var(--c-success) !important;
}
body.itsr-checkout-page .woocommerce-error {
  background: #FEE2E2 !important;
  color: #991B1B !important;
  border-left-color: var(--c-danger) !important;
}

/* ════════════════════════════════════════════════════════════════
   EMAIL BLACKLIST NOTICE (above billing form)
   ════════════════════════════════════════════════════════════════ */
body.itsr-checkout-page .itsr-email-blacklist-notice {
  background: linear-gradient(135deg, #FEF3C7 0%, #FEF9E7 100%);
  border: 1.5px solid #F59E0B;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

body.itsr-checkout-page .itsr-email-blacklist-notice svg {
  width: 24px;
  height: 24px;
  color: #F59E0B;
  flex-shrink: 0;
  margin-top: 2px;
}

body.itsr-checkout-page .itsr-email-blacklist-notice strong {
  display: block;
  color: #92400E;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

body.itsr-checkout-page .itsr-email-blacklist-notice p {
  font-size: 13px;
  color: #78350F;
  margin: 4px 0;
  line-height: 1.55;
}

body.itsr-checkout-page .itsr-email-blacklist-notice code {
  background: #FFF;
  border: 1px solid #FCD34D;
  color: #92400E;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 968px) {
  body.itsr-checkout-page form.woocommerce-checkout,
  body.itsr-checkout-page .woocommerce-checkout {
    grid-template-columns: 1fr !important;
    gap: 16px 0 !important;
  }

  body.itsr-checkout-page form.woocommerce-checkout > .woocommerce-notices-wrapper,
  body.itsr-checkout-page form.woocommerce-checkout > .itsr-checkout-header,
  body.itsr-checkout-page form.woocommerce-checkout > #customer_details,
  body.itsr-checkout-page form.woocommerce-checkout > #order_review_heading,
  body.itsr-checkout-page form.woocommerce-checkout > #order_review {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.itsr-checkout-page #order_review {
    position: static !important;
  }
}

@media (max-width: 540px) {
  body.itsr-checkout-page .itsr-checkout-steps {
    max-width: 100%;
  }
  body.itsr-checkout-page .itsr-step .num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  body.itsr-checkout-page .itsr-step span {
    font-size: 9px;
  }
  body.itsr-checkout-page .itsr-step-bar {
    max-width: 50px;
    margin: 0 4px 24px;
  }

  body.itsr-checkout-page .woocommerce-billing-fields,
  body.itsr-checkout-page #order_review {
    padding: 20px 18px !important;
  }
}
