/* ==========================================================
   Allergene-Seite (page-allergene.php)
   ========================================================== */

:root {
    --alg-amber: #c68c36;
}

/* ---------- Legende: Nummern-Badge ---------- */
.alg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid var(--alg-amber);
    color: var(--alg-amber);
    font-family: "Oswald", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.alg-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alg-legend__item {
    transition: border-color 0.25s ease;
}

.alg-legend__item:hover {
    border-color: rgba(198, 140, 54, 0.5);
}

.alg-legend__item:hover .alg-num {
    background-color: var(--alg-amber);
    color: #000;
}

/* ---------- Übersicht: Zeilen ---------- */
.alg-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.alg-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.alg-row__name {
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 0;
}

.alg-row__codes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-left: auto;
}

.alg-row__none {
    margin-left: auto;
    color: #6b7280;
    font-size: 0.75rem;
    font-style: italic;
}

/* ---------- Kleine Chips (z. B. "a Gluten" oder "2 Konservierungsstoff") ---------- */
.alg-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem 0.15rem 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #d1d5db;
    font-size: 0.7rem;
    line-height: 1.4;
    white-space: nowrap;
    cursor: help;
}

.alg-chip b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    padding: 0 0.2rem;
    background: var(--alg-amber);
    color: #000;
    font-weight: 700;
    font-size: 0.65rem;
}

/* Handy: Chips unter den Namen statt daneben */
@media (max-width: 480px) {
    .alg-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .alg-row__codes,
    .alg-row__none {
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* ---------- Druckansicht (z. B. für den Ordner im Restaurant) ---------- */
@media print {
    body > header,
    body > footer,
    #gs-cookie-banner,
    #gs-cookie-modal,
    #gs-cookie-overlay {
        display: none !important;
    }
    body,
    main {
        background: #fff !important;
        color: #000 !important;
        padding-top: 0 !important;
    }
    main * {
        color: #000 !important;
        background: transparent !important;
        border-color: #999 !important;
    }
    .alg-chip b {
        border: 1px solid #000;
    }
}
