/* ================================
   Client Area Widget
   ================================ */

.client-area-widget {
  width: 100%;
}

.client-area-title {
  margin: 0 0 10px;
  color: #333333;
}

.client-area-section-title,
.client-area-edit-title {
  margin: 0 0 18px !important;
  color: #443C35 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.client-area-intro {
  margin: 0 0 24px;
  opacity: 0.8;
}

/* ---- Login ---- */
.client-area-login {
  max-width: 480px;
  margin: 0 auto;
}

.client-area-login .client-area-title,
.client-area-login .client-area-intro {
  text-align: center;
}

.client-area-login form.woocommerce-form-login,
.client-area-login form.login,
.client-area-login form.woocommerce-ResetPassword {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: none;
  border-radius: 24px;
  padding: 40px;
  background: #F0F2DC;
}

.client-area-reset-intro {
  margin: 0;
  color: #443C35;
  opacity: 0.85;
}

/* Normalize WooCommerce default row margins inside our cards so the card
   padding + flex gap control the spacing evenly (no big empty gaps). */
.client-area-login form .form-row,
.client-area-login form .woocommerce-form-row,
.client-area-login form p {
  margin: 0 !important;
}

.client-area-login form > p:empty,
.client-area-login form .clear {
  display: none !important;
}

/* Hide the stray empty paragraph WooCommerce/wpautop leaves at the end of the
   reset form so the card spacing matches the login card. */
.client-area-reset form > p:last-child:not(.form-row):not(.woocommerce-form-row) {
  display: none !important;
}

/* Force the underline input style on account pages (WooCommerce input styles
   otherwise render a boxed field). */
.woocommerce .client-area-login input[type="text"],
.woocommerce .client-area-login input[type="email"],
.woocommerce .client-area-login input[type="password"],
.client-area-login input.input-text,
.client-area-login form.woocommerce-ResetPassword input[type="text"] {
  width: 100% !important;
  border: none !important;
  border-bottom: 1px solid #443C35 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 8px 30px 8px 0 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  letter-spacing: 0.32px !important;
  color: #443C35 !important;
  box-shadow: none !important;
}

.woocommerce .client-area-login input:focus,
.client-area-login input.input-text:focus {
  border-bottom-color: #C1002B !important;
}

.client-area-login .woocommerce-form-row,
.client-area-login p.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.client-area-login label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #443C35;
}

.client-area-login .required {
  color: #C1002B;
  border: none;
}

.client-area-login input[type="text"],
.client-area-login input[type="password"],
.client-area-login input[type="email"] {
  width: 100%;
  border: none;
  border-bottom: 1px solid #443C35;
  border-radius: 0;
  padding: 8px 30px 8px 0;
  background: none;
  background-color: transparent;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.32px;
  line-height: 150%;
  color: #443C35;
  outline: none;
  box-shadow: none;
}

.client-area-login input[type="text"]::placeholder,
.client-area-login input[type="password"]::placeholder,
.client-area-login input[type="email"]::placeholder {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.32px;
  color: #B4B795;
}

.client-area-login input[type="text"]:focus,
.client-area-login input[type="password"]:focus,
.client-area-login input[type="email"]:focus {
  border-bottom-color: #C1002B;
  box-shadow: none;
  outline: none;
}

.client-area-login .password-input {
  display: block;
  position: relative;
}

.client-area-login .woocommerce-form-login__rememberme {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.client-area-login .woocommerce-form-login__rememberme input {
  width: auto;
}

/* Submit button — matches the site red buttons with the arrow box. */
.client-area-login .woocommerce-form-login__submit {
  position: relative;
  align-self: flex-start;
  margin: 6px 42px 0 0;
  padding: 10px 18px !important;
  border: none !important;
  border-radius: 4px !important;
  background-color: #C1002B !important;
  color: #F5F6EE !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  letter-spacing: 0.32px !important;
  text-transform: uppercase !important;
  cursor: pointer;
}

.client-area-login .woocommerce-form-login__submit::after {
  position: absolute;
  content: "";
  background-image: url('data:image/svg+xml,<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.75 6.75H16.75M16.75 6.75L10.75 0.75M16.75 6.75L10.75 12.75" stroke="%23F5F6EE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>');
  background-size: 16px;
  background-color: #C1002B;
  background-position: center center;
  background-repeat: no-repeat;
  top: -0.5px;
  bottom: -0.5px;
  left: 100%;
  width: 36px;
  min-width: 36px;
  border-radius: 4px;
  z-index: 9;
}

.client-area-login .lostpassword,
.client-area-login .lost_password,
.client-area-lostpassword {
  margin-top: 8px;
  text-align: center;
}

.client-area-login .lost_password a,
.client-area-lostpassword a {
  color: #443C35;
  text-decoration: underline;
}

/* ---- Orders ---- */
.client-area-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.client-area-greeting {
  margin: 0;
  opacity: 0.7;
}

.client-area-logout {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 18px;
  border: 1px solid #443C35;
  border-radius: 4px;
  background: transparent;
  color: #443C35;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.client-area-logout:hover,
.client-area-logout:focus {
  background: #C1002B;
  border-color: #C1002B;
  color: #F5F6EE;
}

.client-area-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #F0F2DC;
  border-radius: 24px;
  padding: 16px 40px;
}

.client-area-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 0;
  border: none;
  border-bottom: 1px solid #DDDFD1;
  border-radius: 0;
  background: transparent;
}

.client-area-order:last-child {
  border-bottom: none;
}

.client-area-order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.client-area-order-number {
  font-weight: 600;
  font-size: 18px;
}

.client-area-order-date {
  opacity: 0.7;
  font-size: 14px;
}

.client-area-order-status {
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #EDEFE4;
  color: #443C35;
}

.client-area-order-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  opacity: 0.85;
  flex: 1;
}

.client-area-order-view {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 42px;
  padding: 10px 18px;
  border-radius: 4px;
  background-color: #C1002B;
  text-decoration: none;
}

.client-area-order-view .elementor-button-text {
  color: #F5F6EE;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  line-height: 1.2;
}

.client-area-order-view::after {
  position: absolute;
  content: "";
  background-image: url('data:image/svg+xml,<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.75 6.75H16.75M16.75 6.75L10.75 0.75M16.75 6.75L10.75 12.75" stroke="%23F5F6EE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>');
  background-size: 16px;
  background-color: #C1002B;
  background-position: center center;
  background-repeat: no-repeat;
  top: -0.5px;
  bottom: -0.5px;
  left: 100%;
  width: 36px;
  min-width: 36px;
  border-radius: 4px;
  z-index: 9;
}

.client-area-pdf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 4px;
  color: #C1002B;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-area-pdf:hover,
.client-area-pdf:focus-visible {
  color: #8F0020;
}

.client-area-pdf svg {
  flex-shrink: 0;
}

.client-order-summary-head .client-area-pdf {
  margin-top: 16px;
}

.client-area-empty {
  padding: 40px;
  background: #F0F2DC;
  border: none;
  border-radius: 24px;
  text-align: center;
  opacity: 0.85;
}

@media (max-width: 600px) {
  .client-area-order {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Order detail (view-order) ---- */
.client-order-detail {
  max-width: none;
  overflow: hidden;
  border-radius: 8px;
  background: #F5F6EE;
  color: #443C35;
}

.client-order-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 42px 48px;
  background: #443C35;
  color: #F5F6EE;
}

.client-order-detail-head h2 {
  margin: 4px 0 0;
  color: inherit;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.client-order-detail-date {
  margin: 12px 0 0;
  color: #D8D7C5;
  font-size: 15px;
}

.client-order-eyebrow {
  display: block;
  color: #C1002B;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.client-order-detail-head .client-order-eyebrow {
  color: #EAD4B5;
}

.client-order-status {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #857B72;
  border-radius: 4px;
  color: #F5F6EE;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
}

.client-order-summary {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr);
  gap: 40px;
  padding: 34px 48px;
  border-bottom: 1px solid #D8D7C5;
  background: #F0F2DC;
}

.client-order-summary-head > span {
  font-size: 20px;
  font-weight: 600;
}

.client-order-summary-head p {
  max-width: 260px;
  margin: 8px 0 0;
  color: #857B72;
  font-size: 14px;
}

.client-order-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.client-order-detail-meta > div {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #B4B795;
}

.client-order-detail-meta dt {
  margin-bottom: 5px;
  color: #857B72;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-order-detail-meta dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.client-order-detail-meta .client-order-note {
  grid-column: 1 / -1;
}

.client-order-products {
  padding: 42px 48px 36px;
}

.client-order-products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.client-order-detail-subtitle {
  margin: 5px 0 0;
  color: #443C35;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.client-order-product-count {
  color: #857B72;
  font-size: 14px;
}

.client-order-detail-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.client-order-detail-item {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid #D8D7C5;
}

.client-order-detail-item:last-child {
  border-bottom: 1px solid #D8D7C5;
}

.client-order-detail-item .item-thumb {
  width: 142px;
  height: 142px;
  margin: 0;
}

.client-order-detail-item .item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0;
  border: 1px solid #443C35;
  border-radius: 8px;
}

.client-order-detail-item .item-content {
  min-width: 0;
}

.client-order-detail-item .item-collection {
  display: block;
  margin-bottom: 4px;
  color: #C1002B;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-order-detail-item .item-name {
  margin: 0;
  color: #443C35;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

.client-order-detail-item .item-sku,
.client-order-detail-item .item-units {
  display: block;
  margin-top: 7px;
  color: #857B72;
  font-size: 13px;
}

.client-order-detail-item .item-units {
  margin-top: 2px;
}

.client-order-detail-item .item-qty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 72px;
  color: #857B72;
  font-size: 11px;
  text-transform: uppercase;
}

.client-order-detail-item .item-qty strong {
  color: #443C35;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.client-order-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 48px 40px;
  color: #C1002B;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .client-order-detail-head {
    align-items: flex-start;
    padding: 30px 24px;
  }

  .client-order-status {
    margin-top: 2px;
  }

  .client-order-summary {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 24px;
  }

  .client-order-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-order-products {
    padding: 32px 24px 28px;
  }

  .client-order-detail-item {
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 16px;
  }

  .client-order-detail-item .item-thumb {
    width: 92px;
    height: 92px;
  }

  .client-order-detail-item .item-name {
    font-size: 17px;
  }

  .client-order-back {
    margin: 0 24px 30px;
  }
}

@media (max-width: 520px) {
  .client-order-detail-head,
  .client-order-products-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-order-detail-meta {
    grid-template-columns: 1fr;
  }

  .client-order-detail-meta .client-order-note {
    grid-column: auto;
  }

  .client-order-detail-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .client-order-detail-item .item-thumb {
    width: 76px;
    height: 76px;
  }

  .client-order-detail-item .item-qty {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    gap: 7px;
  }

  .client-order-detail-item .item-qty strong {
    font-size: 16px;
  }
}

/* ---- Edit account ---- */
.client-area-edit {
  margin-top: 0;
  padding: 40px;
  border: none;
  border-radius: 24px;
  background: #F0F2DC;
  max-width: none;
}

.client-area-edit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.client-area-edit-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.client-area-edit-form label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #443C35;
}

.client-area-edit-form input[type="text"],
.client-area-edit-form input[type="email"],
.client-area-edit-form input[type="password"] {
  width: 100%;
  border: none;
  border-bottom: 1px solid #443C35;
  border-radius: 0;
  padding: 8px 30px 8px 0;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.32px;
  color: #443C35;
  outline: none;
  box-shadow: none;
}

.client-area-edit-form input::placeholder {
  color: #B4B795;
  font-weight: 400;
}

.client-area-edit-form input:focus {
  border-bottom-color: #C1002B;
}

.client-area-edit-form .woocommerce-form-login__submit {
  position: relative;
  align-self: flex-start;
  margin: 6px 42px 0 0;
  padding: 10px 18px !important;
  border: none !important;
  border-radius: 4px !important;
  background-color: #C1002B !important;
  color: #F5F6EE !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  letter-spacing: 0.32px !important;
  text-transform: uppercase !important;
  cursor: pointer;
}

.client-area-edit-form .woocommerce-form-login__submit::after {
  position: absolute;
  content: "";
  background-image: url('data:image/svg+xml,<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M0.75 6.75H16.75M16.75 6.75L10.75 0.75M16.75 6.75L10.75 12.75" stroke="%23F5F6EE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>');
  background-size: 16px;
  background-color: #C1002B;
  background-position: center center;
  background-repeat: no-repeat;
  top: -0.5px;
  bottom: -0.5px;
  left: 100%;
  width: 36px;
  min-width: 36px;
  border-radius: 4px;
  z-index: 9;
}

/* ---- Notices ---- */
.client-area-notice {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 15px;
}

.client-area-notice--success {
  background: #E6F2E1;
  color: #2f6b2f;
}

.client-area-notice--error {
  background: #F7E1E4;
  color: #C1002B;
}

.client-area-notice p {
  margin: 0;
}


/* ---- Documents from the ERP (KS-ERP): statuses, orders and invoices ---- */
.client-area-order-status--l,
.client-area-order-status--p {
  background: #EAD4B5;
}

.client-area-order-status--m,
.client-area-order-status--t {
  background: #DDE8D0;
  color: #2F5A2F;
}

.client-area-order-status--n {
  background: #E4E2DA;
  color: #857B72;
}

.client-area-order-status--changed {
  background: transparent;
  border: 1px solid #C1002B;
  color: #C1002B;
}

.client-area-order-total {
  font-weight: 600;
}

.client-order-erp {
  background: #F5F6EE;
}

.client-order-erp-notice {
  padding: 24px 48px 0;
}

@media (max-width: 767px) {
  .client-order-erp-notice {
    padding: 20px 24px 0;
  }
}


/* ---- Tabs, status filters and the "waiting for your reply" banner ----
   Without client-area.js every panel is shown, one below the other, with its own title. */
.client-area-panel + .client-area-panel {
  margin-top: 40px;
}

.client-area-tablist,
.client-area-filters {
  display: none;
}

.client-area-panel[hidden],
.client-area-others[hidden],
.client-area-order[hidden] {
  display: none !important;
}

.client-area-tabs.is-ready .client-area-panel {
  margin-top: 0;
}

.client-area-tabs.is-ready .client-area-panel-title {
  display: none;
}

.client-area-tabs.is-ready .client-area-tablist {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid #D8D7C5;
  overflow-x: auto;
  scrollbar-width: none;
}

.client-area-tabs.is-ready .client-area-tablist::-webkit-scrollbar {
  display: none;
}

.client-area-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin: 0 0 -1px !important;
  padding: 12px 18px !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #857B72 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.client-area-tab:hover {
  color: #443C35 !important;
}

.client-area-tab.is-active {
  color: #443C35 !important;
  border-bottom-color: #C1002B !important;
}

.client-area-tab:focus {
  outline: none;
}

.client-area-tab:focus-visible {
  outline: 2px solid #C1002B;
  outline-offset: -4px;
}

.client-area-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: #EDEFE4;
  color: #443C35;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.client-area-tab.is-active .client-area-tab-count {
  background: #C1002B;
  color: #F5F6EE;
}

.client-area-tabs.is-ready .client-area-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.client-area-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 7px 14px !important;
  border: 1px solid #B4B795 !important;
  border-radius: 20px !important;
  background: transparent !important;
  color: #443C35 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.client-area-filter span {
  opacity: 0.6;
}

.client-area-filter:hover {
  border-color: #443C35 !important;
}

.client-area-filter.is-active {
  border-color: #443C35 !important;
  background: #443C35 !important;
  color: #F5F6EE !important;
}

.client-area-filter:focus {
  outline: none;
}

.client-area-filter:focus-visible {
  outline: 2px solid #C1002B;
  outline-offset: 2px;
}

.client-area-filter--reply::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C1002B;
}

.client-area-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 24px;
  padding: 16px 24px;
  border-radius: 16px;
  background: #443C35;
  color: #F5F6EE;
}

.client-area-attention p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: 500;
}

.client-area-attention p::before {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #EAD4B5;
  animation: client-area-pulse 2s ease-in-out infinite;
}

.client-area-attention-link {
  color: #F5F6EE !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.client-area-attention-link:hover {
  color: #EAD4B5 !important;
}

.client-area-tabs.is-ready .client-area-panel.is-active,
.client-area-order.is-entering {
  animation: client-area-enter 0.3s ease both;
}

@keyframes client-area-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes client-area-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(234, 212, 181, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(234, 212, 181, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-area-tabs.is-ready .client-area-panel.is-active,
  .client-area-order.is-entering,
  .client-area-attention p::before {
    animation: none;
  }
}

.client-area-order.is-last-visible {
  border-bottom: none;
}

/* On phones the tabs share the row, each with its own line. */
@media (max-width: 600px) {
  .client-area-tabs.is-ready .client-area-tablist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    border-bottom: none;
    overflow: visible;
  }

  .client-area-tab {
    justify-content: center;
    margin: 0 !important;
    padding: 12px 6px !important;
    border-bottom: 1px solid #D8D7C5 !important;
    font-size: 14px !important;
  }

  .client-area-tab.is-active {
    border-bottom: 2px solid #C1002B !important;
  }

  .client-area-attention {
    padding: 16px 20px;
  }
}

/* ---- Answering a quote / writing about a request ---- */
.client-area-order-status--answered {
  background: #DCE3EA;
  color: #34495E;
}

.client-area-order-source {
  color: #857B72;
}

/* Office quotes: the form opens under the card. */
.client-area-reply-inline {
  flex: 1 1 100%;
  align-self: stretch;
  width: 100%;
}

.client-area-reply-inline > summary,
.client-area-reply-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #C1002B;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  list-style: none;
}

.client-area-reply-inline > summary::-webkit-details-marker,
.client-area-reply-more > summary::-webkit-details-marker {
  display: none;
}

.client-area-reply-inline > summary::after,
.client-area-reply-more > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.client-area-reply-inline[open] > summary::after,
.client-area-reply-more[open] > summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.client-area-reply-inline > .client-area-reply {
  margin-top: 18px;
  padding: 24px;
  border-radius: 16px;
  background: #F5F6EE;
}

.client-area-reply-more > summary {
  margin-bottom: 4px;
}

.client-area-reply-more[open] > .client-area-reply-form {
  margin-top: 18px;
}

.client-area-reply .client-area-notice {
  margin-bottom: 18px;
}

/* Messages already sent. */
.client-area-reply-history {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-area-reply-history li {
  padding: 12px 0 12px 16px;
  border-left: 2px solid #B4B795;
}

.client-area-reply-date {
  display: block;
  color: #857B72;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-area-reply-answer {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
}

.client-area-reply-answer--accept {
  color: #2F5A2F;
}

.client-area-reply-answer--decline {
  color: #857B72;
}

.client-area-reply-history p {
  margin: 6px 0 0;
  font-size: 15px;
  white-space: normal;
}

/* The three answers, as large toggles. */
.client-area-reply-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: none;
}

.client-area-reply-choices legend {
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  color: #443C35;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.client-area-edit-form .client-area-reply-choice {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.client-area-reply-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-area-reply-choice span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #B4B795;
  border-radius: 999px;
  background: #F5F6EE;
  color: #443C35;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.client-area-reply-choice span::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid #857B72;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.client-area-reply-choice:hover span {
  border-color: #443C35;
}

.client-area-reply-choice input:focus-visible + span {
  outline: 2px solid #C1002B;
  outline-offset: 2px;
}

.client-area-reply-choice input:checked + span {
  border-color: #443C35;
  background: #443C35;
  color: #F5F6EE;
}

.client-area-reply-choice input:checked + span::before {
  border: 4px solid #F5F6EE;
  background: #C1002B;
}

.client-area-edit-form textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1px solid #B4B795;
  border-radius: 8px;
  background: #F5F6EE;
  color: #443C35;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  box-shadow: none;
  outline: none;
  resize: vertical;
}

.client-area-edit-form textarea::placeholder {
  color: #A39C93;
}

.client-area-edit-form textarea:focus {
  border-color: #C1002B;
}

.client-area-reply-form .woocommerce-form-login__submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Detail page: the reply section uses the summary layout (title on the left, form on the right). */
.client-order-reply {
  background: #F5F6EE;
}

.client-order-reply .client-order-summary-head p {
  max-width: 280px;
}

@media (max-width: 600px) {
  .client-area-reply-inline > .client-area-reply {
    padding: 18px 16px;
  }

  .client-area-reply-choices {
    flex-direction: column;
    align-items: stretch;
  }

  .client-area-reply-choice span {
    width: 100%;
  }
}

/* ---- The three answers as buttons, on the card and at the top of the detail page ---- */
.client-area-quick-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.client-area-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid #443C35;
  border-radius: 4px;
  background: transparent;
  color: #443C35;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.client-area-quick-action:hover,
.client-area-quick-action[aria-pressed="true"] {
  background: #443C35;
  color: #F5F6EE;
}

.client-area-quick-action--accept {
  border-color: #C1002B;
  background: #C1002B;
  color: #F5F6EE;
}

.client-area-quick-action--accept:hover,
.client-area-quick-action--accept[aria-pressed="true"] {
  border-color: #9C0023;
  background: #9C0023;
  color: #F5F6EE;
}

.client-area-quick-action--decline {
  border-color: transparent;
  color: #857B72;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-area-quick-action--decline:hover,
.client-area-quick-action--decline[aria-pressed="true"] {
  border-color: #857B72;
  background: transparent;
  color: #443C35;
}

.client-area-quick-action:focus-visible {
  outline: 2px solid #C1002B;
  outline-offset: 2px;
}

/* With JavaScript the buttons open the form: no "Responder" toggle, and nothing while closed. */
.client-area-js .client-area-reply-inline.has-quick-actions > summary {
  display: none;
}

.client-area-js .client-area-reply-inline.has-quick-actions:not([open]) {
  display: none;
}

.client-area-js .client-area-reply-inline.has-quick-actions > .client-area-reply {
  margin-top: 0;
}

/* On a card the pressed button already shows the answer chosen: no second set of choices. */
.client-area-js .client-area-reply-inline.has-quick-actions .client-area-reply-choices {
  display: none;
}

.client-area-reply-inline > summary:focus:not(:focus-visible),
.client-area-reply-more > summary:focus:not(:focus-visible) {
  outline: none;
}

.client-area-reply-buttons {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px !important;
}

.client-area-reply-buttons .woocommerce-form-login__submit {
  margin-top: 0 !important;
}

.client-area-reply-cancel {
  padding: 6px 0 !important;
  border: none !important;
  background: transparent !important;
  color: #857B72 !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px !important;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.client-area-reply-cancel:hover {
  color: #443C35 !important;
}

/* Detail page: the answers in the dark header, under the status. */
.client-order-detail-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.client-area-quick-actions--head {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.client-area-quick-actions--head .client-area-quick-action {
  border-color: #857B72;
  color: #F5F6EE;
}

.client-area-quick-actions--head .client-area-quick-action:hover,
.client-area-quick-actions--head .client-area-quick-action[aria-pressed="true"] {
  border-color: #F5F6EE;
  background: #F5F6EE;
  color: #443C35;
}

.client-area-quick-actions--head .client-area-quick-action--accept {
  border-color: #C1002B;
  background: #C1002B;
}

.client-area-quick-actions--head .client-area-quick-action--accept:hover,
.client-area-quick-actions--head .client-area-quick-action--accept[aria-pressed="true"] {
  border-color: #E0123F;
  background: #E0123F;
  color: #F5F6EE;
}

.client-area-quick-actions--head .client-area-quick-action--decline {
  border-color: transparent;
  color: #D8D7C5;
}

.client-area-quick-actions--head .client-area-quick-action--decline:hover,
.client-area-quick-actions--head .client-area-quick-action--decline[aria-pressed="true"] {
  border-color: #857B72;
  background: transparent;
  color: #F5F6EE;
}

@media (max-width: 767px) {
  .client-order-detail-head-side {
    align-items: flex-start;
  }

  .client-area-quick-actions--head {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .client-area-quick-actions {
    width: 100%;
  }

  .client-area-quick-action {
    padding: 8px 12px;
    white-space: nowrap;
  }

  .client-area-quick-action--accept,
  .client-area-quick-action--changes {
    flex: 1 1 0;
  }
}

/* ---- The life of a quote: Presupuesto -> Pedido -> Factura ----
   A row of steps inside each quote card and at the top of the detail page. Every step that already exists
   shows its number, its dates and its PDF. The ones still to come are dimmed. */
.client-area-lifecycle {
  flex: 1 1 100%;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  width: 100%;
  margin: 0;
  padding: 18px 24px;
  border-radius: 16px;
  background: #F5F6EE;
  list-style: none;
  box-sizing: border-box;
}

.client-area-lifecycle--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* A quote not accepted: only its own step, there is nothing after it. */
.client-area-lifecycle--1 {
  grid-template-columns: minmax(0, 1fr);
}

.client-area-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 22px 0 0;
  color: #443C35;
  font-size: 14px;
  line-height: 1.4;
}

/* The dot of the step and the line to the next one. */
.client-area-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border: 1.5px solid #B4B795;
  border-radius: 50%;
  background: #F5F6EE;
  box-sizing: border-box;
}

.client-area-step::after {
  content: "";
  position: absolute;
  top: 5.5px;
  left: 18px;
  right: -18px;
  height: 1px;
  background: #D8D7C5;
}

.client-area-step:last-child::after {
  display: none;
}

/* Like a progress bar: the steps reached and the line between them fill in red. The step where the quote
   is now keeps a halo, the ones still to come stay grey. */
.client-area-step--done::before {
  border-color: #C1002B;
  background: #C1002B;
}

.client-area-step--done::after {
  height: 2px;
  margin-top: -0.5px;
  background: #C1002B;
}

/* Where the quote is now: orange, with a halo. */
.client-area-step--current::before {
  border-color: #E07A1F;
  background: #E07A1F;
  box-shadow: 0 0 0 3px rgba(224, 122, 31, 0.2);
}

.client-area-step--stopped::before {
  border-color: #B4B795;
  background: #B4B795;
}

.client-area-step-label {
  color: #443C35;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.client-area-step--pending .client-area-step-label {
  color: #A39C93;
}

.client-area-step-document {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Several documents in a step (an order with two invoices). */
.client-area-step-document + .client-area-step-document {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #DDDFD1;
}

.client-area-step-document > span {
  color: #6B625A;
}

.client-area-step-reference {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.client-area-step-note {
  color: #857B72;
}

.client-area-step .client-area-order-total {
  font-weight: 500;
}

/* Detail page: the steps in their own band, under the header. */
.client-order-lifecycle {
  padding: 28px 48px;
  border-bottom: 1px solid #D8D7C5;
  background: #F0F2DC;
}

/* "Otros documentos": orders and invoices that come from no quote, below the quotes. */
.client-area-others {
  margin-top: 40px;
}

.client-area-others .client-area-section-title {
  margin-bottom: 6px !important;
}

.client-area-others-intro {
  margin: 0 0 18px;
  color: #857B72;
  font-size: 14px;
}

@media (max-width: 767px) {
  .client-order-lifecycle {
    padding: 24px;
  }
}

/* On phones the steps go one below the other, with the line down the left side. */
@media (max-width: 600px) {
  .client-area-lifecycle,
  .client-area-lifecycle--2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 16px;
  }

  .client-area-step {
    padding: 0 0 18px 26px;
  }

  .client-area-step:last-child {
    padding-bottom: 0;
  }

  .client-area-step::before {
    top: 1px;
  }

  .client-area-step::after {
    top: 17px;
    bottom: 3px;
    left: 5.5px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .client-area-step--done::after {
    width: 2px;
    margin: 0 0 0 -0.5px;
  }

  .client-area-others {
    margin-top: 32px;
  }
}
