/* Skala 1–10: Balken (wie Info-Ansicht) */
.tr-scale-bar {
    display: inline-block;
    width: 6.5rem;
    vertical-align: middle;
}

.tr-scale-bar--compact {
    width: 5.5rem;
}

.tr-scale-bar__track {
    width: 100%;
    height: 0.25rem;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}

.tr-rating-bar__track {
    position: relative;
    width: 100%;
    height: 0.5rem;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: visible;
}

/* Kommentar-Karte: Text oben, Bewertungen im abgesetzten Fußbereich */
.tr-comment-card {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.dark .rating-modal .tr-comment-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tr-scale-bar__fill,
.tr-rating-bar__fill {
    display: block;
    height: 100%;
    border-radius: 9999px;
    min-width: 0;
    transition: width 0.15s ease, background-color 0.15s ease;
}

.tr-rating-bar {
    width: 100%;
}

.tr-rating-bar__hit {
    padding: 0.85rem 0;
    cursor: grab;
    touch-action: none;
    border-radius: 0.375rem;
    -webkit-tap-highlight-color: transparent;
}

/* Thumb ragt über den Balken – seitlicher Abstand, v. a. auf Mobil (overflow-x-hidden im Formular) */
@media (max-width: 639px) {
    .tr-rating-bar__hit {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

.tr-rating-bar__hit:active {
    cursor: grabbing;
}

.tr-rating-bar:focus-visible .tr-rating-bar__hit {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.tr-rating-bar__track-inner {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    overflow: hidden;
    pointer-events: none;
}

.tr-rating-bar__thumb {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: -0.675rem;
    transform: translateY(-50%);
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid var(--thumb-accent, #94a3b8);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.06);
    pointer-events: none;
    transition: left 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.tr-rating-bar__thumb--set {
    border-width: 3px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.tr-rating-bar__thumb--empty {
    opacity: 0.92;
}

@media (min-width: 640px) {
    .tr-rating-bar__hit {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    .tr-rating-bar__track {
        height: 0.375rem;
    }

    .tr-rating-bar__thumb {
        width: 1.15rem;
        height: 1.15rem;
        margin-left: -0.575rem;
    }
}

html.dark .rating-modal .tr-rating-bar__thumb {
    background: #f8fafc;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.tr-gauge {
    --gauge-size: 7.5rem;
    --gauge-thickness: 0.7rem;
    --gauge-progress: 0%;
    --gauge-track: #e2e8f0;
    --gauge-fill: #10b981;
    position: relative;
    width: var(--gauge-size);
    height: var(--gauge-size);
    border-radius: 9999px;
    background: conic-gradient(var(--gauge-fill) var(--gauge-progress), var(--gauge-track) 0);
    display: grid;
    place-items: center;
}

.tr-gauge::before {
    content: '';
    position: absolute;
    width: calc(100% - (var(--gauge-thickness) * 2));
    height: calc(100% - (var(--gauge-thickness) * 2));
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.tr-gauge__inner {
    position: relative;
    z-index: 1;
}

.tr-gauge__value {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* Gesamtbewertung (1–100): nur die Zahl vergrößert, Ring wie zuvor */
.tr-gauge.tr-gauge-overall {
    --gauge-size: 7.8rem;
    --gauge-thickness: 0.8rem;
}

.tr-gauge.tr-gauge-overall .tr-gauge__value {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/* Kompakte Gesamtbewertung (sticky-Header in der Info-Ansicht) */
.tr-gauge.tr-gauge--compact {
    --gauge-size: 2.5rem;
    --gauge-thickness: 0.4rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tr-gauge.tr-gauge--compact.tr-gauge-overall .tr-gauge__value {
    font-size: 0.95rem;
    font-weight: 800;
}

.tr-gauge.tr-gauge--compact-mobile {
    --gauge-size: 1.85rem;
    --gauge-thickness: 0.32rem;
    flex-shrink: 0;
}

.tr-gauge.tr-gauge--compact-mobile.tr-gauge-overall .tr-gauge__value {
    font-size: 0.72rem;
    font-weight: 800;
}

/* Scroll-Sperre für Seite, wenn Bewertungs-Modal offen */
html.tr-rating-modal-open,
html.tr-rating-modal-open body {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Fester Kopf wie Seiten-header (fixed): Kompakt ändert nur die Darstellung */
.tr-info-rating-header-fixed {
    pointer-events: none;
    box-sizing: border-box;
}

.tr-info-rating-header-fixed .tr-info-rating-header__filters,
.tr-info-rating-header-fixed .tr-info-rating-header__filters * {
    pointer-events: auto;
}

/* Fester Bewertungskopf */
.tr-info-rating-header {
    transition: box-shadow 0.3s ease;
}

.tr-info-rating-header--compact {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

html.dark .rating-modal .tr-info-rating-header--compact {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.tr-info-rating-header__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0 1rem;
    transition: gap 0.3s ease, padding 0.3s ease;
}

@media (min-width: 640px) {
    .tr-info-rating-header__layout {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 1.25rem 0 1.5rem;
    }
}

/* Kompakt: kleinere Abstände und Typo */
.tr-info-rating-header__layout.is-compact {
    gap: 0.625rem;
    padding: 0.5rem 0 0.625rem;
}

/* Mobil kompakt: 2 Spalten (Gauge+Text | Details) spart vertikalen Platz */
@media (max-width: 639px) {
    .tr-info-rating-header__layout.is-compact {
        grid-template-columns: auto 1fr;
        gap: 0.5rem 0.65rem;
        align-items: start;
    }
}

@media (min-width: 640px) {
    .tr-info-rating-header__layout.is-compact {
        gap: 1.25rem 2rem;
    }
}

.tr-info-rating-header__gauge {
    transition: width 0.3s ease, height 0.3s ease, --gauge-size 0.3s ease, --gauge-thickness 0.3s ease;
}

.tr-info-rating-header__gauge .tr-gauge__value {
    transition: font-size 0.3s ease;
}

.tr-info-rating-header__primary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.3s ease;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__primary {
    gap: 0.2rem;
}

.tr-info-rating-header__verbal {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-top: 0.625rem;
    transition: font-size 0.3s ease, margin-top 0.3s ease;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__verbal {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.tr-info-rating-header__count {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    transition: font-size 0.3s ease, margin-top 0.3s ease;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__count {
    font-size: 0.62rem;
    margin-top: 0.125rem;
}

.tr-info-rating-header__ai-hint {
    margin-top: 0.25rem;
    transition: opacity 0.25s ease, max-height 0.25s ease;
}

.tr-info-rating-header__detail-bars {
    gap: 0.625rem;
    transition: gap 0.3s ease;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__detail-bars {
    gap: 0.375rem;
}

.tr-info-rating-header__detail-label {
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
    transition: font-size 0.3s ease, margin-bottom 0.3s ease;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__detail-label {
    font-size: 0.58rem;
    margin-bottom: 0.125rem;
}

.tr-info-rating-header__detail-name-short {
    display: none;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__detail-name-full {
    display: none;
}

.tr-info-rating-header__layout.is-compact .tr-info-rating-header__detail-name-short {
    display: inline;
}

.tr-info-rating-header__filters {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-top: 0 solid transparent;
    transition: max-height 0.3s ease, opacity 0.28s ease, padding 0.3s ease, border-color 0.3s ease;
}

.tr-info-rating-header__filters.is-visible {
    max-height: 4.5rem;
    opacity: 1;
    pointer-events: auto;
    padding-top: 0.375rem;
    border-top-width: 1px;
    border-top-color: #e2e8f0;
}

@media (min-width: 640px) {
    .tr-info-rating-header__filters.is-visible {
        max-height: 6rem;
        padding-top: 0.5rem;
    }
}

html.dark .rating-modal .tr-info-rating-header__filters.is-visible {
    border-top-color: #334155;
}

.tr-info-sticky-anchor {
    left: 0;
    right: 0;
    width: 100%;
}

.tr-info-sticky-bar {
    position: absolute;
    top: 0;
    left: -1rem;
    right: -1rem;
    width: auto;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.tr-info-sticky-anchor.is-active {
    pointer-events: auto;
}

.tr-info-sticky-anchor.is-active .tr-info-sticky-bar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tr-info-sticky__detail {
    min-width: 0;
}

.tr-info-sticky-bar__mobile {
    padding: 0.125rem 0;
}

@media (min-width: 640px) {
    .tr-info-sticky-bar {
        left: -1.5rem;
        right: -1.5rem;
        padding: 0.5rem 1.5rem;
    }
}

html.dark .rating-modal .tr-info-sticky-bar {
    background: #0f172a;
    border-bottom-color: #334155;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Bewertungs-Modal: Skala & Primäraktionen im Dark-Mode (Komponente .rating-modal) */
html.dark .rating-modal .tr-scale-bar__track,
html.dark .rating-modal .tr-rating-bar__track {
    background: #334155;
}

html.dark .rating-modal .tr-gauge {
    --gauge-track: #334155;
}

html.dark .rating-modal .tr-gauge::before {
    background: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

html.dark .rating-modal .tr-gauge__value {
    color: #f8fafc;
}

/* Erbt ggf. dunkle Elternfarbe (AJAX-Loading); Primärbuttons bleiben weiß */
html.dark .rating-modal button.bg-emerald-600 {
    color: #fff !important;
}

/* Touch (coarse pointer): erste Tap-Auswahl vor zweitem Tap zum Bewerten */
#tr-seatmap-svg .tr-seat.tr-touch-selected {
    stroke: #10b981 !important;
    stroke-width: 0.35 !important;
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.95));
}
#tr-seatmap-svg path.tr-row.tr-touch-selected,
#tr-seatmap-svg circle.tr-row.tr-touch-selected {
    stroke: #10b981 !important;
    stroke-width: 0.5 !important;
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.95));
}
@media (max-width: 639px) {
    /* Nur Formular-Gauges, nicht der Info-Header (dort eigene Größen) */
    .rating-modal .tr-gauge:not(.tr-info-rating-header__gauge) {
        --gauge-size: 6.75rem;
        --gauge-thickness: 0.68rem;
    }

    .rating-modal .tr-gauge.tr-gauge-overall:not(.tr-info-rating-header__gauge) {
        --gauge-size: 6.75rem;
        --gauge-thickness: 0.7rem;
    }

    .rating-modal .tr-gauge.tr-gauge-overall:not(.tr-info-rating-header__gauge) .tr-gauge__value {
        font-size: 2.125rem;
    }

    .rating-modal .tr-info-rating-header__gauge.tr-gauge-overall {
        --gauge-size: 5.25rem;
        --gauge-thickness: 0.55rem;
    }

    .rating-modal .tr-info-rating-header__gauge.tr-gauge-overall .tr-gauge__value {
        font-size: 1.65rem;
    }

    .rating-modal .tr-info-rating-header__gauge.tr-gauge--compact-mobile.tr-gauge-overall {
        --gauge-size: 1.85rem;
        --gauge-thickness: 0.32rem;
    }

    .rating-modal .tr-info-rating-header__gauge.tr-gauge--compact-mobile.tr-gauge-overall .tr-gauge__value {
        font-size: 0.72rem;
    }
}
.tr-touch-second-tap-hint {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.35;
    opacity: 0.88;
}
