/* Translated menu (ImageTextScanResult) rendered by menu-viewer.js - used by /Media/UploadEdit
   (Scan & Translate) and the Menu service. Image with clickable zones + list of dishes. */

.scan-image-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.scan-image-wrap img {
    display: block;
    max-width: 100%;
}

.scan-laser {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #0dcaf0;
    box-shadow: 0 0 14px 4px rgba(13, 202, 240, 0.7);
    animation: scan-laser-move 1.8s ease-in-out infinite alternate;
    display: none;
}

.scan-image-wrap.scanning .scan-laser {
    display: block;
}

.scan-image-wrap.scanning img {
    filter: brightness(0.85);
}

@keyframes scan-laser-move {
    from { top: 0; }
    to { top: calc(100% - 3px); }
}

.scan-box {
    position: absolute;
    border: 2px solid rgba(13, 202, 240, 0.0);
    border-radius: 3px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.scan-image-wrap.boxes-visible .scan-box {
    border-color: rgba(13, 202, 240, 0.45);
    pointer-events: auto;
    cursor: pointer;
}

.scan-image-wrap.boxes-visible .scan-box:hover {
    background: rgba(13, 202, 240, 0.15);
}

.scan-box.active {
    border-color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.25);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
}

.scan-section-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    color: #0aa2c0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 4px;
    margin: 1rem 0 0.5rem;
}

.scan-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.scan-item:hover {
    background: rgba(13, 202, 240, 0.1);
}

.scan-item.active {
    background: rgba(255, 193, 7, 0.25);
    box-shadow: inset 3px 0 0 #ffc107;
}

.scan-item-name {
    font-weight: 600;
}

.scan-item-price {
    white-space: nowrap;
    font-weight: 600;
}

.scan-item-original {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.hide-original .scan-item-original {
    display: none;
}

.scan-item-details {
    font-size: 0.85rem;
}

.scan-item-explanation {
    font-size: 0.85rem;
    color: #495057;
}

.scan-item-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: #1b5e20;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

/* Kategorie und Allergene je Gericht (gedruckt = orange, KI-Check = violett gestrichelt) */
.scan-diet-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.scan-diet {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.scan-diet-meat { background: #ffe3e3; color: #c92a2a; }
.scan-diet-fish { background: #d0ebff; color: #1864ab; }
.scan-diet-surf { background: #e5dbff; color: #5f3dc4; }
.scan-diet-veg { background: #d3f9d8; color: #2b8a3e; }
.scan-diet-vegan { background: #c3fae8; color: #087f5b; }

.scan-allergen {
    border: 1px solid #ffc078;
    color: #d9480f;
    background: #fff9f0;
    border-radius: 6px;
    padding: 0 6px;
    font-size: 0.68rem;
    font-weight: 600;
}

.scan-allergen b {
    font-weight: 800;
}

.scan-allergen.ai {
    border-style: dashed;
    border-color: #b197fc;
    color: #5f3dc4;
    background: #f8f0fc;
}

.scan-ai-label {
    font-size: 0.66rem;
    font-weight: 800;
    color: #7048e8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scan-disclaimer {
    display: flex;
    gap: 10px;
    background: #f8f0fc;
    border: 1px dashed #b197fc;
    color: #5f3dc4;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.76rem;
    margin: 10px 0 4px;
}

.scan-disclaimer i {
    margin-top: 2px;
}

.hide-allergens .scan-allergen,
.hide-allergens .scan-ai-label,
.hide-allergens .scan-disclaimer {
    display: none;
}

/* Filter nach Kategorie: andere Gerichte (und Abschnitte ohne Treffer) ausblenden, auf dem Foto abblenden */
.scan-diet-hidden {
    display: none !important;
}

.scan-dim {
    opacity: 0.22;
}

.scan-diet-chip {
    border: 1px solid #e9ecef;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.scan-diet-chip.active {
    background: #e8590c;
    border-color: #e8590c;
    color: #fff;
}

.scan-diet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* "RU → RU" antippen: Karte in einer anderen Sprache zeigen */
.scan-lang-pick .badge {
    cursor: pointer;
}

.scan-lang-pick .dropdown-menu {
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.88rem;
}

.scan-lang-pick .dropdown-item b {
    display: inline-block;
    width: 28px;
}

/* Je Gericht: Sterne, Kalorien, "Anna hat es hier geschmeckt" (Restaurantseite, MenuSocialService) */
.scan-item-extras {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.75rem;
}

.scan-item-stars, .scan-kcal, .scan-kcal-btn {
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 6px;
    padding: 0 6px;
    color: #495057;
    line-height: 1.6;
}

.scan-item-stars .fa-star { color: #f59f00; }
.scan-item-stars.mine { border-color: #f59f00; }
.scan-kcal { background: #f1f3f5; }
.scan-kcal-btn { color: #868e96; }
.scan-item-network { color: #2b8a3e; }

.scan-rate-row button {
    border: none;
    background: none;
    padding: 2px 3px;
    font-size: 1.25rem;
    color: #dee2e6;
}

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