/* Menu service - mobile first (phone layout, centered column on desktop). */
:root {
    --menu-accent: #e8590c;
    --menu-accent-soft: #fff4e6;
    --menu-text: #212529;
    --menu-muted: #6c757d;
    --menu-border: #e9ecef;
    --menu-tabbar-h: 64px;
}

body.menu-app {
    background: #f8f9fa;
    color: var(--menu-text);
    padding-bottom: calc(var(--menu-tabbar-h) + env(safe-area-inset-bottom));
}

.menu-shell {
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
}

/* Header */
.menu-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--menu-border);
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}

.menu-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f3f5;
    color: var(--menu-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.menu-icon-btn.active,
.menu-icon-btn:active {
    background: var(--menu-accent-soft);
    color: var(--menu-accent);
}

.menu-search {
    margin-top: 10px;
    position: relative;
}

.menu-search input {
    border-radius: 999px;
    padding-left: 38px;
    padding-right: 44px;
    background: #f1f3f5;
    border: none;
    height: 42px;
}

.menu-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--menu-muted);
}

/* Diktat rechts im Suchfeld (babel-dictation.js) */
.menu-search .menu-search-mic {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--menu-muted);
}

.menu-search .menu-search-mic:hover {
    background: #e9ecef;
    color: var(--menu-accent);
}

.menu-search .menu-search-mic i {
    position: static;
    transform: none;
    color: inherit;
}

/* Diktat-Dialog ueber einem offenen Dialog (Empfehlung): Dialog und Abdunklung ueber dem ersten */
#microModal {
    z-index: 1070;
}

.modal-backdrop.show ~ .modal-backdrop.show {
    z-index: 1065;
}

.menu-chips {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.menu-chip {
    border: 1px solid var(--menu-border);
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--menu-text);
    text-decoration: none;
}

.menu-chip.active {
    background: var(--menu-accent);
    border-color: var(--menu-accent);
    color: #fff;
}

/* Restaurant cards */
.menu-list {
    padding: 8px 0 24px;
}

.menu-card {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--menu-border);
    color: inherit;
    text-decoration: none;
}

.menu-card:active {
    background: #f8f9fa;
}

.menu-card-photo {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--menu-accent-soft);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-accent);
    font-size: 1.6rem;
}

.menu-card-body {
    min-width: 0;
    flex: 1 1 auto;
}

.menu-card-title {
    font-weight: 700;
    font-size: 1.02rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-card-address {
    font-size: 0.85rem;
    color: var(--menu-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--menu-muted);
    margin-top: 4px;
}

.menu-stars {
    color: #f59f00;
    white-space: nowrap;
}

/* Immer alle 5 Sterne, gefuellt bis zum Durchschnitt (4.6 = 4 volle + 60 % des fuenften): <span class="menu-stars5" style="--r:4.6"> */
.menu-stars5 {
    position: relative;
    display: inline-block;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
    vertical-align: -1px;
}

.menu-stars5::before {
    content: "\f005\f005\f005\f005\f005";
    color: #dee2e6;
}

.menu-stars5::after {
    content: "\f005\f005\f005\f005\f005";
    color: #f59f00;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: calc(var(--r, 0) * 20%);
}

.menu-age-old {
    color: #c92a2a;
}

.menu-distance {
    font-weight: 600;
    color: var(--menu-accent);
}

.menu-empty {
    text-align: center;
    color: var(--menu-muted);
    padding: 48px 24px;
}

.menu-empty > i {
    font-size: 2.5rem;
    color: var(--menu-accent);
    margin-bottom: 12px;
}

/* Sections on detail pages */
.menu-section {
    padding: 14px;
    border-bottom: 8px solid #f1f3f5;
}

.menu-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.menu-rate {
    display: inline-flex;
    gap: 4px;
}

.menu-rate button {
    border: none;
    background: none;
    padding: 2px;
    font-size: 1.6rem;
    color: #dee2e6;
    line-height: 1;
}

.menu-rate button.on {
    color: #f59f00;
}

.menu-like-btn {
    border-radius: 999px;
    border: 1px solid var(--menu-border);
    background: #fff;
    padding: 6px 14px;
    font-weight: 600;
}

.menu-like-btn.on {
    background: var(--menu-accent-soft);
    border-color: var(--menu-accent);
    color: var(--menu-accent);
}

.menu-outdated {
    background: #fff9db;
    border: 1px solid #ffe066;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.menu-photo-wrap {
    text-align: center;
    background: #f8f9fa;
    padding: 10px;
}

.menu-photo-wrap .scan-image-wrap img {
    max-height: 48vh;
}

.menu-primary-btn {
    background: var(--menu-accent);
    border-color: var(--menu-accent);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 16px;
}

.menu-primary-btn:hover,
.menu-primary-btn:focus {
    background: #d9480f;
    border-color: #d9480f;
    color: #fff;
}

.menu-sticky-actions {
    position: sticky;
    bottom: calc(var(--menu-tabbar-h) + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--menu-border);
    padding: 10px 14px;
    z-index: 15;
}

/* Candidate restaurants in the scan flow */
.menu-candidate {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--menu-border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.menu-candidate.selected {
    border-color: var(--menu-accent);
    background: var(--menu-accent-soft);
}

.menu-candidate img,
.menu-candidate .menu-card-photo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    font-size: 1.2rem;
}

/* Comments */
.menu-comment {
    padding: 8px 0;
    border-bottom: 1px solid var(--menu-border);
}

.menu-comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.menu-comment-time {
    font-size: 0.78rem;
    color: var(--menu-muted);
}

/* Bottom tab bar */
.menu-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--menu-tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--menu-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 30;
}

.menu-tabbar a {
    color: var(--menu-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.72rem;
    gap: 2px;
    min-width: 56px;
}

/* Bottom sheets: language and account */
.menu-sheet.offcanvas-bottom {
    height: auto;
    max-height: 75vh;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
}

.menu-sheet .list-group-item {
    padding: 12px 14px;
    gap: 12px;
}

.menu-sheet .list-group-item.active {
    background: var(--menu-accent);
    border-color: var(--menu-accent);
}

.menu-lang-code {
    font-weight: 700;
    font-size: 0.8rem;
    width: 28px;
    opacity: 0.7;
}

.menu-tabbar a i {
    font-size: 1.2rem;
}

.menu-tabbar a.active {
    color: var(--menu-accent);
}

.menu-tabbar a.menu-tabbar-scan {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 50%;
    background: var(--menu-accent);
    color: #fff;
    margin-top: -26px;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(232, 89, 12, 0.4);
}

.menu-tabbar a.menu-tabbar-scan i {
    font-size: 1.4rem;
}

/* Erweiterte Suche im Umkreis (/Menu): Fortschritt und Status je Restaurant */
.menu-area h2 {
    font-size: 1.05rem;
}

.menu-progress .progress {
    height: 10px;
}

.menu-poi-status {
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.menu-poi-status.st-pending { background: #f1f3f5; color: var(--menu-muted); }
.menu-poi-status.st-busy { background: #fff3bf; color: #8a6d00; }
.menu-poi-status.st-lunch { background: #d3f9d8; color: #2b8a3e; font-weight: 600; }
.menu-poi-status.st-menu { background: #d0ebff; color: #1864ab; }
.menu-poi-status.st-none { background: #f1f3f5; color: var(--menu-muted); }
.menu-poi-status.st-error { background: #ffe3e3; color: #c92a2a; }

.menu-poi-web {
    color: #1864ab;
    cursor: pointer;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nearby (Umkreissuche) unter dem Suchfeld und Sortierung der Ergebnisse */
.menu-nearby {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.menu-nearby .form-range {
    flex: 1 1 auto;
}

.menu-nearby .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.menu-sortbar {
    padding: 10px 14px 0;
}

/* Standort der Umkreissuche (antippen = aendern) */
.menu-location-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid var(--menu-border);
    border-radius: 999px;
    background: #fff;
    color: var(--menu-muted);
    font-size: 0.82rem;
    text-align: left;
}

.menu-location-chip .fa-map-marker-alt {
    color: var(--menu-accent);
}

/* Karten: Name + Preis/Badge in einer Zeile, Adresse + Aktionen (Email-Hinweis, Website, Telefon) in einer Zeile */
.menu-list .menu-card-photo {
    width: 64px;
    height: 64px;
}

.menu-card-head,
.menu-card-sub {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-card-head .menu-card-title,
.menu-card-sub .menu-card-address {
    flex: 1 1 auto;
    min-width: 0;
}

.menu-card-badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--menu-accent);
    white-space: nowrap;
}

.menu-card-sub {
    margin-top: 4px;
}

.menu-card-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

.menu-act {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e7f1ff;
    color: #1864ab;
    font-size: 1rem;
    cursor: pointer;
}

.menu-act:active {
    background: #d0e4ff;
}

.menu-act.disabled {
    background: #f1f3f5;
    color: #adb5bd;
    cursor: default;
}

/* Neben Badge und Touch-Icons bleibt wenig Platz: Name und Adresse duerfen zweizeilig werden */
.menu-card-head .menu-card-title,
.menu-card-sub .menu-card-address {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.menu-card-badge {
    align-self: flex-start;
}

/* Zeile zwischen Name und Adresse: Entfernung, Kueche, Bewertung als Badges */
.menu-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 2px;
}

.menu-tag {
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #495057;
    white-space: nowrap;
}

.menu-tag-distance {
    background: var(--menu-accent-soft);
    color: var(--menu-accent);
}

.menu-tag.menu-stars {
    background: #fff9db;
    color: #e67700;
}

/* /Menu/Location: Scan links, digitalisierte Karte rechts (wie Scan & Translate); unter 576 px untereinander */
@media (min-width: 576px) {
    .menu-split {
        display: flex;
        align-items: flex-start;
        border-bottom: 8px solid #f1f3f5;
    }

    .menu-split-image {
        flex: 0 0 42%;
        position: sticky;
        top: 70px;
        max-height: calc(100vh - 80px);
        overflow: auto;
    }

    .menu-split-image .scan-image-wrap img {
        max-height: calc(100vh - 110px);
    }

    .menu-split-text {
        flex: 1 1 auto;
        min-width: 0;
        border-bottom: none;
    }
}

/* Kopf mit vielen Icons (Telefon, Website, Karte, Rescan): am Handy etwas kleiner */
@media (max-width: 420px) {
    .menu-header-row .menu-icon-btn {
        width: 34px;
        height: 34px;
    }

    .menu-header-row {
        gap: 6px;
    }
}

/* Account-Blatt: Eintraege von _AccountMenuItems gross genug zum Antippen */
.menu-account-list .dropdown-item {
    padding: 10px 6px;
    border-radius: 8px;
    white-space: normal;
}

.menu-account-list .dropdown-item .menu-icon {
    color: var(--menu-accent);
}

/* Oeffnungszeiten: jetzt offen / geschlossen */
.menu-tag.menu-tag-open {
    background: #d3f9d8;
    color: #2b8a3e;
}

.menu-tag.menu-tag-closed {
    background: #f1f3f5;
    color: #868e96;
}

/* Leiste unten nur so breit wie die App (am Desktop nicht ueber das ganze Fenster) */
.menu-tabbar {
    max-width: 720px;
    margin: 0 auto;
}

/* Sprache und Account: kompakte Pop-ups ueber ihrem Tab (links bzw. rechts), so breit wie der Inhalt */
.menu-sheet.offcanvas-bottom {
    left: max(8px, calc(50% - 352px));
    right: auto;
    bottom: calc(var(--menu-tabbar-h) + env(safe-area-inset-bottom) + 6px);
    width: max-content;
    min-width: 240px;
    max-width: min(340px, calc(100vw - 16px));
    max-height: calc(100vh - var(--menu-tabbar-h) - 40px);
    margin: 0;
    border: 1px solid var(--menu-border);
    border-radius: 16px;
    padding-bottom: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

#menuAccountSheet.offcanvas-bottom {
    left: auto;
    right: max(8px, calc(50% - 352px));
}

.menu-sheet .offcanvas-header {
    padding: 10px 14px;
}

.menu-sheet .offcanvas-body {
    padding: 0 10px 10px;
}

.menu-sheet .list-group-item {
    padding: 8px 12px;
}

/* Sprachliste: Zeilen sind kurz ("EN English") - der Hinweistext soll das Pop-up nicht verbreitern */
#menuLanguageSheet.offcanvas-bottom {
    width: 250px;
    min-width: 0;
}

/* Preise: Landeswaehrung, darunter dezent die Heimatwaehrung ("≈ $13.70") */
.menu-price {
    display: inline-block;
    text-align: right;
    line-height: 1.15;
}

.menu-price-avg {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--menu-muted);
}

.menu-price-home {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--menu-muted);
    white-space: nowrap;
}

.scan-item-price .menu-price-home {
    text-align: right;
}

/* Oeffnungsstatus rechtsbuendig in der Badge-Zeile (Entfernung und Kueche links) */
.menu-card-tags .menu-tag-open,
.menu-card-tags .menu-tag-closed {
    margin-left: auto;
}

/* Probefahrt ohne Konto (MenuTrials, /Menu?trial=1 im Telefonrahmen der Vorstellung): nur Mitglieder-Funktionen ausblenden */
.menu-trial .menu-member-only {
    display: none !important;
}

.menu-trial-over {
    text-align: center;
    padding: 56px 24px;
}

.menu-trial-over > i {
    font-size: 2.6rem;
    color: var(--menu-accent);
    margin-bottom: 12px;
}

.menu-trial-over h1 {
    font-size: 1.4rem;
    font-weight: 800;
}

.menu-trial-over p {
    color: var(--menu-muted);
    margin-bottom: 20px;
}

/* Probefahrt auf der Vorstellungsseite: die App nutzt die ganze Breite des Rahmens, ab Tablet-Breite etwas groessere Schrift */
.menu-trial .menu-shell,
.menu-trial .menu-tabbar {
    max-width: none;
}

@media (min-width: 768px) {
    html.menu-trial-root {
        font-size: 17.5px;
    }
}

.menu-trial .menu-sheet.offcanvas-bottom {
    left: 8px;
}

/* Suchbegriff ohne Treffer im Umkreis: Hinweis mit Auswahl (Treffer der Datenbank oder alle im Umkreis) */
.menu-choice {
    background: var(--menu-accent-soft);
    border: 1px solid #ffd8a8;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--menu-text);
    font-size: 0.85rem;
}

/* Sprache und Waehrung nebeneinander links in der Leiste (zaehlt als ein Eintrag, die Kamera bleibt in der Mitte) */
.menu-tabbar-group {
    display: flex;
    gap: 4px;
}

/* "Anna war hier" / "hat es hier geschmeckt" des eigenen Netzwerks (Restaurantseite) */
.menu-network {
    color: #2b8a3e;
}

/* Uebersicht der eigenen Empfehlungen im Dialog "Recommend us" */
.menu-ref-row {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.menu-ref-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
}

.menu-ref-steps,
.menu-ref-activity {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 0.8rem;
    margin-top: 4px;
}

.menu-ref-steps span {
    color: var(--menu-muted);
}

.menu-ref-steps span.done {
    color: #2b8a3e;
}

.menu-ref-activity {
    color: var(--menu-text);
}

/* Restaurantseite: alle Seiten einer Karte untereinander, die Seiten-Badges bleiben unter dem Kopf stehen */
.menu-pages-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #fff;
    padding: 6px 0;
    margin: -6px 0 8px;
    flex-wrap: nowrap;
}

.menu-page-start {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 0;
    margin-bottom: 6px;
    border-bottom: 2px solid var(--menu-accent);
}

.menu-page-end {
    text-align: center;
    color: var(--menu-muted);
    font-size: 0.8rem;
    padding: 8px 0;
    margin: 10px 0 22px;
    border-top: 1px dashed var(--menu-border);
}

.menu-pages-bar {
    scrollbar-width: none;
}

.menu-pages-bar::-webkit-scrollbar {
    display: none;
}
