/*
 * De thuisschermafbeelding op de website.
 *
 * Geen illustratie: dit is het echte thuisscherm van de app, één op één
 * nagebouwd uit lib/screens/home/home_screen.dart, lib/widgets/home_today_card.dart
 * en lib/widgets/home_list_panel.dart — dezelfde maten, dezelfde tokens,
 * dezelfde Material-icoonpaden. Verandert het scherm in de app, dan verandert
 * dit bestand mee; een screenshot dat iets anders laat zien dan de app doet,
 * is een belofte die de app niet nakomt.
 *
 * De maten staan in logische pixels van het toestel (390 x 844) en worden als
 * geheel geschaald met --screen-scale, zodat elke verhouding klopt.
 */

.device {
    --screen-w: 390px;
    --screen-h: 844px;
    --screen-scale: 1;

    width: calc(var(--screen-w) * var(--screen-scale));
    height: calc(var(--screen-h) * var(--screen-scale));
    flex-shrink: 0;
    position: relative;
}

/* De rand van het toestel: één donker vlak, 12px dik, met de schermradius. */
.device-frame {
    position: absolute;
    inset: calc(-12px * var(--screen-scale));
    background: var(--ink);
    border-radius: calc(56px * var(--screen-scale));
    box-shadow: 0 2px 6px rgba(35, 33, 30, 0.12), 0 32px 64px rgba(35, 33, 30, 0.22);
}

.app-screen {
    position: absolute;
    inset: 0;
    width: var(--screen-w);
    height: var(--screen-h);
    transform: scale(var(--screen-scale));
    transform-origin: top left;
    overflow: hidden;
    border-radius: 44px;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 500;
    line-height: 1.4;
    /* De hero centreert zijn tekst op smalle schermen; een scherm binnen een
       toestel doet daar niet aan mee. */
    text-align: left;
    display: flex;
    flex-direction: column;
    /* De statusbalk en het toetsenbord tekent het toestel zelf; hier staat
       alleen de ruimte die de SafeArea vrijhoudt. */
    padding-top: 20px;
}

.app-screen svg {
    display: block;
    fill: currentColor;
}

/* --- Kop: logo, profiel, begroeting ------------------------------------- */

.app-header {
    padding: 4px 20px 0;
}

.app-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header-row img {
    width: 40px;
    height: 40px;
}

.app-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--surface);
    box-shadow: var(--shadow-float);
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--ink-muted);
}

.app-greeting {
    margin-top: 10px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.7px;
    line-height: 1.15;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Vandaag ------------------------------------------------------------ */

.app-today {
    margin: 14px 16px 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 16px 10px;
}

.app-today-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.app-today-title .day {
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--ink);
}

.app-today-title .sep {
    color: var(--ink-faint);
    padding: 0 4px;
}

.app-today-title .date {
    font-weight: 600;
    color: var(--ink-muted);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-chevron {
    width: 18px;
    height: 18px;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.app-meals {
    margin-top: 8px;
}

.app-meal {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-meal-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.app-meal-icon svg {
    width: 17px;
    height: 17px;
}

.app-meal-icon--lunch { background: var(--coral-tint); color: var(--coral-ink); }
.app-meal-icon--dinner { background: var(--blue-tint); color: var(--blue-ink); }

.app-meal-text {
    min-width: 0;
    flex: 1;
}

.app-meal-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink-muted);
}

.app-meal-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.3;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-meal-divider {
    margin-left: 44px;
    height: 1px;
    background: var(--line);
}

/* --- De lijst ----------------------------------------------------------- */

.app-list {
    flex: 1;
    min-height: 0;
    margin: 10px 16px 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    overflow: hidden;
}

.app-list-title {
    height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-list-title h3 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.25;
    color: var(--ink);
}

.app-count {
    background: var(--blue-tint);
    color: var(--blue-ink);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    margin-right: auto;
}

/* Iedere regel is precies even hoog; zo telt het paneel regels in plaats van
   pixels, net als de LayoutBuilder in home_list_panel.dart. */
.app-line {
    height: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-lines {
    margin-top: 8px;
}

.app-store {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.app-store-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}

.app-product {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-qty {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.app-more {
    font-size: 12px;
    font-weight: 700;
    color: var(--blue-ink);
}

/* --- De intentiebalk ---------------------------------------------------- */

.app-intent {
    margin: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-float);
    padding: 3px 3px 3px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-intent .spark {
    width: 19px;
    height: 19px;
    color: var(--blue-ink);
    flex-shrink: 0;
}

.app-intent-hint {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-send {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: var(--on-accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.app-send svg {
    width: 20px;
    height: 20px;
}

/* --- De tabbalk --------------------------------------------------------- */

.app-tabs {
    height: 74px;
    background: var(--surface);
    display: flex;
    align-items: center;
}

.app-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.app-tab-icon {
    width: 64px;
    height: 32px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
}

.app-tab-icon svg {
    width: 24px;
    height: 24px;
}

/* De actieve tab draagt een gevulde pil én de kleur: kleur alleen is geen
   signaal voor wie deze tinten niet uit elkaar houdt. */
.app-tab--active {
    color: var(--ink);
}

.app-tab--active .app-tab-icon {
    background: var(--mint-tint);
    color: var(--mint-ink);
}
