/* ── Wrapper ── */
.list-wrapper {
    max-width: 42rem;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Back link ── */
.list-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.list-back:hover { text-decoration: underline; }
html.dark .list-back { color: #60a5fa; }

.list-back svg {
    width: 1rem;
    height: 1rem;
}

.list-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-title-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.list-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1d4ed8;
    margin: 0;
}
html.dark .list-title { color: #60a5fa; }

.campus-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    margin: 0;
}
html.dark .campus-heading { color: #9ca3af; }

/* ── Week navigation ── */
.week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
}
html.dark .week-nav { color: #6b7280; }

.week-nav-link {
    padding: 0.25rem;
    color: inherit;
    text-decoration: none;
}
.week-nav-link:hover { color: #4b5563; }
html.dark .week-nav-link:hover { color: #d1d5db; }

.week-nav-label { color: inherit; }

/* SVG icons inside week-nav */
.week-nav-icon {
    width: 1rem;
    height: 1rem;
    display: block;
    stroke-width: 2;
}

/* ── Tabs (shared between day tabs and meal tabs) ── */
.tab-bar--border-bottom {
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tab-bar--border-bottom::-webkit-scrollbar { display: none; }
html.dark .tab-bar--border-bottom { border-bottom-color: #374151; }

.tab-bar {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    min-width: max-content;
}

.tab {
    flex-shrink: 0;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    color: #6b7280;
}
html.dark .tab { color: #9ca3af; }

.tab:hover {
    color: #374151;
    background-color: #f9fafb;
}
html.dark .tab:hover {
    color: #e5e7eb;
    background-color: #1f2937;
}

.tab--active {
    border-bottom-color: #2563eb;
    color: #1d4ed8;
    background-color: #eff6ff;
}
html.dark .tab--active {
    border-bottom-color: #60a5fa;
    color: #93c5fd;
    background-color: rgba(30, 58, 138, 0.3);
}

.tab-subtitle {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
}

/* ── Meal tab bar ── */
.meal-tab-bar {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.meal-tab-bar::-webkit-scrollbar { display: none; }
html.dark .meal-tab-bar { border-bottom-color: #374151; }

/* ── Dish list ── */
.dish-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dish-item {
    border-radius: 0.5rem;
    border: 1px solid #dbeafe;
    background-color: #fff;
}
html.dark .dish-item {
    border-color: #172554;
    background-color: #1f2937;
}

.dish-item--pork-free {
    border-color: #86efac;
    background-color: #f0fdf4;
}
html.dark .dish-item--pork-free { background-color: rgba(22, 101, 52, 0.2); }

.dish-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
}

.dish-link:hover {
    background-color: #f9fafb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
html.dark .dish-link:hover { background-color: #374151; }

.dish-image {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.dish-info {
    flex: 1;
    min-width: 0;
}

.dish-name {
    display: block;
    color: #374151;
    word-break: break-word;
}
html.dark .dish-name { color: #d1d5db; }

.dish-extra { color: #9ca3af; }
html.dark .dish-extra { color: #6b7280; }

.dish-stamp {
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 500;
}
html.dark .dish-stamp { color: #4ade80; }

.dish-price {
    text-align: right;
    flex-shrink: 0;
}

.dish-price-value { font-weight: 600; }
html.dark .dish-price-value { color: #d1d5db; }

.dish-price-extra {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}
html.dark .dish-price-extra { color: #6b7280; }

.dish-empty {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1.5rem 0;
    text-align: center;
    list-style: none;
}

/* ── Responsive: small screens ── */
@media (max-width: 480px) {
    .list-wrapper {
        padding: 1rem 0.75rem;
    }

    .list-title {
        font-size: 1.4rem;
    }

    .week-nav {
        font-size: 0.8rem;
    }

    .tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .tab-bar {
        justify-content: flex-start;
    }

    .dish-link {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .dish-image {
        width: 2.5rem;
        height: 2.5rem;
    }

    .dish-price-value {
        font-size: 0.875rem;
    }
}
