/* Account pages (login, register, forgot/reset, profile, edit, change
   password, orders, order detail) — companion to form-pages.css, which
   MUST load first (cards, fields, buttons, success card come from there).
   Hand-authored plain CSS (no SCSS source), same as form-pages.css.
   Loaded via {layout:set:append name="page_css_blocking"} in account.group.

   Vocabulary:
     main.cs-form-page.cs-account   page scope (adds password inputs + Visitor errors to the form-pages reset)
     .cs-account-auth               narrow single card (login / register / forgot / reset)
     .cs-account-nav                pill nav under the header on logged-in pages
     .cs-account-hello              greeting strip on My Account
     .cs-account-tiles              action tile grid on My Account
     .cs-orders                     order history list (cards, not a table)
     .cs-invoice                    order detail: address grid, line items, totals
     .cs-form-links                 "Forgot password? · Create account" footer line
     .cs-check                      native checkbox row (mailing-list opt-in; no JS)
*/

/* ============================================================
   Field additions — password inputs + Visitor inline errors
   ============================================================ */
main.cs-account input[type="password"] {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  height: 44px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 6px !important;
  background: #fff !important;
  font-family: "Gotham", Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  color: #4e4f4b !important;
  min-width: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
main.cs-account input[type="password"]:focus {
  outline: none;
  border-color: #abc578 !important;
  box-shadow: 0 0 0 3px rgba(171, 197, 120, 0.18) !important;
}
/* Visitor error_delimiters='<p class="error">|</p>' */
main.cs-account .form-group p.error,
main.cs-account .cs-form-error {
  display: block;
  margin: 6px 0 0;
  padding: 0;
  background: none;
  border: 0;
  color: #b53939;
  font-family: "Gotham", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
main.cs-account .form-group:has(p.error) input {
  border-color: #d04949 !important;
  box-shadow: 0 0 0 3px rgba(208, 73, 73, 0.12) !important;
}
/* Form-level error (Visitor {error:login} etc. rendered outside a field) */
main.cs-account .cs-form-error {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid rgba(208, 73, 73, 0.35);
  border-radius: 8px;
  background: #fff7f7;
}
main.cs-account .cs-form-error:empty { display: none; }

/* ============================================================
   Auth card (login / register / forgot / reset)
   ============================================================ */
.cs-account-auth {
  max-width: 520px;
  margin: 0 auto;
}
.cs-account-auth--wide { max-width: 640px; }
.cs-form-links {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: #6b6c68;
}
.cs-form-links a {
  color: #63773a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cs-form-links a:hover { color: #4e4f4b; }
.cs-form-links__sep { margin: 0 8px; color: rgba(78, 79, 75, 0.35); }

/* Native checkbox row (no JS dependency, JCF is not loaded here) */
.cs-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}
main.cs-account .cs-check {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: #4e4f4b;
}
main.cs-account .cs-check input[type="checkbox"] {
  position: static !important;   /* main.css: position:absolute; margin-left:-20px */
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 2px 0 0 !important;
  opacity: 1 !important;
  -webkit-appearance: checkbox !important;  /* legacy sheet sets appearance:none on inputs */
  appearance: auto !important;
  accent-color: #abc578;
  cursor: pointer;
}

/* ============================================================
   Account nav (logged-in pages)
   ============================================================ */
.cs-account-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.cs-account-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #e5ddd0;
  background: #f7f4ee;
  color: #4e4f4b;
  font-family: "Gotham", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.cs-account-nav a:hover,
.cs-account-nav a:focus-visible {
  background: #fff;
  border-color: #abc578;
  color: #63773a;
  outline: none;
}
.cs-account-nav a[aria-current="page"] {
  background: #63773a;
  border-color: #63773a;
  color: #fff;
}
.cs-account-nav a.is-logout { background: transparent; border-color: transparent; color: #6b6c68; }
.cs-account-nav a.is-logout:hover { color: #b53939; border-color: rgba(181, 57, 57, 0.35); background: #fff; }
.cs-account-nav svg { width: 15px; height: 15px; }

/* ============================================================
   My Account
   ============================================================ */
.cs-account-hello {
  text-align: center;
  margin: 0 auto 24px;
  max-width: 56ch;
}
.cs-account-hello__name {
  margin: 0 0 6px;
  font-family: "SinaNovaRegular", Times, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  color: #4e4f4b;
  text-transform: none;
  letter-spacing: 0;
}
.cs-account-hello__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #6b6c68;
}
.cs-account-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-account-tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  padding: 22px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  color: #4e4f4b;
  text-decoration: none;
  transition: border-color 200ms ease, box-shadow 250ms cubic-bezier(0.165, 0.84, 0.44, 1), transform 200ms ease;
}
.cs-account-tile:hover,
.cs-account-tile:focus-visible {
  border-color: #abc578;
  box-shadow: 0 10px 32px -12px rgba(99, 119, 58, 0.25);
  transform: translateY(-2px);
  color: #4e4f4b;
  text-decoration: none;
  outline: none;
}
.cs-account-tile__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f7f4ee;
  color: #63773a;
  display: grid;
  place-items: center;
}
.cs-account-tile__icon svg { width: 18px; height: 18px; }
.cs-account-tile__title {
  font-family: "SinaNovaRegular", Times, serif;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 400;
}
.cs-account-tile__sub {
  font-size: 13px;
  line-height: 1.5;
  color: #6b6c68;
}
.cs-account-tile--logout { background: #fbfaf7; }
.cs-account-tile--logout .cs-account-tile__icon { color: #b53939; }
.cs-account-tile--logout:hover { border-color: rgba(181, 57, 57, 0.4); box-shadow: 0 10px 32px -12px rgba(181, 57, 57, 0.2); }

/* ============================================================
   Orders list
   ============================================================ */
.cs-orders {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-order {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  transition: border-color 200ms ease, box-shadow 250ms cubic-bezier(0.165, 0.84, 0.44, 1);
}
.cs-order:hover { border-color: #abc578; box-shadow: 0 10px 32px -12px rgba(99, 119, 58, 0.2); }
@media (min-width: 720px) {
  .cs-order { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; align-items: start; }
}
.cs-order__title {
  margin: 0 0 2px;
  font-family: "SinaNovaRegular", Times, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  color: #4e4f4b;
}
.cs-order__title a { color: inherit; text-decoration: none; }
.cs-order__title a:hover { color: #63773a; }
.cs-order__date {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6c68;
}
.cs-order__items {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
}
.cs-order__items li { padding: 4px 0; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.cs-order__items li:first-child { border-top: 0; padding-top: 0; }
.cs-order__qty { color: #6b6c68; }
.cs-order__sku { display: block; font-size: 12px; color: #6b6c68; }
.cs-order__total { text-align: left; }
@media (min-width: 720px) { .cs-order__total { text-align: right; } }
.cs-order__total-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6c68;
}
.cs-order__total-amt {
  display: block;
  font-family: "SinaNovaRegular", Times, serif;
  font-size: 24px;
  line-height: 1.1;
  color: #4e4f4b;
}
.cs-order__cta { margin-top: 10px; }
.cs-order__cta .cs-form-btn { padding: 10px 18px; font-size: 12px; }
.cs-orders-empty {
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  color: #6b6c68;
  font-size: 15px;
  line-height: 1.6;
}
.cs-orders-empty p { margin: 0 0 16px; }

/* ============================================================
   Order detail (invoice)
   ============================================================ */
.cs-invoice { display: grid; gap: 18px; }
.cs-invoice__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 720px) { .cs-invoice__meta { grid-template-columns: 1fr 1fr 1fr; } }
.cs-invoice__block { font-size: 14px; line-height: 1.55; }
.cs-invoice__label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6c68;
}
.cs-invoice__block address { font-style: normal; margin: 0; }

.cs-invoice__lines { width: 100%; }
.cs-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 14px;
  line-height: 1.5;
}
.cs-line:first-child { border-top: 0; padding-top: 0; }
.cs-line__name { font-size: 16px; }
.cs-line__name a { color: #4e4f4b; text-decoration: none; }
.cs-line__name a:hover { color: #63773a; text-decoration: underline; }
.cs-line__sku { display: block; font-size: 12px; color: #6b6c68; margin-top: 2px; }
.cs-line__opts {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
  color: #6b6c68;
}
.cs-line__amt { text-align: right; white-space: nowrap; }
.cs-line__amt strong { display: block; font-size: 16px; font-weight: 500; }
.cs-line__amt small { display: block; font-size: 12px; color: #6b6c68; }

.cs-invoice__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
@media (min-width: 720px) { .cs-invoice__foot { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; } }
.cs-invoice__notes {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(78, 79, 75, 0.8);
}
.cs-invoice__notes p { margin: 0; }
.cs-totals {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cs-totals th,
.cs-totals td { padding: 7px 0; text-align: right; border: 0; }
.cs-totals th { font-weight: 400; color: #6b6c68; text-align: left; letter-spacing: 0.04em; }
.cs-totals .is-discount td { color: #b53939; }
.cs-totals .is-total th,
.cs-totals .is-total td {
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-family: "SinaNovaRegular", Times, serif;
  font-size: 22px;
  color: #4e4f4b;
}
.cs-invoice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

/* Orders pagination ({paginate}) */
.cs-orders__paginate { list-style: none; }
.cs-paginate { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.cs-paginate a,
.cs-paginate strong,
.cs-paginate span {
  display: inline-flex;
  align-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e5ddd0;
  background: #f7f4ee;
  color: #4e4f4b;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.cs-paginate a:hover { border-color: #abc578; color: #63773a; background: #fff; }
.cs-paginate strong { background: #63773a; border-color: #63773a; color: #fff; }

/* legacy main.css uppercases <address> */
.cs-invoice__block address, .cs-invoice__block { text-transform: none; letter-spacing: 0; }

/* space between header color bar and first card/nav (contact gets this from .cs-form-intro) */
main.cs-account .cs-form-wrap { padding-top: 28px; }
@media (min-width: 768px) { main.cs-account .cs-form-wrap { padding-top: 36px; } }
