/* Krissy's Kitchen — colours and motifs from Krissy's hand-painted party sign:
   royal-blue and cream stripes, a scalloped marigold oval, blue script. */

:root {
    color-scheme: light;
    --cream: #f6f1e4;         /* the sign's painted cream */
    --paper: #fffdf8;
    --ink: #22283a;
    --muted: #6b6f7d;
    --line: #e4dfd0;
    --accent: #1f4a8f;        /* royal blue, from the stripes and frame.
                                 Text and controls in blue are always tappable;
                                 nothing else uses it except the header and
                                 footer stripes and photo frames. */
    --accent-dark: #163668;
    --accent-soft: #e2e9f5;
    --sun: #e8b53a;           /* marigold, from the scalloped border */
    --sun-soft: #fbefcc;
    --sun-ink: #6b4a00;
    --olive: #4f6b2e;         /* "paid" confirmations */
    --olive-soft: #e7eedb;
    --gold-soft: #fbefcc;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .08);
    --serif: 'Fraunces', Georgia, serif;
    --script: 'Great Vibes', 'Snell Roundhand', cursive;
    --sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 17px/1.55 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .hint { color: var(--muted); font-size: .9rem; }
[hidden] { display: none !important; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 120px; }

/* Header */
/* Header: the sign's blue-and-cream stripes, with the name in script on a
   scalloped marigold oval between two blue-framed photos. */
.site-header {
    background: repeating-linear-gradient(90deg, var(--accent) 0 34px, var(--cream) 34px 68px);
    border-bottom: 8px solid var(--accent);
    padding: 22px 16px;
    text-align: center;
}
.header-inner { display: flex; align-items: center; justify-content: center; gap: 28px; }
.brand {
    color: var(--accent); text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 420px; aspect-ratio: 560 / 370;
    background: url("Images/scallop-oval.svg") center / contain no-repeat;
    padding: 0 56px;
    filter: drop-shadow(0 4px 10px rgba(10, 20, 50, .25));
}
.brand-photo {
    width: 140px; height: 175px; object-fit: cover;
    border: 7px solid var(--accent); border-radius: 3px;
    outline: 2px solid var(--cream); outline-offset: -9px;
    box-shadow: 0 6px 18px rgba(10, 20, 50, .35);
    flex: none;
}
.brand-photo.left { transform: rotate(-4deg); }
.brand-photo.right { transform: rotate(3deg); }
.brand-name {
    display: block; font-family: var(--script); font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 400; line-height: 1.05;
    -webkit-text-stroke: .9px currentColor;   /* Great Vibes has one weight; this thickens it a little */
}
.brand-tag { display: block; font-size: .9rem; color: var(--ink); max-width: 15em; line-height: 1.35; margin-top: 4px; }

/* How does it work? — numbered rows in one card. */
.how { margin: 32px auto 28px; max-width: 760px; }
.how h1 { text-align: center; margin-bottom: .6em; }
.steps {
    list-style: none; counter-reset: step;
    margin: 0; padding: 4px 20px;
    background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
}
.steps li {
    counter-increment: step;
    position: relative;
    padding: 12px 0 12px 48px;
    color: #3e4456;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 11px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--sun); color: var(--ink);
    font: 700 1rem/30px var(--serif); text-align: center;
}
.steps strong { color: var(--ink); }

.alert { background: #fdecea; border: 1px solid #f3c1bb; color: #8a2a1e; padding: 12px 16px; border-radius: var(--radius); }

/* Search and topic filter */
.menu-tools { margin: 8px 0 24px; }
.search input {
    width: 100%;
    font: 400 1.05rem var(--sans);
    padding: 12px 16px 12px 42px;
    border: 1px solid #cfd3de; border-radius: 99px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237a6c63' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
    color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
    font: 600 .9rem var(--sans);
    color: var(--accent); background: #fff;
    border: 1px solid #b9c7e3; border-radius: 99px;
    padding: 6px 12px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-count { font-weight: 400; opacity: .7; margin-left: 2px; }
.filter-status { margin: 12px 0 0; color: var(--muted); font-size: .95rem; min-height: 1.4em; }
.link-button {
    all: unset; cursor: pointer;
    color: var(--accent); text-decoration: underline; font-weight: 600;
}
.no-results { text-align: center; color: var(--muted); padding: 32px 0; }

.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.meal {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    transition: border-color .15s;
}
.meal.chosen { border-color: var(--accent); }
.meal-photo {
    all: unset;
    cursor: zoom-in;
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--line);
}
.meal-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meal-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo-count {
    position: absolute; right: 10px; bottom: 10px;
    background: rgba(0,0,0,.6); color: #fff;
    font-size: .78rem; padding: 3px 9px; border-radius: 99px;
}
.meal-body { padding: 14px 16px 4px; flex: 1; }
.meal-body h3 { margin-bottom: .25em; }
.summary { color: #3e4456; font-size: .97rem; }
.meal-tags { margin: 0 0 .5em; display: flex; gap: 6px; flex-wrap: wrap; }
.meal-tags .tag {
    font: 700 .72rem var(--sans); letter-spacing: .03em;
    background: var(--accent-soft); color: var(--accent);
    border: 0; padding: 3px 9px; border-radius: 99px; cursor: pointer;
}
.meal-tags .tag:hover { background: #c9d6ec; }
.more summary { cursor: pointer; color: var(--accent); font-size: .92rem; font-weight: 600; margin-bottom: .5em; }
.more p { font-size: .94rem; color: #3e4456; }

.meal-order {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px 16px;
}
.price { margin: 0; font-weight: 700; font-size: 1.1rem; }
.price span { font-weight: 400; color: var(--muted); font-size: .85rem; }

.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.stepper .step {
    width: 44px; height: 44px; border: 0; background: var(--accent-soft);
    color: var(--accent); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.stepper .step:active { background: #c9d6ec; }
.stepper input {
    width: 46px; height: 44px; border: 0; text-align: center;
    font: 700 1.05rem var(--sans); color: var(--ink); background: #fff;
    -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Checkout */
.checkout, .panel {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    margin: 40px auto;
    max-width: 720px;
}
.summary-box table, table.items { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.summary-box td, table.items td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary-box td:first-child, table.items td:first-child { width: 3.2em; color: var(--muted); white-space: nowrap; }
.summary-box td:last-child, table.items td:last-child { text-align: right; white-space: nowrap; }
.summary-box tfoot td, table.items tfoot td { font-weight: 700; border-bottom: 0; padding-top: 10px; }
.summary-box .empty { color: var(--muted); font-style: italic; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 20px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.fields .wide, .fields .address, .fields .fulfilment { grid-column: 1 / -1; }
.fields input, .fields textarea, .admin-actions select {
    font: 400 1rem var(--sans);
    padding: 10px 12px;
    border: 1px solid #cfd3de;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    width: 100%;
}
.fields input:focus, .fields textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.fulfilment { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.fulfilment legend { font-weight: 600; font-size: .95rem; margin-bottom: 4px; padding: 0; }
.fields .choice { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.fields .choice input { width: auto; }
.hint { font-weight: 400; }

.primary {
    display: inline-block;
    background: var(--accent); color: #fff;
    border: 0; border-radius: 99px;
    padding: 13px 26px;
    font: 700 1.05rem var(--sans);
    text-decoration: none;
    cursor: pointer;
}
.primary:hover { background: var(--accent-dark); }

.order-bar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
    width: min(560px, calc(100% - 32px));
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--ink); color: #fff;
    padding: 10px 10px 10px 20px; border-radius: 99px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    font-weight: 700;
    z-index: 10;
}
.order-bar .primary { padding: 10px 20px; font-size: .98rem; }

/* Photo viewer */
.viewer {
    border: 0; padding: 0; background: transparent;
    width: min(960px, 100vw); max-height: 92vh;
}
.viewer::backdrop { background: rgba(20, 14, 10, .85); }
.viewer-images { display: grid; gap: 10px; padding: 48px 12px 12px; }
.viewer-images img { width: 100%; border-radius: 10px; }
.viewer .close {
    position: fixed; top: 12px; right: 16px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: #fff; color: var(--ink); font-size: 1.6rem; cursor: pointer;
}

/* Order page */
.eyebrow { color: var(--olive); font-weight: 700; margin-bottom: .2em; }
.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 20px 0; }
.status div, .pay-details div { background: var(--cream); border-radius: 10px; padding: 10px 14px; }
.status dt, .pay-details dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.status dd, .pay-details dd { margin: 0; font-weight: 700; }
dd.pay-claimed { color: var(--sun-ink); }
dd.pay-received { color: var(--olive); }
.pay-box { background: var(--gold-soft); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.pay-details { display: grid; gap: 8px; margin: 14px 0 18px; }
.pay-details div { background: rgba(255,255,255,.7); }
.notice { background: var(--gold-soft); padding: 14px 16px; border-radius: var(--radius); }
.notice.ok { background: var(--olive-soft); color: var(--olive); font-weight: 700; }

/* Admin */
.admin-panel { max-width: 860px; }
.admin-nav { color: var(--muted); }
.admin-order { border-top: 1px solid var(--line); padding: 18px 0; }
.admin-order h2 { font-size: 1.25rem; margin: 0; }
.admin-order header p { margin: 2px 0 8px; }
.admin-order.pay-claimed header h2::after { content: ' · says paid'; color: var(--sun-ink); font: 700 .9rem var(--sans); }
.admin-items { margin: 0 0 8px; padding-left: 1.2em; }
.contact { font-size: .95rem; }
.notes { background: var(--gold-soft); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.admin-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.admin-actions label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 600; gap: 4px; }
.admin-actions select { width: auto; }

.site-footer {
    text-align: center; color: var(--muted); padding: 24px 16px 100px;
    border-top: 10px solid transparent;
    border-image: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--cream) 18px 36px) 10;
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .steps { padding: 2px 14px; }
    .site-header { padding: 16px 8px; }
    .header-inner { gap: 6px; }
    .brand { width: 222px; padding: 0 24px; }
    .brand-name { font-size: 1.6rem; white-space: nowrap; -webkit-text-stroke: .5px currentColor; }
    .brand-tag { font-size: .66rem; max-width: 14em; }
    .brand-photo { width: 62px; height: 78px; border-width: 4px; outline-width: 1px; outline-offset: -5px; }
    .fields { grid-template-columns: 1fr; }
    .checkout, .panel { padding: 20px 16px; margin: 28px -4px; }
    .meal-grid { grid-template-columns: 1fr; }
}

/* Admin pages */
.admin-tabs {
    display: flex; gap: 4px; flex-wrap: wrap; justify-content: center;
    max-width: 860px; margin: 20px auto 0; padding: 0 16px;
}
.admin-tabs a {
    padding: 8px 16px; border-radius: 99px; text-decoration: none; font-weight: 700;
    color: var(--accent); background: var(--paper); border: 1px solid #b9c7e3;
}
.admin-tabs a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.flash { max-width: 860px; margin: 16px auto 0; background: var(--olive-soft); color: var(--olive); font-weight: 700; padding: 12px 16px; border-radius: var(--radius); }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-title h1 { margin: 0; }
.admin-meals { list-style: none; padding: 0; margin: 16px 0 0; }
.admin-meals li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.admin-meals li.hidden-meal { opacity: .55; }
.admin-meal-link { flex: 1; display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.admin-meal-link img, .no-photo { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.no-photo { background: var(--line); font-size: .7rem; color: var(--muted); display: grid; place-items: center; }
.admin-meal-link strong { display: block; color: var(--accent); }
.admin-meal-link .muted { font-size: .85rem; }
.row-actions { display: flex; gap: 4px; flex: none; }
.row-actions button, .test-email button {
    font: 700 .9rem var(--sans); color: var(--accent); background: var(--accent-soft);
    border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; min-width: 38px;
}
.row-actions button:disabled { opacity: .35; cursor: default; }
.admin-form { display: grid; gap: 14px; margin-top: 12px; }
.admin-form h2 { margin: 18px 0 0; font-size: 1.25rem; }
.admin-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.admin-form input:not([type=checkbox]):not([type=radio]), .admin-form textarea {
    font: 400 1rem var(--sans); padding: 10px 12px; width: 100%;
    border: 1px solid #cfd3de; border-radius: 10px; background: #fff; color: var(--ink);
}
.admin-form .choice { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.admin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.admin-tags { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.admin-tags legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.admin-tags .wide { flex-basis: 100%; }
.admin-photos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.admin-photos li { display: grid; gap: 6px; justify-items: start; }
.admin-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.admin-steps { padding-left: 1.4em; margin: 0; display: grid; gap: 12px; }
.admin-steps li { display: grid; gap: 6px; }
.admin-steps input { font-weight: 700 !important; }
.test-email { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.danger { font: 700 .95rem var(--sans); color: #a12a1e; background: #fdecea; border: 1px solid #f3c1bb; border-radius: 99px; padding: 10px 18px; cursor: pointer; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

/* Accounts */
.account-bar {
    display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap;
    max-width: 1120px; margin: 0 auto; padding: 10px 16px 0; font-size: .95rem;
}
.account-bar a { font-weight: 700; text-decoration: none; }
.account-bar .who { color: var(--muted); margin-right: auto; }
.account-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.account-columns.new-first .account-signup { order: -1; }
.fields.single { grid-template-columns: 1fr; }
.fields.inner { margin: 8px 0 0; }
.button-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.secondary {
    display: inline-block; font: 700 1rem var(--sans); color: var(--accent); background: var(--accent-soft);
    border: 0; border-radius: 99px; padding: 12px 20px; text-decoration: none; cursor: pointer;
}
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-form input { flex: 1; min-width: 200px; font: 400 1rem var(--sans); padding: 10px 12px; border: 1px solid #cfd3de; border-radius: 10px; }
.inline-form button { font: 700 1rem var(--sans); color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 99px; padding: 10px 18px; cursor: pointer; }
.account-form { margin: 20px 0 28px; }
.signout { margin-top: 24px; }
.gate { background: var(--sun-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 8px; }
.gate p:last-child { margin-bottom: 0; }
.ordering-as { color: var(--muted); }
.ndis-fields { background: var(--cream); border-radius: 12px; padding: 12px 14px; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { border-top: 1px solid var(--line); padding: 14px 0; }
.history-head { display: flex; justify-content: space-between; gap: 12px; }
.history-items { margin: 4px 0; color: #3e4456; }
.history-status { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.history .secondary { padding: 8px 16px; font-size: .9rem; }
.ndis-decision { margin-top: 20px; display: grid; gap: 12px; }
.ndis-decision label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.ndis-decision textarea { font: 400 1rem var(--sans); padding: 10px 12px; border: 1px solid #cfd3de; border-radius: 10px; }
.badge { font: 700 .75rem var(--sans); padding: 3px 9px; border-radius: 99px; vertical-align: middle; }
.badge-pending { background: var(--sun-soft); color: var(--sun-ink); }
.badge-approved { background: var(--olive-soft); color: var(--olive); }
.badge-declined { background: #fdecea; color: #a12a1e; }
.ndis-line { font-size: .95rem; }
.ndis-pending strong { color: var(--sun-ink); }
.ndis-approved strong { color: var(--olive); }
.ndis-declined strong { color: #a12a1e; }

/* Sign in: password, or emailed link */
.signin-form { display: grid; gap: 14px; }
.signin-form > label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.signin-form input { font: 400 1rem var(--sans); padding: 10px 12px; border: 1px solid #cfd3de; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.choice-title { font-weight: 700; margin: 0 0 6px; }
.password-row { display: flex; gap: 8px; }
.password-row input { flex: 1; min-width: 0; }
.password-row .primary { padding: 10px 20px; }
.wide-button { width: 100%; text-align: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
