/**
 * LegalFamily — WooCommerce checkout (reference layout).
 */

body.lf-checkout-page {
  --lf-checkout-bg: #f6f3ed;
  --lf-checkout-card: #ffffff;
  --lf-checkout-radius: 12px;
  --lf-checkout-border: #e8e4dc;
  --lf-checkout-green: var(--lf-green, #105050);
  --lf-checkout-muted: var(--lf-muted, #64748b);
  --lf-contact-label: #6b6661;
  --lf-contact-placeholder: #9ca3af;
  --lf-contact-divider: #e5e2dc;
  --lf-checkout-ink-soft: #1e293b;
  --lf-checkout-card-shade: #faf8f4;
  --lf-checkout-elevate: 0 1px 2px rgba(16, 80, 80, 0.05), 0 12px 32px rgba(15, 23, 42, 0.07);
  background-color: var(--lf-checkout-bg);
}

body.lf-checkout-page .site-main {
  max-width: none;
  margin: 0;
  padding-top: var(--lf-header-stack-offset, 96px);
  padding-bottom: 48px;
}

body.lf-checkout-page .entry-header {
  display: none;
}

body.lf-checkout-page .entry-content {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.lf-checkout {
  margin: 0;
}

/*
 * WooCommerce loads `.woocommerce table.shop_table` (woocommerce-general) with
 * border, margin, border-radius, and border-collapse: separate. Specificity is
 * higher than a lone `.woocommerce-checkout-review-order-table` class, so we
 * re-scope the review table under the checkout body + `.woocommerce` / form.
 * No duplicate checkout page required — cascade order + specificity fixes it.
 */
body.lf-checkout-page.woocommerce-checkout .woocommerce table.shop_table.woocommerce-checkout-review-order-table,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout.woocommerce-checkout table.shop_table.woocommerce-checkout-review-order-table {
  border: 0;
  margin: 0;
  border-radius: 0;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  text-align: inherit;
  background: transparent;
  box-shadow: none;
}

body.lf-checkout-page.woocommerce-checkout .woocommerce table.shop_table.woocommerce-checkout-review-order-table th,
body.lf-checkout-page.woocommerce-checkout .woocommerce table.shop_table.woocommerce-checkout-review-order-table td,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout.woocommerce-checkout table.shop_table.woocommerce-checkout-review-order-table th,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout.woocommerce-checkout table.shop_table.woocommerce-checkout-review-order-table td {
  border: 0;
  background: transparent;
}

.lf-checkout__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.lf-checkout__brand .custom-logo-link,
.lf-checkout__brand .custom-logo-link img {
  display: block;
  max-height: 40px;
  width: auto;
}

.lf-checkout__brand-text {
  font-family: "Anuphan", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--lf-checkout-green);
  text-decoration: none;
}

.lf-checkout__secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--lf-checkout-muted);
  font-weight: 500;
}

.lf-checkout__secure-icon {
  flex-shrink: 0;
  color: var(--lf-checkout-green);
}

.lf-checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 28px 36px;
  align-items: start;
}

@media (max-width: 960px) {
  .lf-checkout__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .lf-checkout__card--order .woocommerce-checkout-review-order-table {
    table-layout: auto;
  }

  .lf-checkout__card--order .woocommerce-checkout-review-order-table td:first-child,
  .lf-checkout__card--order .woocommerce-checkout-review-order-table th:first-child {
    width: auto;
  }
}

.lf-checkout__card {
  background: var(--lf-checkout-card);
  border: 1px solid var(--lf-checkout-border);
  border-radius: var(--lf-checkout-radius);
  padding: 22px 24px 26px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

body.lf-checkout-page .lf-checkout__card--order {
  padding: 24px 26px 28px;
  background: linear-gradient(165deg, #ffffff 0%, var(--lf-checkout-card-shade) 52%, #ffffff 100%);
  border-color: rgba(232, 228, 220, 0.95);
  box-shadow: var(--lf-checkout-elevate);
}

body.lf-checkout-page .lf-checkout__card--payment {
  padding: 24px 26px 28px;
  background: linear-gradient(165deg, #ffffff 0%, var(--lf-checkout-card-shade) 52%, #ffffff 100%);
  border-color: rgba(232, 228, 220, 0.95);
  box-shadow: var(--lf-checkout-elevate);
}

.lf-checkout__card-title {
  margin: 0 0 16px;
  font-family: "Anuphan", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lf-ink, #0f172a);
}

body.lf-checkout-page .lf-checkout__card-title--accent {
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lf-checkout-green);
  letter-spacing: 0.01em;
  border-bottom: 3px solid var(--lf-accent-orange, #f97316);
}

.lf-checkout__main > .lf-checkout__customer > .lf-checkout__card {
  margin-bottom: 12px;
}

.lf-checkout__main > .lf-checkout__customer > .lf-checkout__card:last-child {
  margin-bottom: 0;
}

.lf-checkout__card-header--with-step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.lf-checkout__card-header--with-step .lf-checkout__card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lf-checkout-green);
  letter-spacing: 0.01em;
}

.lf-checkout__step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  font-family: "Anuphan", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--lf-checkout-green);
  box-shadow: 0 1px 2px rgba(16, 80, 80, 0.2);
}

.lf-checkout__card-divider {
  height: 1px;
  margin: 12px 0 14px;
  background: var(--lf-contact-divider);
  border: 0;
}

.lf-checkout__card--contact {
  padding: 22px 24px 22px;
}

.lf-checkout__hint {
  margin: -8px 0 16px;
  font-size: 0.875rem;
  color: var(--lf-checkout-muted);
  line-height: 1.45;
}

.lf-checkout__fields--name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.lf-checkout__fields--name-row #billing_first_name_field {
  grid-column: 1;
  grid-row: 1;
}

.lf-checkout__fields--name-row #billing_last_name_field {
  grid-column: 2;
  grid-row: 1;
}

.lf-checkout__fields--name-row #billing_email_field {
  grid-column: 1 / -1;
  grid-row: 2;
}

.lf-checkout__fields--name-row > .form-row {
  min-width: 0;
}

.lf-checkout__card--contact .lf-checkout__fields--name-row > .form-row {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: both;
}

.lf-checkout__card--contact .lf-checkout__fields--name-row .woocommerce-input-wrapper {
  display: block;
  width: 100%;
  max-width: none;
}

.lf-checkout__card--contact .lf-checkout__fields--name-row input.input-text {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

.lf-checkout__fields--invoice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.lf-checkout__fields--invoice > .form-row {
  min-width: 0;
}

.lf-checkout__card--invoice .lf-checkout__fields--invoice > .form-row {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}

.lf-checkout__card--invoice .lf-checkout__fields--invoice .woocommerce-input-wrapper {
  display: block;
  width: 100%;
  max-width: none;
}

.lf-checkout__fields--invoice #billing_country_field,
.lf-checkout__fields--invoice #billing_address_1_field,
.lf-checkout__fields--invoice #billing_address_2_field,
.lf-checkout__fields--invoice #billing_state_field {
  grid-column: 1 / -1;
}

.lf-checkout__fields--invoice #billing_phone_field {
  grid-column: 1;
  max-width: 100%;
}

.lf-checkout__fields--formation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-checkout__card--formation {
  padding: 22px 24px 22px;
  overflow: visible;
}

.lf-checkout__card--invoice {
  padding: 22px 24px 22px;
}

.lf-checkout__card--invoice .lf-checkout__card-header--with-step .lf-checkout__card-title,
.lf-checkout__card--formation .lf-checkout__card-header--with-step .lf-checkout__card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lf-checkout-green);
  letter-spacing: 0.01em;
}

.lf-checkout__card--invoice .lf-checkout__card-divider,
.lf-checkout__card--formation .lf-checkout__card-divider {
  margin: 12px 0 12px;
}

.lf-checkout__card--invoice .lf-checkout__hint {
  margin: 0 0 10px;
  line-height: 1.4;
}

/*
 * Grilles coordonnées / facturation : le gap suffit — sinon margin-bottom des .form-row
 * s’ajoute au gap et creuse trop l’espace entre les lignes.
 */
.lf-checkout__fields--name-row > .form-row,
.lf-checkout__fields--invoice > .form-row,
.lf-checkout__fields--formation > .form-row {
  margin: 0 !important;
  padding: 0 !important;
}

.lf-checkout-billing .form-row {
  margin: 0 0 10px;
  padding: 0;
}

.lf-checkout-billing .form-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #334155;
  margin-bottom: 5px;
  display: block;
  line-height: 1.35;
}

.lf-checkout-billing .form-row .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.lf-checkout-billing input.input-text,
.lf-checkout-billing textarea,
.lf-checkout-billing select {
  border: 1px solid var(--lf-checkout-border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

.lf-checkout-billing input.input-text:focus,
.lf-checkout-billing textarea:focus,
.lf-checkout-billing select:focus {
  outline: 2px solid rgba(16, 80, 80, 0.25);
  border-color: var(--lf-checkout-green);
}

.lf-checkout__card--contact .lf-checkout-billing .form-row {
  margin: 0;
}

.lf-checkout__card--contact .lf-checkout-billing .form-row label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-contact-label);
  margin-bottom: 6px;
}

.lf-checkout__card--contact .lf-checkout-billing .form-row label .required {
  color: #c62828;
  font-weight: 700;
  margin-left: 0.2em;
}

.lf-checkout__card--contact .lf-checkout-billing input.input-text {
  border-color: #d6d3cd;
  color: var(--lf-ink, #0f172a);
}

.lf-checkout__card--contact .lf-checkout-billing input.input-text::placeholder {
  color: var(--lf-contact-placeholder);
  opacity: 1;
  font-weight: 400;
}

.lf-checkout-field--pills.form-row {
  margin-bottom: 18px;
  overflow: visible;
}

.lf-checkout-field--pills > label {
  margin-bottom: 12px !important;
  font-size: 0.9375rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--lf-ink, #0f172a) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.lf-checkout-field--pills .woocommerce-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}

.lf-checkout-field--pills .woocommerce-input-wrapper input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lf-checkout-field--pills .woocommerce-input-wrapper label {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--lf-checkout-border);
  background: #fafafa;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--lf-ink, #0f172a) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lf-checkout-field--pills .woocommerce-input-wrapper input[type="radio"]:checked + label,
.lf-checkout-field--pills .woocommerce-input-wrapper input[type="radio"]:focus + label {
  border-color: var(--lf-checkout-green);
  background: rgba(16, 80, 80, 0.08);
  color: var(--lf-checkout-green) !important;
}

.lf-checkout-field--switch.form-row {
  margin-top: 6px;
  margin-bottom: 18px;
  padding-top: 4px;
  overflow: visible;
}

body.lf-checkout-page .lf-checkout-billing .lf-checkout-field--switch .woocommerce-input-wrapper > label {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--lf-ink, #0f172a) !important;
  font-weight: 500 !important;
  text-align: left;
  line-height: 1.45;
}

.lf-checkout-field--switch .lf-checkout-checkbox__text {
  flex: 1;
  min-width: 0;
}

/*
 * Bootstrap / legacy themes: `.checkbox input[type="checkbox"] { position: absolute }`
 * pulls the control out of flow and overlaps label text. Reset inside checkout only.
 */
body.lf-checkout-page.woocommerce-checkout form.lf-checkout.woocommerce-checkout label.checkbox input[type="checkbox"],
body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--formation label.checkbox input[type="checkbox"],
body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--account label.checkbox input[type="checkbox"] {
  position: relative !important;
  inset: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}

.lf-checkout-field--switch input[type="checkbox"] {
  width: 44px !important;
  height: 24px !important;
  border-radius: 999px;
  appearance: none;
  background: #d1d5db;
  position: relative !important;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.2s ease;
}

.lf-checkout-field--switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.lf-checkout-field--switch input[type="checkbox"]:checked {
  background: var(--lf-checkout-green);
}

.lf-checkout-field--switch input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

body.lf-checkout-page .lf-checkout-billing .lf-checkout-field--legal-checkbox .woocommerce-input-wrapper > label {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 0;
  align-items: start;
  margin-bottom: 0;
  padding: 2px 0;
  font-size: 0.8125rem !important;
  line-height: 1.5;
  text-transform: none !important;
  letter-spacing: 0.01em;
  color: var(--lf-ink, #0f172a) !important;
  font-weight: 400 !important;
}

.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  padding: 2px 0;
  font-size: 0.8125rem !important;
  line-height: 1.5;
  text-transform: none !important;
  letter-spacing: 0.01em;
  color: var(--lf-ink, #0f172a) !important;
  font-weight: 400 !important;
}

.lf-checkout-field--legal-checkbox .lf-checkout-checkbox__text {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.lf-checkout-field--legal-checkbox .lf-checkout-checkbox__text .required {
  color: #b91c1c;
  font-weight: 600;
  margin-left: 0.15em;
  white-space: nowrap;
}

body.lf-checkout-page .lf-checkout-legal-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

body.lf-checkout-page .lf-checkout-legal-link:hover,
body.lf-checkout-page .lf-checkout-legal-link:focus-visible {
  color: #1e40af;
  text-decoration-color: currentColor;
  outline: none;
}

body.lf-checkout-page .lf-checkout-legal-link:focus-visible {
  border-radius: 3px;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2);
}

.lf-checkout-field--legal-checkbox input[type="checkbox"] {
  position: relative !important;
  inset: auto !important;
  float: none !important;
  grid-column: 1;
  grid-row: 1;
  margin-top: 0.22em;
  margin-left: 0 !important;
  margin-inline-end: 0;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  accent-color: var(--lf-checkout-green);
  border-radius: 4px;
  cursor: pointer;
}

.lf-checkout-field--legal-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(16, 80, 80, 0.4);
  outline-offset: 2px;
}

.lf-checkout-field--legal-checkbox input[type="checkbox"][aria-invalid="true"]:not(:focus-visible) {
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.45);
}

.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
  position: relative !important;
  inset: auto !important;
  float: none !important;
  margin-top: 3px;
  margin-left: 0 !important;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--lf-checkout-green);
}

.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text {
  flex: 1;
  min-width: 0;
}

.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper {
  margin-top: 8px;
}

.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper .form-row {
  margin-bottom: 0;
}

.woocommerce-checkout-review-order-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
}

.lf-checkout__card--order .woocommerce-checkout-review-order-table td,
.lf-checkout__card--order .woocommerce-checkout-review-order-table th {
  padding-left: 0;
  padding-right: 0;
}

.lf-checkout__card--order .woocommerce-checkout-review-order-table td:first-child,
.lf-checkout__card--order .woocommerce-checkout-review-order-table th:first-child {
  padding-right: 12px;
  width: 68%;
}

.lf-checkout__card--order .woocommerce-checkout-review-order-table td:last-child,
.lf-checkout__card--order .woocommerce-checkout-review-order-table th:last-child {
  padding-left: 10px;
  padding-right: 0;
  text-align: right;
}

.woocommerce-checkout-review-order-table thead {
  display: none;
}

.woocommerce-checkout-review-order-table tbody tr.lf-checkout-line td {
  border: 0;
  padding: 0 0 14px;
  vertical-align: top;
}

.lf-checkout-line__inner {
  display: flex;
  gap: 14px;
  align-items: center;
}

.lf-checkout-line__media {
  position: relative;
  flex: 0 0 auto;
}

/* Remove control: pinned as a badge to the top-right corner of the thumbnail.
   Keeps the title and price columns untouched, while the action stays clearly
   tied to the product visual (familiar e-commerce affordance). */
.lf-checkout-line__remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid var(--lf-checkout-border, #e8e4dc);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.85;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: opacity 160ms ease, color 160ms ease, border-color 160ms ease,
    background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.lf-checkout-line:hover .lf-checkout-line__remove {
  opacity: 1;
}

.lf-checkout-line__remove:hover,
.lf-checkout-line__remove:focus-visible {
  color: #b91c1c;
  background: #ffffff;
  border-color: rgba(185, 28, 28, 0.35);
  outline: none;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.18);
}

.lf-checkout-line__remove:focus-visible {
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.35), 0 2px 8px rgba(185, 28, 28, 0.18);
}

.lf-checkout-line__remove.is-loading {
  pointer-events: none;
  opacity: 0.45;
}

.lf-checkout-line__remove > span {
  display: block;
  margin-top: -1px;
}

.lf-checkout-line.is-removing {
  opacity: 0.5;
  transition: opacity 180ms ease;
}

/* Landscape frame — same intent as .fp-course__thumb (full cover art, no crop). */
.lf-checkout-line__thumb {
  flex: 0 0 auto;
  width: 104px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eceb;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.lf-checkout-page .lf-checkout-line__thumb .lf-checkout-line__img,
body.lf-checkout-page .lf-checkout-line__thumb img,
body.lf-checkout-page .lf-checkout-line__thumb picture,
body.lf-checkout-page .lf-checkout-line__thumb picture img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 0;
}

.lf-checkout-line__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lf-checkout-line__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  color: #000;
  line-height: 1.4;
  letter-spacing: 0.005em;
}

.lf-checkout-line__name {
  min-width: 0;
  display: block;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.lf-checkout-line__title .product-quantity {
  margin: 0;
  padding-top: 0;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--lf-checkout-muted);
  white-space: nowrap;
}

.lf-checkout-item__meta {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lf-checkout-muted);
}

.lf-checkout-line__totals {
  text-align: right;
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

.lf-checkout-line__ht,
.lf-checkout-line__ttc {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.lf-checkout-line__ht {
  color: var(--lf-checkout-muted);
}

.lf-checkout-line__ttc {
  font-weight: 600;
  color: var(--lf-ink, #0f172a);
}

.lf-price-suffix,
.lf-checkout-line__totals abbr {
  text-decoration: none !important;
  border-bottom: 0 !important;
  font-weight: 600;
  color: inherit;
  cursor: help;
}

.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
  border: 0;
  padding: 3px 0;
  font-size: 0.9rem;
}

.woocommerce-checkout-review-order-table tfoot th {
  text-align: left;
  font-weight: 500;
  color: var(--lf-checkout-muted);
}

.woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
  font-weight: 600;
}

.woocommerce-checkout-review-order-table tr.cart-subtotal th,
.woocommerce-checkout-review-order-table tr.cart-subtotal td {
  padding-top: 4px;
  padding-bottom: 2px;
}

.woocommerce-checkout-review-order-table tr.tax-total th,
.woocommerce-checkout-review-order-table tr.tax-total td,
.woocommerce-checkout-review-order-table tr[class*="tax-rate"] th,
.woocommerce-checkout-review-order-table tr[class*="tax-rate"] td {
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lf-checkout-muted);
}

.woocommerce-checkout-review-order-table tr.order-total th,
.woocommerce-checkout-review-order-table tr.order-total td {
  padding-top: 12px;
  margin-top: 6px;
  font-size: 1.05rem;
  color: var(--lf-ink, #0f172a);
  border-top: 1px solid var(--lf-checkout-border, #e8e4dc);
}

.woocommerce-checkout-review-order-table tr.lf-checkout-trust td {
  padding: 16px 0 4px !important;
  border-top: 1px solid var(--lf-checkout-border) !important;
  text-align: left !important;
  vertical-align: top;
}

.lf-checkout-trust__list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 100%;
}

.lf-checkout-trust__list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--lf-ink, #0f172a);
  text-align: left;
}

.lf-checkout-trust__list li:last-child {
  margin-bottom: 0;
}

.lf-checkout-trust__list li::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0;
  border-radius: 50%;
  background-color: var(--lf-checkout-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8.5L7 11L12 5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.lf-checkout-trust__text {
  flex: 1;
  min-width: 0;
}

.lf-checkout__card--payment .wc_payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lf-checkout__card--payment .wc_payment_methods li {
  margin: 0;
}

.lf-checkout__card--payment .wc_payment_methods label {
  font-size: 0.9rem;
  font-weight: 600;
}

.lf-checkout__card--payment .payment_box {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.lf-checkout__card--payment .woocommerce-checkout-payment {
  background: transparent;
}

.lf-checkout__card--payment .wc-stripe-upe-form,
.lf-checkout__card--payment .wc-payment-form {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.lf-checkout__card--payment .wc-stripe-upe-element {
  margin-bottom: 0;
  min-height: 44px;
}

.lf-checkout__card--payment .woocommerce-SavedPaymentMethods-saveNew {
  font-size: 0.8125rem;
}

.lf-checkout__card--formation .woocommerce-privacy-policy-text,
.lf-checkout__card--formation .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--lf-checkout-muted);
  margin-top: 10px;
  max-width: 52em;
}

.lf-checkout__card--payment .form-row.place-order {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  float: none !important;
  clear: both;
  gap: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--lf-checkout-border, #e8e4dc);
  background: transparent !important;
}

.lf-checkout__card--payment .form-row.place-order #place_order {
  float: none !important;
}

.lf-checkout__card--payment #place_order {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  width: 100%;
  margin-top: 0;
  padding: 16px 20px;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Anuphan", sans-serif;
  border: 0;
  border-radius: 10px;
  background: var(--lf-checkout-green) !important;
  color: #fff !important;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.lf-checkout__card--payment #place_order .woocommerce-Price-amount {
  color: inherit;
}

.lf-checkout__card--payment #place_order:hover {
  filter: brightness(1.05);
}

.lf-checkout__card--payment .lf-checkout__stripe-note {
  margin: 14px 0 0;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--lf-checkout-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lf-checkout__stripe-note svg {
  flex-shrink: 0;
}

.woocommerce-NoticeGroup-checkout {
  margin-bottom: 20px;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  border-radius: 8px;
}

body.lf-checkout-page .woocommerce-checkout-review-order-table tfoot td,
body.lf-checkout-page .woocommerce-checkout-review-order-table tfoot th {
  font-variant-numeric: tabular-nums;
}

body.lf-checkout-page .woocommerce-checkout-review-order-table tr.cart-subtotal th {
  font-weight: 600;
  color: var(--lf-checkout-ink-soft);
}

body.lf-checkout-page .woocommerce-checkout-review-order-table tr.order-total th,
body.lf-checkout-page .woocommerce-checkout-review-order-table tr.order-total td {
  letter-spacing: 0.02em;
}

.lf-checkout-coupon-cell {
  padding: 6px 0 14px !important;
  vertical-align: top !important;
}

/* Compact coupon — toggle row identique au switch « aménagement » + champ inline. */
body.lf-checkout-page .lf-coupon {
  margin: 0;
}

body.lf-checkout-page .lf-coupon__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lf-ink, #0f172a);
  line-height: 1.4;
}

body.lf-checkout-page .lf-coupon__label {
  flex: 1;
  min-width: 0;
}

body.lf-checkout-page .lf-coupon__switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.2s ease;
}

body.lf-checkout-page .lf-coupon__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

body.lf-checkout-page .lf-coupon__switch:checked {
  background: var(--lf-checkout-green);
}

body.lf-checkout-page .lf-coupon__switch:checked::after {
  transform: translateX(18px);
}

body.lf-checkout-page .lf-coupon__switch:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.55);
  outline-offset: 2px;
}

body.lf-checkout-page .lf-coupon__panel {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: lfCouponPanelIn 180ms ease-out;
}

body.lf-checkout-page .lf-coupon__panel[hidden] {
  display: none;
}

@keyframes lfCouponPanelIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.lf-checkout-page .lf-coupon__field {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

body.lf-checkout-page .lf-coupon__input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  padding: 9px 12px !important;
  height: 36px;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lf-checkout-ink-soft) !important;
  background: #ffffff !important;
  border: 1px solid var(--lf-checkout-border, #e8e4dc) !important;
  border-radius: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.lf-checkout-page .lf-coupon__input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--lf-contact-placeholder, #9ca3af);
  opacity: 1;
}

body.lf-checkout-page .lf-coupon__input:focus {
  outline: none !important;
  border-color: var(--lf-checkout-green) !important;
  box-shadow: 0 0 0 3px rgba(16, 80, 80, 0.12) !important;
}

body.lf-checkout-page .lf-coupon__submit {
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 16px !important;
  height: 36px;
  min-height: 0;
  font-family: "Anuphan", sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #ffffff !important;
  background: var(--lf-checkout-green) !important;
  border: 0 !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease;
}

body.lf-checkout-page .lf-coupon__submit:hover {
  filter: brightness(1.08);
}

body.lf-checkout-page .lf-coupon__submit:active {
  transform: translateY(1px);
}

body.lf-checkout-page .lf-coupon__submit:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.6);
  outline-offset: 2px;
}

/* Pill CTA placed right after the last cart line — single, centered, low-noise. */
.lf-checkout-add-course-cell {
  padding: 6px 0 14px !important;
  border-top: 0 !important;
  text-align: center !important;
}

body.lf-checkout-page .lf-checkout-add-course {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 22px;
  font-family: "Anuphan", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--lf-accent-orange, #ea580c);
  background: transparent;
  border: 1.5px solid var(--lf-accent-orange, #ea580c);
  border-radius: 999px;
  transition: color 160ms ease, background-color 160ms ease,
    border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body.lf-checkout-page .lf-checkout-add-course__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: -4px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

body.lf-checkout-page .lf-checkout-add-course:hover,
body.lf-checkout-page .lf-checkout-add-course:focus-visible {
  color: #ffffff;
  background: var(--lf-accent-orange, #ea580c);
  border-color: var(--lf-accent-orange, #ea580c);
  outline: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.22);
  transform: translateY(-1px);
}

body.lf-checkout-page .lf-checkout-add-course:focus-visible {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.28),
    0 4px 14px rgba(234, 88, 12, 0.22);
}

body.lf-checkout-page .lf-checkout-add-course:active {
  transform: translateY(0);
}

.lf-checkout-field--context-other textarea,
.lf-checkout-field--accessibility-details textarea {
  min-height: 88px;
  resize: vertical;
}

/*
 * Single surface — card gradient only; no nested beige/white bands in #payment.
 * Overrides WooCommerce #payment violet tint and .payment_box lavender box.
 */
body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--payment #payment,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout.woocommerce-checkout .lf-checkout__card--payment #payment {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  padding: 0;
}

body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--payment #payment div.payment_box,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout .lf-checkout__card--payment #payment div.payment_box,
.lf-checkout__card--payment .payment_box.payment_method_stripe,
.lf-checkout__card--payment #payment .payment_box:not(.payment_method_paypal),
.lf-checkout__card--payment .woocommerce-checkout-payment .payment_box {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--payment #payment div.payment_box::before,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout .lf-checkout__card--payment #payment div.payment_box::before {
  display: none !important;
  content: none !important;
}

body.lf-checkout-page.woocommerce-checkout .lf-checkout__card--payment #payment ul.payment_methods,
body.lf-checkout-page.woocommerce-checkout form.lf-checkout .lf-checkout__card--payment #payment ul.payment_methods {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  margin: 0;
}

body.lf-checkout-page .lf-checkout__card--payment .wc_payment_methods li.payment_method_stripe > label:empty {
  display: none;
}

body.lf-checkout-page .lf-checkout__card--payment .wc_payment_methods li.payment_method_stripe > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lf-checkout__card--payment .wc-stripe-upe-form,
.lf-checkout__card--payment .wc-payment-form,
.lf-checkout__card--payment .stripe-gateway-checkout-new-payment-methods,
.lf-checkout__card--payment .wc-stripe-upe-form .wc-stripe-upe-element,
.lf-checkout__card--payment .wc-stripe-upe-form fieldset {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.lf-checkout__card--payment .StripeElement,
.lf-checkout__card--payment .InputElement,
.lf-checkout__card--payment .wc-stripe-upe-form input[type="text"],
.lf-checkout__card--payment .wc-stripe-upe-form input[type="tel"],
.lf-checkout__card--payment .wc-stripe-upe-form input[type="email"] {
  background-color: #fff !important;
  padding: 11px 14px !important;
  border: 1px solid #d6d3cd !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

/* Hidden clones Stripe uses to detect input metrics — keep in sync with billing fields. */
body.lf-checkout-page #wc-stripe-hidden-input,
body.lf-checkout-page #wc-stripe-hidden-invalid-input {
  padding: 11px 14px !important;
  border: 1px solid #d6d3cd !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

body.lf-checkout-page .lf-checkout__card--payment .payment_box .woocommerce-info,
body.lf-checkout-page .lf-checkout__card--payment .payment_box .woocommerce-message {
  margin: 0 0 12px;
  padding: 10px 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--lf-checkout-muted);
  font-size: 0.8125rem;
}
