/* The meal card: available balance, what the current cart leaves, and a meter.
   Shared by the daily menu (restorants/show) and the pre-order week planner,
   so it lives here rather than inside menu.css. Pair with meal-card.js and
   resources/views/partials/meal-card.blade.php. */

.meal-card {
    --ink:    #11223F;
    --ink-2:  #0E2A47;
    --accent: #C8102E;
    --gold:   #F5B301;
}


.meal-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.6rem 1.35rem;
    margin-bottom: 1.75rem;
}

/* the swoosh from the brand mark, used once, as texture not decoration */
.meal-card::after {
    content: "";
    position: absolute;
    right: -60px; top: -90px;
    width: 280px; height: 280px;
    border-radius: 50%;
    border: 34px solid var(--gold);
    opacity: 0.10;
    pointer-events: none;
}

.meal-card-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.meal-card-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 0.2rem;
}

.meal-card-figure {
    /* Same face as the "Meal card balance" label above it, rather than the
       Fraunces used for dish names and prices. */
    font-family: 'Open Sans', system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.meal-card-after { text-align: right; }
.meal-card-after .meal-card-figure { font-size: 1.35rem; color: var(--gold); }

/* meter */
.meal-meter {
    position: relative;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    margin-top: 1.1rem;
    overflow: hidden;
}

.meal-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--gold);
    transition: width .45s ease, background-color .3s ease;
}

.meal-meter[data-over="true"] span { background: var(--accent); }

.meal-card-note {
    margin: 0.7rem 0 0;
    font-size: 0.84rem;
    color: rgba(255,255,255,.7);
}

.meal-card-note[data-over="true"] { color: #FFC9D2; font-weight: 600; }

.meal-card[data-available="false"] .meal-card-after,
.meal-card[data-available="false"] .meal-meter { display: none; }

/* An unreachable account is a caveat, not the headline. Don't let the word
   "Unavailable" carry the same weight as a real balance figure. */
.meal-card[data-available="false"] .meal-card-figure,
.meal-card[data-available="pending"] .meal-card-figure {
    font-size: 1.5rem;
    color: rgba(255,255,255,.85);
}
