:root {
  --fnf-account-ink: #1d1d1f;
  --fnf-account-muted: #6d686c;
  --fnf-account-line: #e7e2e4;
  --fnf-account-soft: #fbf7f8;
  --fnf-account-pink: #ef4777;
  --fnf-account-pink-dark: #d93668;
  --fnf-account-max: 1180px;
  --fnf-account-radius: 16px;
}

html:has(body.fnf-headless-account) {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background: #fff;
}

body.fnf-headless-account {
  min-width: 320px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden !important;
  color: var(--fnf-account-ink);
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.fnf-headless-account *,
.fnf-headless-account *::before,
.fnf-headless-account *::after {
  box-sizing: border-box;
}

.fnf-headless-account a {
  color: var(--fnf-account-pink-dark);
  text-decoration-thickness: .08em;
  text-underline-offset: .14em;
}

.fnf-headless-account a:hover { color: var(--fnf-account-ink); }

.fnf-headless-account button,
.fnf-headless-account input,
.fnf-headless-account select,
.fnf-headless-account textarea { font: inherit; }

.fnf-account-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff !important;
  background: var(--fnf-account-ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.fnf-account-skip:focus { transform: translateY(0); }

.fnf-account-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--fnf-account-line);
}

.fnf-account-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: min(calc(100% - 48px), var(--fnf-account-max));
  min-height: 76px;
  margin: 0 auto;
}

.fnf-account-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none !important;
}

.fnf-account-brand img {
  display: block;
  width: 196px;
  height: auto;
}

.fnf-account-back,
.fnf-account-header__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--fnf-account-ink) !important;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none !important;
}

.fnf-account-back { justify-self: start; }
.fnf-account-header__status { justify-self: end; }
.fnf-account-back > span:first-child { font-size: 20px; line-height: 1; }

.fnf-account-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--fnf-account-pink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(239, 71, 119, .12);
}

.fnf-account-main {
  width: min(calc(100% - 48px), var(--fnf-account-max));
  min-height: 68vh;
  margin: 0 auto;
  padding: 42px 0 72px;
  animation: fnf-account-enter .32s cubic-bezier(.22, 1, .36, 1) both;
}

.fnf-account-main__inner { min-width: 0; }

.fnf-account-hero {
  max-width: 760px;
  margin: 0 0 32px;
}

.fnf-account-eyebrow {
  margin: 0 0 8px;
  color: var(--fnf-account-pink-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fnf-account-hero h1 {
  margin: 0;
  color: var(--fnf-account-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.fnf-account-hero > p:last-child {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--fnf-account-muted);
  font-size: 18px;
  line-height: 1.45;
}

.fnf-account-layout {
  display: grid;
  grid-template-columns: minmax(190px, 224px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}

.fnf-account-layout--dashboard {
  display: block;
}

.fnf-account-layout--dashboard .fnf-account-content {
  max-width: none;
}

.fnf-account-sidebar { min-width: 0; }

.fnf-account-navigation {
  position: sticky;
  top: 20px;
  padding: 14px;
  background: var(--fnf-account-soft);
  border: 1px solid var(--fnf-account-line);
  border-radius: var(--fnf-account-radius);
}

.fnf-account-navigation__label {
  margin: 0 8px 10px;
  color: var(--fnf-account-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fnf-account-navigation ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fnf-account-navigation li { margin: 0; padding: 0; }

.fnf-account-navigation__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--fnf-account-ink) !important;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.fnf-account-navigation__link:hover,
.fnf-account-navigation__link:focus-visible,
.fnf-account-navigation__link.is-current {
  color: var(--fnf-account-pink-dark) !important;
  background: #fff;
}

.fnf-account-navigation__link:focus-visible {
  outline: 2px solid var(--fnf-account-pink);
  outline-offset: 2px;
}

.fnf-account-navigation__link:hover .fnf-account-navigation__arrow { transform: translateX(2px); }

.fnf-account-navigation__arrow {
  color: var(--fnf-account-muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  transition: transform .18s ease;
}

.fnf-account-content,
.fnf-account-guest { min-width: 0; }

/* The native shortcode remains responsible for account endpoint output. Its
   navigation is intentionally replaced by the shell navigation above. */
.fnf-account-content > .woocommerce > .woocommerce-MyAccount-navigation,
.fnf-account-content > .woocommerce > nav.woocommerce-MyAccount-navigation {
  display: none !important;
}

.fnf-account-content > .woocommerce > .woocommerce-MyAccount-content {
  width: 100%;
  margin: 0;
  float: none;
}

.fnf-account-content .woocommerce-MyAccount-content::before,
.fnf-account-content .woocommerce-MyAccount-content::after,
.fnf-account-guest .woocommerce::before,
.fnf-account-guest .woocommerce::after {
  display: table;
  clear: both;
  content: "";
}

.fnf-account-content p,
.fnf-account-guest p { color: var(--fnf-account-muted); }

.fnf-account-content p:first-child {
  margin-top: 0;
}

.fnf-account-content .woocommerce-MyAccount-content > p:first-child:not(.woocommerce-info):not(.woocommerce-message):not(.woocommerce-error) {
  margin: 0 0 22px;
  padding: 14px 16px;
  color: var(--fnf-account-ink);
  background: var(--fnf-account-soft);
  border: 1px solid var(--fnf-account-line);
  border-radius: 12px;
  font-size: 15px;
}

.fnf-account-content h2,
.fnf-account-content h3,
.fnf-account-guest h2,
.fnf-account-guest h3 {
  margin: 0 0 16px;
  color: var(--fnf-account-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-transform: none;
}

/* Dashboard links supplied by the existing Flatsome/Woo hooks. */
.fnf-account-content ul.dashboard-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fnf-account-content ul.dashboard-links > li {
  min-width: 0;
  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
}

.fnf-account-content ul.dashboard-links > li > a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 14px 16px;
  width: 100%;
  color: var(--fnf-account-ink);
  background: #fff;
  border: 1px solid var(--fnf-account-line);
  border-radius: 12px;
  margin-right: 0;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.fnf-account-content ul.dashboard-links > li > a::after {
  color: var(--fnf-account-pink);
  content: "→";
  font-size: 19px;
  font-weight: 400;
}

.fnf-account-content ul.dashboard-links > li > a:hover,
.fnf-account-content ul.dashboard-links > li > a:focus-visible {
  border-color: rgba(239, 71, 119, .55);
  box-shadow: 0 8px 22px rgba(40, 20, 28, .06);
  transform: translateY(-1px);
}

.fnf-account-content ul.dashboard-links > li > a:focus-visible {
  outline: 2px solid var(--fnf-account-pink);
  outline-offset: 2px;
}

/* The dashboard hero already carries the short orientation copy. WooCommerce
   otherwise repeats it with a greeting and a second paragraph above the same
   action links. Keep that native content available on other endpoints only. */
body.fnf-headless-account--dashboard .fnf-account-content .woocommerce-MyAccount-content > p:first-child,
body.fnf-headless-account--dashboard .fnf-account-content .woocommerce-MyAccount-content > p:nth-child(2) {
  display: none !important;
}

.fnf-account-dashboard-actions {
  display: flex;
  justify-content: flex-start;
  margin: 16px 0 0;
}

.fnf-account-dashboard-logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fnf-account-muted) !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
}

.fnf-account-dashboard-logout::after {
  color: var(--fnf-account-pink);
  content: "→";
  font-size: 16px;
  font-weight: 400;
}

.fnf-account-dashboard-logout:hover,
.fnf-account-dashboard-logout:focus-visible {
  color: var(--fnf-account-pink-dark) !important;
}

.fnf-account-dashboard-logout:focus-visible {
  outline: 2px solid var(--fnf-account-pink);
  outline-offset: 3px;
}

/* Woo notices remain visible and become compact, readable status cards. */
.fnf-headless-account .woocommerce-notices-wrapper,
.fnf-headless-account .woocommerce-message,
.fnf-headless-account .woocommerce-info,
.fnf-headless-account .woocommerce-error {
  width: 100%;
  max-width: none;
}

.fnf-headless-account .woocommerce-message,
.fnf-headless-account .woocommerce-info,
.fnf-headless-account .woocommerce-error {
  margin: 0 0 18px;
  padding: 13px 16px;
  color: var(--fnf-account-ink);
  background: var(--fnf-account-soft);
  border: 1px solid var(--fnf-account-line);
  border-left: 3px solid var(--fnf-account-pink);
  border-radius: 12px;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.4;
  text-transform: none;
}

.fnf-headless-account .woocommerce-error {
  border-left-color: #b42346;
}

.fnf-headless-account .woocommerce-message::before,
.fnf-headless-account .woocommerce-info::before,
.fnf-headless-account .woocommerce-error::before { display: none; }

/* Forms: login, registration, password recovery, account and address data. */
.fnf-headless-account form,
.fnf-headless-account fieldset {
  min-width: 0;
}

.fnf-headless-account .form-row,
.fnf-headless-account form p {
  margin: 0 0 15px;
}

/* Flatsome makes account rows flex containers and wraps password fields in a
   40%-wide helper. Reset that legacy layout so every field has one clean,
   full-width label/input stack in the new cards. */
.fnf-headless-account .woocommerce-form-row--wide {
  display: block !important;
  width: 100% !important;
}

.fnf-headless-account .woocommerce-form-row--wide .password-input {
  display: block;
  width: 100% !important;
}

.fnf-headless-account label {
  display: block;
  margin: 0 0 6px;
  color: var(--fnf-account-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.fnf-headless-account input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.fnf-headless-account select,
.fnf-headless-account textarea,
.fnf-headless-account .select2-container .select2-selection--single {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--fnf-account-ink);
  background: #fff;
  border: 1px solid #d9d3d6;
  border-radius: 10px;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.fnf-headless-account textarea { min-height: 108px; resize: vertical; }

.fnf-headless-account input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.fnf-headless-account select:focus,
.fnf-headless-account textarea:focus,
.fnf-headless-account .select2-container--open .select2-selection--single,
.fnf-headless-account .select2-container .select2-selection--single:focus {
  border-color: var(--fnf-account-pink);
  box-shadow: 0 0 0 3px rgba(239, 71, 119, .12);
  outline: none;
}

.fnf-headless-account input[type="checkbox"],
.fnf-headless-account input[type="radio"] {
  accent-color: var(--fnf-account-pink);
}

.fnf-headless-account .button,
.fnf-headless-account button.button,
.fnf-headless-account input[type="submit"],
.fnf-headless-account input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 11px 20px;
  color: #fff !important;
  background: var(--fnf-account-pink) !important;
  border: 1px solid var(--fnf-account-pink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.fnf-headless-account .button:hover,
.fnf-headless-account button.button:hover,
.fnf-headless-account input[type="submit"]:hover,
.fnf-headless-account input[type="button"]:hover {
  background: var(--fnf-account-pink-dark) !important;
  border-color: var(--fnf-account-pink-dark) !important;
  transform: translateY(-1px);
}

.fnf-headless-account .button:focus-visible,
.fnf-headless-account button.button:focus-visible,
.fnf-headless-account input[type="submit"]:focus-visible,
.fnf-headless-account input[type="button"]:focus-visible {
  outline: 2px solid var(--fnf-account-pink-dark);
  outline-offset: 3px;
}

.fnf-headless-account .woocommerce-form__label-for-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}

.fnf-headless-account .woocommerce-form__label-for-checkbox input { margin: 0; }

.fnf-headless-account .woocommerce-LostPassword,
.fnf-headless-account .lost_password {
  margin: 10px 0 0 !important;
  font-size: 14px;
}

.fnf-headless-account .woocommerce-LostPassword a,
.fnf-headless-account .lost_password a { font-weight: 650; }

.fnf-account-guest .account-container {
  width: 100%;
  margin: 0;
  padding: 0;
}

.fnf-account-guest #customer_login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
}

.fnf-account-guest #customer_login > [class*="col-"] {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.fnf-account-guest .account-login-inner,
.fnf-account-guest .account-register-inner {
  height: 100%;
  padding: clamp(20px, 3vw, 30px);
  background: #fff;
  border: 1px solid var(--fnf-account-line);
  border-radius: var(--fnf-account-radius);
}

.fnf-account-guest .account-login-inner h2,
.fnf-account-guest .account-register-inner h2 {
  margin-bottom: 20px;
}

.fnf-account-guest .account-login-inner form,
.fnf-account-guest .account-register-inner form {
  margin: 0;
}

.fnf-account-guest .account-login-inner form > p:last-of-type,
.fnf-account-guest .account-register-inner form > p:last-of-type {
  margin-bottom: 0;
}

.fnf-account-guest .account-login-inner form > p.form-row,
.fnf-account-guest .account-register-inner form > p.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.fnf-account-guest .account-login-inner form > p.form-row .button,
.fnf-account-guest .account-register-inner form > p.form-row .button {
  width: 100%;
}

/* Registration is intentionally not offered in the account entry point. Keep
   the remaining login card readable and give its primary action a compact,
   content-sized footprint instead of a full-width theme button. */
.fnf-account-guest--login-only .account-container {
  width: min(100%, 640px);
}

.fnf-account-guest--login-only .account-login-inner form > p.form-row .woocommerce-form-login__submit {
  width: auto;
  min-width: 132px;
  min-height: 44px;
  padding-inline: 18px;
}

.fnf-account-guest .social-login {
  margin: 0 0 18px;
  padding: 0;
}

.fnf-account-guest .woocommerce-ResetPassword,
.fnf-account-guest .woocommerce-message,
.fnf-account-guest > .woocommerce > p {
  max-width: 640px;
}

.fnf-account-guest .woocommerce-ResetPassword {
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  background: #fff;
  border: 1px solid var(--fnf-account-line);
  border-radius: var(--fnf-account-radius);
}

.fnf-account-guest .woocommerce-ResetPassword > p:first-child {
  margin-top: 0;
  color: var(--fnf-account-muted);
}

.fnf-account-guest .woocommerce-ResetPassword > p:last-of-type { margin-bottom: 0; }

.fnf-account-guest .woocommerce-ResetPassword .form-row-first,
.fnf-account-guest .woocommerce-ResetPassword .form-row-last {
  width: 100%;
  float: none;
}

/* Orders, saved payment methods and order details. */
.fnf-account-content table {
  width: 100%;
  margin: 0 0 20px;
  border: 1px solid var(--fnf-account-line);
  border-radius: var(--fnf-account-radius);
  border-spacing: 0;
  border-collapse: separate;
  overflow: hidden;
  background: #fff;
}

.fnf-account-content table th,
.fnf-account-content table td {
  padding: 14px 15px;
  color: var(--fnf-account-ink);
  border: 0;
  border-bottom: 1px solid var(--fnf-account-line);
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.fnf-account-content table thead th {
  color: var(--fnf-account-muted);
  background: var(--fnf-account-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fnf-account-content table tbody tr:last-child th,
.fnf-account-content table tbody tr:last-child td,
.fnf-account-content table tfoot tr:last-child th,
.fnf-account-content table tfoot tr:last-child td { border-bottom: 0; }

.fnf-account-content table tfoot th,
.fnf-account-content table tfoot td { background: #fff; }

.fnf-account-content table tfoot tr:first-child th,
.fnf-account-content table tfoot tr:first-child td { border-top: 1px solid var(--fnf-account-line); }

.fnf-account-content table .amount,
.fnf-account-content table .woocommerce-Price-amount { font-weight: 700; }

.fnf-account-content table .button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.fnf-account-content .woocommerce-orders-table__cell-order,
.fnf-account-content .woocommerce-orders-table__cell-order a { font-weight: 700; }

.fnf-account-content .woocommerce-orders-table__cell-order a,
.fnf-account-content .woocommerce-MyAccount-paymentMethods a { color: var(--fnf-account-pink-dark); }

.fnf-account-content .woocommerce-orders-table__cell-order-actions,
.fnf-account-content .woocommerce-PaymentMethod--actions { white-space: nowrap; text-align: right; }

.fnf-account-content .woocommerce-orders-table__cell-order-actions .button,
.fnf-account-content .woocommerce-PaymentMethod--actions .button { margin: 2px 0 2px 5px; }

/* Orders get a dedicated, quiet data table. The body prefix deliberately
   outranks Flatsome's legacy account selectors while keeping Woo's native
   links, pagination and action hooks intact. */
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table {
  table-layout: fixed;
  border: 1px solid var(--fnf-account-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(29, 29, 31, .04);
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table thead { display: table-header-group; }
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody { display: table-row-group; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table thead th {
  display: table-cell !important;
  padding: 12px 15px;
  color: var(--fnf-account-muted);
  background: var(--fnf-account-soft) !important;
  border-bottom: 1px solid var(--fnf-account-line);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr {
  display: table-row !important;
  background: #fff;
  transition: background-color .18s ease;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr:hover { background: #fffafd; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody th,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody td {
  display: table-cell !important;
  padding: 13px 15px;
  border-bottom: 1px solid var(--fnf-account-line);
  color: var(--fnf-account-ink);
  font-size: 14px;
  line-height: 1.35;
  vertical-align: middle;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr:last-child th,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr:last-child td { border-bottom: 0; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-number,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-number { width: 27%; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-status,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-status { width: 29%; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-total,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-total {
  width: 44%;
  text-align: right;
  white-space: nowrap;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-total .nobr:empty::before {
  content: "Summe";
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-number a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fnf-account-pink-dark);
  font-weight: 700;
  text-decoration: none;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-number a::after {
  color: var(--fnf-account-pink);
  content: "↗";
  font-size: 14px;
  font-weight: 400;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-status { font-weight: 650; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: #237653; }
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status { color: #2e6787; }
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status { color: #946219; }
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status { color: #a23c57; }

.fnf-account-content .woocommerce-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.fnf-account-content .woocommerce-pagination .button { min-height: 38px; }

.fnf-account-content .woocommerce-order-details,
.fnf-account-content .woocommerce-customer-details { margin-top: 24px; }

.fnf-account-content .woocommerce-order-details__title,
.fnf-account-content .woocommerce-column__title { margin-bottom: 12px; }

.fnf-account-content .woocommerce-table--order-details td:last-child,
.fnf-account-content .woocommerce-table--order-details th:last-child { text-align: right; }

.fnf-account-content .woocommerce-table--order-details .product-name a { font-weight: 650; }

.fnf-account-content .woocommerce-table--order-details .product-quantity {
  color: var(--fnf-account-muted);
  font-size: 13px;
}

.fnf-account-content .woocommerce-customer-details .col2-set,
.fnf-account-content .woocommerce-customer-details .u-columns,
.fnf-account-content .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.fnf-account-content .woocommerce-customer-details .col-1,
.fnf-account-content .woocommerce-customer-details .col-2,
.fnf-account-content .woocommerce-Address {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 18px;
  background: var(--fnf-account-soft);
  border: 1px solid var(--fnf-account-line);
  border-radius: 14px;
}

.fnf-account-content .woocommerce-Address-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.fnf-account-content .woocommerce-Address-title h2 {
  margin: 0;
  font-size: 20px;
}

.fnf-account-content .woocommerce-Address-title .edit { font-size: 13px; font-weight: 650; }

.fnf-account-content address {
  color: var(--fnf-account-muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.65;
}

.fnf-account-content .woocommerce-MyAccount-content fieldset {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--fnf-account-line);
  border-radius: 14px;
}

.fnf-account-content .woocommerce-MyAccount-content fieldset legend {
  padding: 0 7px;
  color: var(--fnf-account-ink);
  font-size: 15px;
  font-weight: 700;
}

.fnf-account-content .woocommerce-MyAccount-content .clear { clear: both; }

.fnf-account-content .woocommerce-MyAccount-content .form-row-first,
.fnf-account-content .woocommerce-MyAccount-content .form-row-last {
  width: calc(50% - 7px);
}

.fnf-account-content .woocommerce-MyAccount-content .form-row-first { float: left; }
.fnf-account-content .woocommerce-MyAccount-content .form-row-last { float: right; }

/* Restore endpoint headings hidden by the legacy child-theme stylesheet. */
body.fnf-headless-account .woocommerce-MyAccount-content p + h2 { display: block; }

.fnf-account-footer {
  border-top: 1px solid var(--fnf-account-line);
  background: var(--fnf-account-soft);
}

.fnf-account-footer__inner {
  width: min(calc(100% - 48px), var(--fnf-account-max));
  margin: 0 auto;
  padding: 18px 0 22px;
}

.fnf-account-footer p {
  margin: 0;
  color: var(--fnf-account-muted);
  font-size: 13px;
  text-align: center;
}

@keyframes fnf-account-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .fnf-account-main { padding-top: 34px; }

  .fnf-account-layout {
    display: block;
  }

  .fnf-account-navigation {
    position: static;
    margin-bottom: 24px;
  }

  .fnf-account-navigation ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fnf-account-navigation__link { min-height: 44px; }
}

@media (max-width: 960px) {
  .fnf-account-content ul.dashboard-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .fnf-account-header__inner,
  .fnf-account-main,
  .fnf-account-footer__inner { width: min(calc(100% - 32px), var(--fnf-account-max)); }

  .fnf-account-header__inner {
    min-height: 64px;
    gap: 10px;
  }

  .fnf-account-brand img { width: 150px; }
  .fnf-account-back,
  .fnf-account-header__status { font-size: 0; }
  .fnf-account-back > span:first-child { font-size: 22px; }
  .fnf-account-status-dot { width: 9px; height: 9px; }

  .fnf-account-main {
    min-height: 72vh;
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .fnf-account-hero { margin-bottom: 24px; }
  .fnf-account-hero h1 { font-size: clamp(36px, 12vw, 52px); }
  .fnf-account-hero > p:last-child { margin-top: 11px; font-size: 16px; }

  .fnf-account-navigation { padding: 10px; }
  .fnf-account-navigation__label { margin: 2px 7px 8px; }
  .fnf-account-navigation__link { padding: 9px 8px; font-size: 13px; }

  .fnf-account-content ul.dashboard-links { grid-template-columns: 1fr; gap: 8px; }
  .fnf-account-content ul.dashboard-links > li > a { min-height: 56px; }

  .fnf-account-guest #customer_login { grid-template-columns: 1fr; gap: 10px; }
  .fnf-account-guest .account-login-inner,
  .fnf-account-guest .account-register-inner,
  .fnf-account-guest .woocommerce-ResetPassword { padding: 20px 16px; }

  .fnf-account-content .woocommerce-customer-details .col2-set,
  .fnf-account-content .woocommerce-customer-details .u-columns,
  .fnf-account-content .woocommerce-Addresses { grid-template-columns: 1fr; }

  .fnf-account-content .woocommerce-MyAccount-content .form-row-first,
  .fnf-account-content .woocommerce-MyAccount-content .form-row-last {
    width: 100%;
    float: none;
  }

  .fnf-account-content table,
  .fnf-account-content table thead,
  .fnf-account-content table tbody,
  .fnf-account-content table tr,
  .fnf-account-content table th,
  .fnf-account-content table td { display: block; }

  .fnf-account-content table {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .fnf-account-content table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .fnf-account-content table tbody tr {
    margin: 0 0 10px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--fnf-account-line);
    border-radius: 14px;
  }

  .fnf-account-content table tbody tr:last-child { border-bottom: 1px solid var(--fnf-account-line); }

  .fnf-account-content table th,
  .fnf-account-content table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fnf-account-line);
    text-align: right;
  }

  .fnf-account-content table tr > :last-child { border-bottom: 0; }

  .fnf-account-content table th::before,
  .fnf-account-content table td::before {
    flex: 0 0 auto;
    color: var(--fnf-account-muted);
    content: attr(data-title);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .06em;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
  }

  .fnf-account-content table th[data-title=""],
  .fnf-account-content table td[data-title=""] { display: block; }

  .fnf-account-content table .woocommerce-orders-table__cell-order-actions,
  .fnf-account-content table .woocommerce-PaymentMethod--actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }

  .fnf-account-content table .woocommerce-orders-table__cell-order-actions::before,
  .fnf-account-content table .woocommerce-PaymentMethod--actions::before { width: 100%; }

  .fnf-account-content table .woocommerce-orders-table__cell-order-actions .button,
  .fnf-account-content table .woocommerce-PaymentMethod--actions .button { margin-left: 6px; }

  .fnf-account-content .woocommerce-table--order-details tbody tr { padding-top: 5px; padding-bottom: 5px; }
  .fnf-account-content .woocommerce-table--order-details tfoot { display: block; }
  .fnf-account-content .woocommerce-table--order-details tfoot tr { display: flex; padding: 0 14px; }
  .fnf-account-content .woocommerce-table--order-details tfoot th,
  .fnf-account-content .woocommerce-table--order-details tfoot td { flex: 1 1 50%; border-bottom: 1px solid var(--fnf-account-line); }
  .fnf-account-content .woocommerce-table--order-details tfoot td { justify-content: flex-end; }
  .fnf-account-content .woocommerce-table--order-details tfoot th::before,
  .fnf-account-content .woocommerce-table--order-details tfoot td::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fnf-account-main,
  .fnf-account-navigation__link,
  .fnf-account-content ul.dashboard-links > li > a,
  .fnf-headless-account .button { animation: none; transition: none; }
}

/* The desktop table rules above intentionally use !important to neutralise
   legacy theme declarations. Restore the compact card layout on phones after
   those rules so orders remain readable at narrow widths. */
@media (max-width: 640px) {
  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table {
    display: block !important;
    table-layout: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: transparent;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody { display: block !important; }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr {
    display: block !important;
    width: 100%;
    margin: 0 0 10px;
    padding: 7px 14px;
    border: 1px solid var(--fnf-account-line);
    border-radius: 14px;
    background: #fff;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody th,
  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody td {
    display: flex !important;
    width: 100% !important;
    min-height: 42px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fnf-account-line);
    text-align: right;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table tbody tr > :last-child { border-bottom: 0; }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-number,
  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-status,
  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-total {
    width: 100% !important;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-total {
    white-space: normal;
  }
}

/* Final account polish: WooCommerce wraps account notices in a nested
   `.message-container`. Keep the wrapper neutral and lay out the action and
   explanatory copy as separate flex items so the button never sits inside or
   pushes through the sentence. */
body.fnf-headless-account .fnf-account-content .message-wrapper {
  margin: 0 0 24px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.fnf-headless-account .fnf-account-content .message-wrapper > .message-container {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 14px 16px !important;
  color: var(--fnf-account-ink) !important;
  background: var(--fnf-account-soft) !important;
  border: 1px solid var(--fnf-account-line) !important;
  border-left: 3px solid var(--fnf-account-pink) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  font-size: 14px;
  line-height: 1.4;
  text-align: left !important;
}

body.fnf-headless-account .fnf-account-content .message-wrapper > .message-container > .button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 15px !important;
  border-radius: 999px !important;
  font-size: 13px;
  line-height: 1.2 !important;
  white-space: nowrap;
}

/* WooCommerce exposes five order columns. Explicit widths prevent the date
   and status cells from being squeezed into each other by legacy theme rules. */
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-number,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-number { width: 18% !important; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-date,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-date { width: 18% !important; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-status,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-status { width: 18% !important; }

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-total,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-total {
  width: 31% !important;
  text-align: right;
  white-space: normal;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__header-order-actions,
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions {
  width: 15% !important;
  text-align: right;
  white-space: normal;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-date {
  color: var(--fnf-account-muted);
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions .button {
  display: inline-flex;
  min-height: 34px;
  margin: 3px 0 3px 5px;
  padding: 7px 11px;
  color: var(--fnf-account-pink-dark) !important;
  background: #fff !important;
  border: 1px solid rgba(239, 71, 119, .42) !important;
  border-radius: 999px !important;
  font-size: 12px;
  white-space: nowrap;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions .button.pay {
  color: #fff !important;
  background: var(--fnf-account-pink) !important;
  border-color: var(--fnf-account-pink) !important;
}

@media (max-width: 640px) {
  body.fnf-headless-account .fnf-account-content .message-wrapper > .message-container {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px !important;
  }

  body.fnf-headless-account .fnf-account-content .message-wrapper > .message-container > .button {
    align-self: flex-start;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions .button {
    margin-left: 5px;
  }
}

/* Keep order actions genuinely compact. The theme's generic button rule can
   otherwise add generous vertical padding, which makes rows with several
   actions unnecessarily tall. */
body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin: 0 0 0 5px !important;
  padding: 0 10px !important;
  border-width: 1px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

@media (max-width: 640px) {
  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  body.fnf-headless-account .fnf-account-content .woocommerce-orders-table__cell-order-actions .button {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }
}
