/* BITES Customer UI/UX V1.1 correction: presentation only. */
body.customer-authenticated .page-heading,
body.customer-authenticated .notice { display: none; }
body.customer-authenticated .page { max-width: 1240px; padding-top: 28px; }

.customer-app { display: block; }
/* Honour the authenticated panel visibility controlled by customer.js. */
#customer-panel[hidden], .customer-app[hidden] { display: none !important; }
.customer-shell { display: grid; gap: 22px; }
.customer-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 28px; border-radius: 14px; background: #171717; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.customer-welcome h1 { margin: 5px 0 6px; font-size: clamp(28px,4vw,38px); }
.customer-welcome p { margin: 0; color: #d6d6d6; }
.customer-eyebrow,.customer-card-label {
  display: block; color: #68707d; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.customer-welcome .customer-eyebrow { color: #f58220; }
.customer-hero-order { min-width: 160px; }

.customer-nav {
  display: flex; gap: 6px; overflow-x: auto; padding: 6px;
  border: 1px solid #dedede; border-radius: 12px; background: #fff;
  position: sticky; top: 8px; z-index: 10; box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.customer-nav button {
  flex: 0 0 auto; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px;
  background: transparent; color: #333; font-weight: 700;
}
.customer-nav button:hover { background: #f5f5f5; }
.customer-nav button.is-active { background: #171717; color: #fff; }

.customer-workspace { min-width: 0; }
.customer-view[hidden] { display: none !important; }
.customer-section-heading { margin: 4px 0 20px; }
.customer-section-heading h1 { margin: 5px 0 6px; font-size: 30px; }
.customer-section-heading p { margin: 0; color: #666; }

.customer-dashboard-grid { display: grid; grid-template-columns: 1.45fr .75fr .9fr; gap: 16px; }
.customer-summary-card,.customer-home-panel {
  background: #fff; border: 1px solid #dedede; border-radius: 12px; padding: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.035);
}
.customer-summary-card strong { display: block; margin: 10px 0 7px; font-size: 25px; line-height: 1.15; }
.customer-summary-card > span:last-of-type { display: block; color: #666; line-height: 1.45; }
.customer-summary-primary { border-top: 4px solid #f58220; }
.customer-text-action { margin-top: 18px; padding: 0; border: 0; background: transparent; color: #b95700; font-weight: 800; }
.customer-dashboard-row { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(260px,.75fr); gap: 16px; margin-top: 16px; }
.customer-home-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.customer-home-heading h2,.customer-action-panel h2 { margin: 5px 0 12px; }
.customer-home-list { display: grid; gap: 10px; margin-top: 14px; }
.customer-home-child { padding: 13px 14px; border: 1px solid #e7e7e7; border-radius: 9px; background: #fafafa; }
.customer-home-child strong,.customer-home-child span { display: block; }
.customer-home-child span { margin-top: 4px; color: #666; font-size: 14px; }
.customer-home-empty { margin: 14px 0 0; color: #666; }
.customer-action-panel { background: #fff8f1; border-color: #f4d2b2; }
.customer-action-panel p { color: #666; line-height: 1.5; }
.customer-action-panel .primary-button,.customer-action-panel .secondary-button { width: 100%; margin-top: 8px; }

.customer-module-panel.panel { margin-bottom: 18px; padding: 22px; border-radius: 12px; }
.customer-view > [data-module-host] > .customer-module-panel:first-child { margin-top: 0; }
.customer-account-card.session-bar { margin: 0; padding: 22px; border-radius: 12px; }
body.customer-authenticated #firebase-status { display: none; }

@media (max-width: 850px) {
  body.customer-authenticated .page { padding: 20px 16px 64px; }
  .customer-dashboard-grid { grid-template-columns: 1fr 1fr; }
  .customer-summary-primary { grid-column: 1 / -1; }
  .customer-dashboard-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .top-bar { min-height: 76px; padding: 14px 18px; }
  .brand { font-size: 26px; }
  .customer-welcome { align-items: stretch; flex-direction: column; padding: 22px; }
  .customer-hero-order { width: 100%; }
  .customer-nav { margin-inline: -4px; }
  .customer-nav button { padding-inline: 14px; }
  .customer-dashboard-grid { grid-template-columns: 1fr; }
  .customer-summary-primary { grid-column: auto; }
  .customer-summary-card,.customer-home-panel { padding: 18px; }
  .customer-section-heading h1 { font-size: 27px; }
  .customer-account-card.session-bar { align-items: stretch; flex-direction: column; }
  .customer-account-card .secondary-button { width: 100%; }
}

/* V1.1 final mobile navigation correction: keep all five destinations visible. */
@media (max-width: 620px) {
  .customer-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    overflow-x: visible;
    margin-inline: 0;
    padding: 5px;
  }
  .customer-nav button {
    min-width: 0;
    min-height: 52px;
    padding: 7px 3px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
}

.customer-legacy-offerings{margin-top:1rem;border:1px solid #e1e5ea;border-radius:10px;background:#fff}.customer-legacy-offerings>summary{cursor:pointer;padding:.85rem 1rem;font-weight:800;color:#475467}.customer-legacy-offerings[open]>summary{border-bottom:1px solid #e1e5ea}.customer-legacy-offerings .ordering-panel{border:0;box-shadow:none;margin:0}

/* UX-01: first-time parent guidance. */
.customer-first-child-prompt{margin:0 0 20px;padding:24px;border:2px solid #fa811c;border-radius:14px;background:#fff8f0}
.customer-first-child-prompt[hidden]{display:none!important}
.customer-first-child-prompt h2{margin:8px 0;font-size:clamp(22px,3vw,30px);color:#171717}
.customer-first-child-prompt p{margin:8px 0 16px;line-height:1.5}
.customer-first-child-steps{font-weight:700;color:#92400e}
.customer-first-child-prompt .primary-button{margin-top:4px}
@media(max-width:620px){.customer-first-child-prompt{padding:18px}.customer-first-child-prompt .primary-button{width:100%}}

.customer-payment-action{cursor:pointer}
.customer-payment-action:hover,.customer-payment-action:focus-visible{outline:2px solid #f36b21;outline-offset:2px}

/* Consolidated V1.2: accessible history filters and support footer. */
.customer-record-filters { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin:12px 0 18px; }
.customer-record-filters label { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-weight:600; }
.customer-record-filters select { max-width:220px; padding:9px 12px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#172b3a; }
.customer-filter-count { font-size:.9rem; color:#526171; }
.customer-support-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; padding:20px 8px; font-size:.9rem; }
.customer-support-footer a { text-decoration:underline; }

.customer-record-filters input[type="date"] { max-width:180px; padding:9px 10px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#172b3a; }
.customer-record-filters label { justify-content:flex-start; }
