/* MYV sandbox redesign, Nov 2026: balance pages. Loaded after myv-design-fixes.css (see template/head.php). */

/* ===== Balance panel (template/account/balance_panel.php), final design "Balance 1" (Nov 2026) =====
   Uses the account frame and the My orders pieces (.myv-ord-tabs, .myv-ord-table, .myv-ord-pill, .myv-ord-btn) so it looks the same.
   No side padding here: the frame sits on the page edge like every other page. */
html body .myv-bal-sub { margin: 4px 0 18px; font-size: 14px; line-height: 1.45; color: #667068; }
html body .myv-bal h2.myv-bal-h2 { margin: 0 0 10px; font-family: inherit !important; font-size: 18px !important; line-height: 24px; font-weight: 700 !important; color: #42474C !important; text-transform: none !important; }

.myv-bal-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.myv-bal-total { display: flex; flex-direction: column; padding: 20px; background: #FFFFFF; border: 1px solid #E2E7E3; border-radius: 8px; min-width: 0; }
.myv-bal-total.is-main { border: 1.5px solid #5C9A62; }
.myv-bal-total > span { font-size: 14px; font-weight: 600; color: #667068; }
.myv-bal-total > b { margin-top: 6px; font-size: 30px; line-height: 1.1; font-weight: 700; color: #1B211C; overflow-wrap: anywhere; }
.myv-bal-total.is-main > b { font-size: 34px; }
.myv-bal-total > small { margin-top: 6px; font-size: 13px; line-height: 1.4; color: #3D4740; }
.myv-bal-total.is-ok > b, .myv-bal-total.is-ok > small { color: #2E6430; }
.myv-bal-total.is-late { border-color: #F1C4C4; }
.myv-bal-total.is-late > b, .myv-bal-total.is-late > small { color: #C62828; }
html body .myv-bal-total > small.myv-bal-credit { margin-top: 4px; color: #2E6430; font-weight: 600; }

.myv-bal-head, .myv-bal-row { display: grid; grid-template-columns: 110px 90px 110px minmax(130px, 1fr) 120px 110px 92px; column-gap: 12px; align-items: center; padding: 10px 16px; }
.myv-bal-head { padding: 12px 16px; background: #F7F9F7; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #667068; }
.myv-bal-head > span:nth-child(5) { text-align: right; }
.myv-bal-row { min-height: 56px; border-top: 1px solid #EEF0F0; font-size: 15px; color: #3D4740; }
.myv-bal-no { font-weight: 700; color: #1B211C; }
html body .myv-bal-order { font-weight: 600; color: #2E6430; text-decoration: none; }
html body .myv-bal-order:hover { text-decoration: underline; color: #1F3F21; }
.myv-bal-none { color: #A6ADA8; }
.myv-bal-amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.myv-bal-amt b { color: #1B211C; font-weight: 700; }
.myv-bal-amt small { font-size: 12px; color: #9A5B00; font-weight: 600; white-space: nowrap; }
.myv-bal-row.is-overdue .myv-bal-due { color: #C62828; font-weight: 600; }
.myv-bal-pdf { display: flex; justify-content: flex-end; }
.myv-bal-meta { display: none; }
.myv-bal-table .myv-ord-empty { border-top: 1px solid #EEF0F0; }

.myv-bal-state { display: flex; align-items: center; gap: 10px; padding: 28px 20px; background: #FFFFFF; border: 1px solid #E2E7E3; border-radius: 8px; color: #667068; font-size: 15px; }
.myv-bal-spin { flex: none; width: 18px; height: 18px; border: 2px solid #CFE3D0; border-top-color: #2E6430; border-radius: 50%; animation: myv-bal-spin .8s linear infinite; }
@keyframes myv-bal-spin { to { transform: rotate(360deg); } }
.myv-bal-card { display: flex; align-items: flex-start; gap: 14px; max-width: 640px; padding: 20px; background: #FFFFFF; border: 1px solid #E2E7E3; border-radius: 8px; }
.myv-bal-card-icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #E8F4E9; color: #2E6430; font-size: 19px; }
.myv-bal-card b { display: block; font-size: 17px; line-height: 1.3; color: #1B211C; }
html body .myv-bal-card p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: #3D4740; }
.myv-bal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
html body .myv-bal-actions .myv-pw-save { width: auto; height: 40px; padding: 0 22px; font-size: 15px; }
.myv-bal-sample { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px; background: #FFF8E6; border: 1px solid #F2D9A0; border-radius: 8px; font-size: 14px; color: #6B4A00; }
html body .myv-bal-sandbox { max-width: 640px; margin: 10px 0 0; padding: 10px 14px; border: 1px dashed #CBD2D6; border-radius: 8px; font-size: 13px; color: #667068; }
html body .myv-bal-sandbox button { padding: 0; border: 0; background: none; color: #2E6430; font-weight: 700; text-decoration: underline; cursor: pointer; }
html body .myv-bal-help { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: #667068; }
html body .myv-bal-help a { color: #2E6430; font-weight: 600; text-decoration: none; white-space: nowrap; }
html body .myv-bal-checked { margin: 10px 0 0; font-size: 13px; color: #8A96A6; }

@media (max-width: 1199.98px) and (min-width: 992px) {
  .myv-bal-head, .myv-bal-row { grid-template-columns: 96px 76px 100px minmax(110px, 1fr) 104px 96px 84px; column-gap: 10px; font-size: 14px; }
  .myv-bal-total.is-main > b { font-size: 30px; }
  .myv-bal-total > b { font-size: 26px; }
}

@media (max-width: 991.98px) {
  html body .myv-bal-sub { margin: 12px 0 14px; }
  .myv-bal-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .myv-bal-total { padding: 16px; }
  .myv-bal-total.is-main { grid-column: span 2; }
  .myv-bal-total.is-main > b { font-size: 30px; }
  .myv-bal-total > b { font-size: 24px; }
  html body .myv-bal h2.myv-bal-h2 { font-size: 17px !important; }
  .myv-bal-head { display: none; }
  .myv-bal-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no st" "meta meta" "amt pdf"; row-gap: 6px; column-gap: 8px; min-height: 0;
    padding: 14px; background: #FFFFFF; border: 1px solid #E2E7E3; border-radius: 8px; }
  .myv-bal-no { grid-area: no; font-size: 15px; }
  .myv-bal-st { grid-area: st; justify-self: end; }
  .myv-bal-ord, .myv-bal-date, .myv-bal-due { display: none; }
  .myv-bal-meta { grid-area: meta; display: block; font-size: 13px; line-height: 19px; color: #667068; }
  .myv-bal-row.is-overdue .myv-bal-meta { color: #C62828; }
  .myv-bal-amt { grid-area: amt; align-items: flex-start; text-align: left; margin-top: 4px; padding-top: 10px; border-top: 1px solid #EEF0F0; }
  .myv-bal-amt b { font-size: 17px; }
  .myv-bal-pdf { grid-area: pdf; align-self: stretch; align-items: flex-end; margin-top: 4px; padding-top: 10px; border-top: 1px solid #EEF0F0; }
  .myv-bal-card { padding: 16px; }
  html body .myv-bal-help { font-size: 13px; line-height: 19px; }
}

/* Logged-out visitors on a private account page (My orders, Address book, Balance, Change password): one log-in card. */
.myv-acct-guest-actions { display: flex; gap: 10px; }
html body .myv-acct-guest-actions .myv-pw-save { flex: 1; width: auto; }
html body .myv-acct-guest-actions .myv-ord-outline { flex: 1; height: 48px; font-size: 16px; }
html body .myv-acct-guest-note { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: #667068; }
html body .myv-acct.is-guest h1.myv-ord-h1 + .myv-acct-guest-card { margin-top: 16px; }
html body .myv-acct.is-guest { padding-bottom: 32px; }
@media (max-width: 991.98px) {
  html body .myv-acct.is-guest h1.myv-ord-h1 + .myv-acct-guest-card { margin-top: 12px; padding: 16px; }
  html body .myv-acct.is-guest { padding-bottom: 24px; }
}

/* ===== Pay-as-you-order accounts (designs "Balance 1b / 1c" + "where it shows", Nov 2026) ===== */
/* Amber note while something is left to pay (no call buttons: the footer has them). */
html body .myv-bal-alert { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 16px 20px; background: #FFF4E0; border: 1px solid #F0C36D; border-radius: 8px; color: #1B211C; font-size: 17px; line-height: 1.35; }
html body .myv-bal-alert > i { flex: none; margin-top: 1px; color: #8A5300; font-size: 20px; }
html body .myv-bal-alert p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: #3D4740; }
html body .myv-bal-alert a { color: #2E6430; font-weight: 700; text-decoration: underline; }
.myv-bal-totals.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.myv-bal-totals.is-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.myv-bal-total.is-left { border: 1.5px solid #F0C36D; }
.myv-bal-total.is-left > small { color: #8A5300; }
.myv-bal-total.is-nothing { flex-direction: row; align-items: center; gap: 12px; border: 1.5px solid #5C9A62; }
.myv-bal-total.is-nothing b { display: block; font-size: 17px; color: #1B211C; }
.myv-bal-total.is-nothing small { display: block; margin-top: 2px; font-size: 13px; color: #3D4740; }
.myv-bal-due.is-left, .myv-bal-row .myv-bal-meta .is-left { color: #8A5300; font-weight: 600; }

/* Amount next to "Balance" in the account menu (side list and phone pills). */
html body .myv-acct-badge { margin-left: auto; padding: 2px 8px; border-radius: 10px; background: #FFF4E0; color: #8A5300; font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap; }
html body .myv-acct-badge.is-late { background: #FDECEC; color: #C62828; }
html body .myv-ord-pills a .myv-acct-badge { margin-left: 6px; }

/* Note at the top of My orders: "£45.20 left to pay on 1 invoice · See balance →". */
html body a.myv-ord-balnote { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 18px; background: #FFF4E0; border: 1px solid #F0C36D; border-radius: 8px; color: #1B211C; text-decoration: none; font-size: 15px; line-height: 20px; }
html body a.myv-ord-balnote[hidden] { display: none; }
html body a.myv-ord-balnote > i { flex: none; color: #8A5300; font-size: 18px; }
html body a.myv-ord-balnote > span:first-of-type { flex: 1; min-width: 0; }
html body a.myv-ord-balnote .myv-ord-balnote-go { flex: none; font-size: 14px; font-weight: 700; color: #2E6430; }
html body a.myv-ord-balnote.is-late { background: #FDECEC; border-color: #F1C4C4; }
html body a.myv-ord-balnote.is-late > i { color: #C62828; }

@media (max-width: 991.98px) {
  html body .myv-bal-alert { padding: 14px; font-size: 16px; }
  .myv-bal-totals.is-two, .myv-bal-totals.is-wide { grid-template-columns: 1fr; }
  .myv-bal-total.is-left { grid-column: auto; }
  html body a.myv-ord-balnote { padding: 12px 14px; font-size: 14px; gap: 10px; margin-bottom: 14px; }
}
/* Phones: My orders is re-ordered with flex "order"; the balance note goes right under the menu pills (board "Phone — where it shows"). */
@media (max-width: 991.98px) {
  html body #myvOrd a.myv-ord-balnote { order: 2; margin: 12px 0 0; }
}
