/* =========================================================================
   3D TrickArt – Terminsystem
   Mobile first, optimiert für iPhone (Safe-Area, 44px Tap-Targets, kein Zoom)
   ========================================================================= */

:root {
    --tr-bg: #eef2f7;
    --tr-surface: #ffffff;
    --tr-surface-alt: #f6f8fb;
    --tr-border: #dfe6ef;
    --tr-text: #1f2b3a;
    --tr-text-muted: #64748b;

    --tr-primary: #04a1fe;
    --tr-primary-dark: #0077bd;
    --tr-accent: #86b729;
    --tr-accent-dark: #6d9620;
    --tr-happy: #8a2be2;
    --tr-happy-dark: #4b0082;
    --tr-warn: #f0952b;
    --tr-danger: #e0463c;

    --tr-radius: 16px;
    --tr-radius-sm: 12px;
    --tr-shadow: 0 6px 20px rgba(16, 38, 66, .08);
    --tr-shadow-lg: 0 12px 32px rgba(16, 38, 66, .16);

    --tr-safe-bottom: env(safe-area-inset-bottom, 0px);
    --tr-safe-top: env(safe-area-inset-top, 0px);
    --tr-bar-height: 78px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Tahoma, Arial, sans-serif;
    background: var(--tr-bg);
    color: var(--tr-text);
    line-height: 1.5;
    overflow-x: hidden;
    /* Platz für die fixierte Aktionsleiste */
    padding-bottom: calc(var(--tr-bar-height) + var(--tr-safe-bottom) + 12px);
}

img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- Kopfbereich */

.tr-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--tr-border);
    padding: calc(var(--tr-safe-top) + 10px) 16px 0;
}

.tr-header__top {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}

.tr-header__logo { height: 34px; width: auto; flex: 0 0 auto; }

.tr-header__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.tr-header__info {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(134, 183, 41, 0.45);
    background: rgba(134, 183, 41, 0.12);
    color: var(--tr-accent-dark);
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: tr-info-blink 2.4s ease-in-out infinite;
}

.tr-header__info:active { background: rgba(134, 183, 41, 0.22); }

@keyframes tr-info-blink {
    0%,
    100% {
        color: var(--tr-accent-dark);
        background: rgba(134, 183, 41, 0.12);
        border-color: rgba(134, 183, 41, 0.45);
        box-shadow: 0 0 0 0 rgba(134, 183, 41, 0);
    }
    50% {
        color: var(--tr-accent-dark);
        background: rgba(134, 183, 41, 0.22);
        border-color: var(--tr-accent);
        box-shadow: 0 0 0 4px rgba(134, 183, 41, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tr-header__info {
        animation: none;
    }
}

.tr-header__title span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--tr-text-muted);
}

/* ------------------------------------------------------------------ Stepper */

.tr-stepper {
    display: flex;
    gap: 4px;
    max-width: 760px;
    margin: 12px auto 0;
    padding-bottom: 10px;
    list-style: none;
}

.tr-stepper__item { flex: 1 1 0; min-width: 0; }

.tr-stepper__btn {
    display: block;
    width: 100%;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--tr-text-muted);
    cursor: default;
    text-align: center;
}

.tr-stepper__btn[data-clickable="1"] { cursor: pointer; }

.tr-stepper__bar {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--tr-border);
    margin-bottom: 6px;
    transition: background .25s ease;
}

.tr-stepper__label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tr-stepper__item--done .tr-stepper__bar { background: var(--tr-accent); }
.tr-stepper__item--done .tr-stepper__label { color: var(--tr-accent-dark); }
.tr-stepper__item--current .tr-stepper__bar { background: var(--tr-primary); }
.tr-stepper__item--current .tr-stepper__label { color: var(--tr-primary-dark); }

/* -------------------------------------------------------------- Zusammenfassung */

.tr-summary {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 10px;
}
.tr-summary.is-empty,
.tr-summary[hidden] { display: none; }
.tr-summary__extras {
    display: contents;
}

.tr-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tr-surface-alt);
    border: 1px solid var(--tr-border);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tr-text);
}

.tr-chip i { color: var(--tr-primary); font-size: 11px; }
.tr-chip--happy { background: #f4e9ff; border-color: #dcc2f7; color: var(--tr-happy-dark); }
.tr-chip--happy i { color: var(--tr-happy); }
.tr-chip--extra {
    background: #f3f8e9;
    border-color: #d5e6b0;
    color: var(--tr-accent-dark);
    padding-left: 6px;
}
.tr-chip--extra i { color: var(--tr-accent-dark); }
.tr-chip__img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 18px;
    background: #fff;
    border: 1px solid rgba(134, 183, 41, 0.35);
}

/* -------------------------------------------------------------------- Layout */

.tr-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px;
}

.tr-card {
    background: var(--tr-surface);
    border-radius: var(--tr-radius);
    box-shadow: var(--tr-shadow);
    padding: 18px 16px;
    margin-bottom: 14px;
}

.tr-card--flush { padding: 14px 10px; }

.tr-step-title {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.tr-step-sub {
    margin: 0 0 16px;
    color: var(--tr-text-muted);
    font-size: 14.5px;
}

.tr-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--tr-text-muted);
    margin: 20px 0 10px;
}

.tr-section-title:first-child { margin-top: 0; }

/* -------------------------------------------------------------------- Hinweise */

.tr-note {
    border-radius: var(--tr-radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 14px;
    border-left: 4px solid var(--tr-primary);
    background: #e8f5ff;
    color: #0b4c73;
}

.tr-note--accent { background: #f0f8e6; border-left-color: var(--tr-accent); color: #3f5c14; }
.tr-note--happy {
    background: linear-gradient(135deg, var(--tr-happy) 0%, var(--tr-happy-dark) 100%);
    border-left: 0;
    color: #fff;
}
.tr-note--warn { background: #fff5e6; border-left-color: var(--tr-warn); color: #7a4a06; }
.tr-note--danger { background: #fdecea; border-left-color: var(--tr-danger); color: #8c2019; }
.tr-note strong { font-weight: 700; }

/* ------------------------------------------------------------------- Kalender */

.tr-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.tr-cal-nav__title {
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    flex: 1 1 auto;
}

.tr-iconbtn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    border: 1px solid var(--tr-border);
    background: var(--tr-surface);
    color: var(--tr-text);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}

.tr-iconbtn:active { background: var(--tr-surface-alt); }
.tr-iconbtn:disabled { opacity: .35; cursor: default; }

.tr-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.tr-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--tr-text-muted);
    text-transform: uppercase;
}

.tr-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.tr-day {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--tr-surface-alt);
    color: var(--tr-text);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform .12s ease, box-shadow .12s ease;
}

.tr-day:active { transform: scale(.94); }
.tr-day--empty { background: none; cursor: default; }
.tr-day--disabled { background: #f1f3f6; color: #b6bfcc; cursor: default; text-decoration: line-through; }
.tr-day--past { background: none; color: #ccd4de; cursor: default; font-weight: 500; }
.tr-day--today { box-shadow: inset 0 0 0 2px var(--tr-primary); }

.tr-day--selected { background: var(--tr-primary); color: #fff; box-shadow: var(--tr-shadow-lg); }

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

.tr-day__heute {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 3px;
    z-index: 1;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-align: center;
    color: var(--tr-primary);
    pointer-events: none;
}

.tr-day--selected .tr-day__heute {
    color: #fff;
}

.tr-day--past .tr-day__heute,
.tr-day--disabled .tr-day__heute {
    color: inherit;
    opacity: 0.85;
}

.tr-day--today .tr-day__num {
    margin-bottom: 6px;
}

.tr-day--today .tr-day__dot {
    bottom: 14px;
}

.tr-day__dot {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 4px;
    border-radius: 999px;
}

.tr-day--selected .tr-day__dot { background: rgba(255, 255, 255, .85) !important; }

.tr-day__happy {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 11px;
    color: var(--tr-happy);
    z-index: 2;
}

.tr-day--today .tr-day__happy {
    top: 3px;
    right: 3px;
    font-size: 12px;
}

.tr-day--selected .tr-day__happy { color: var(--tr-happy); }

.tr-legend__happy {
    color: var(--tr-happy-dark);
    font-weight: 700;
}
.tr-legend__happy i {
    color: var(--tr-happy);
    width: auto;
    height: auto;
}

.heat-1 { background: #cfe9c2; }
.heat-2 { background: #a9d98a; }
.heat-3 { background: #f2c94c; }
.heat-4 { background: #f0952b; }
.heat-5 { background: #e0463c; }

.tr-cal-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--tr-text-muted);
    font-size: 14px;
}

.tr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
    font-size: 11px;
    color: var(--tr-text-muted);
}

.tr-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tr-legend i { width: 14px; height: 6px; border-radius: 3px; display: inline-block; }

/* ----------------------------------------------------------------- Zeitslots */

.tr-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}

.tr-time {
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-sm);
    background: var(--tr-surface);
    padding: 12px 6px 10px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    font: inherit;
    color: var(--tr-text);
    transition: transform .12s ease, box-shadow .12s ease;
}

.tr-time:active { transform: scale(.96); }
.tr-time__zeit { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.tr-time__info { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }

.tr-time--frei { border-color: #b6dda0; background: #f2faec; }
.tr-time--frei .tr-time__info { color: var(--tr-accent-dark); }
.tr-time--knapp { border-color: #f5cf9a; background: #fff7ec; }
.tr-time--knapp .tr-time__info { color: #a4650c; }
.tr-time--letzte { border-color: #f3b0aa; background: #fdf1f0; }
.tr-time--letzte .tr-time__info { color: var(--tr-danger); }
.tr-time--voll { background: #f1f3f6; color: #a8b2c0; cursor: default; border-color: #e4e8ee; }
.tr-time--voll .tr-time__zeit { text-decoration: line-through; }

/* Happy Hour: normale Verfügbarkeitsfarbe, nur lila Stern */
.tr-time--happy {
    position: relative;
}

.tr-time__happy {
    position: absolute;
    top: 5px;
    right: 6px;
    font-size: 11px;
    color: var(--tr-happy);
    line-height: 1;
    pointer-events: none;
}

.tr-time--selected { box-shadow: 0 0 0 3px var(--tr-primary); }

.tr-time-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.tr-time-badge {
    border: 0;
    border-radius: 999px;
    background: var(--tr-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 16px;
    min-height: 40px;
    cursor: pointer;
}

.tr-time-badge:active { background: var(--tr-accent-dark); }

/* -------------------------------------------------------------- Personenzähler */

.tr-counters { display: flex; flex-direction: column; gap: 10px; }

.tr-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-sm);
    background: var(--tr-surface);
    padding: 12px 12px;
}

.tr-counter__text { flex: 1 1 auto; min-width: 0; }
.tr-counter__title { font-size: 15px; font-weight: 700; margin: 0; }
.tr-counter__meta { font-size: 12.5px; color: var(--tr-text-muted); margin: 2px 0 0; }

.tr-counter__controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.tr-counter__btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--tr-border);
    background: var(--tr-surface-alt);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--tr-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tr-counter__btn:active { background: #e6ebf2; }
.tr-counter__btn:disabled { opacity: .3; cursor: default; }
.tr-counter__btn--plus { background: var(--tr-accent); border-color: var(--tr-accent); color: #fff; }
.tr-counter__btn--plus:active { background: var(--tr-accent-dark); }
.tr-counter__btn--plus:disabled { background: var(--tr-surface-alt); border-color: var(--tr-border); color: var(--tr-text); }

.tr-counter__value {
    min-width: 34px;
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- Extras */

.tr-deal-strip {
    margin: 0 0 18px;
    padding: 14px;
    border-radius: var(--tr-radius-sm);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(138, 43, 226, 0.14), transparent 55%),
        radial-gradient(100% 100% at 100% 100%, rgba(46, 160, 90, 0.12), transparent 50%),
        linear-gradient(180deg, #f7f3ff 0%, #f3faf5 100%);
    border: 1px solid rgba(138, 43, 226, 0.18);
}

.tr-deal-strip__kicker {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tr-happy-dark);
}

.tr-deal-strip__kicker i { margin-right: 6px; color: var(--tr-happy); }

.tr-deal-strip__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.tr-deal-card {
    position: relative;
    padding: 12px 12px 11px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--tr-border);
    box-shadow: 0 8px 18px rgba(20, 24, 60, 0.06);
}

.tr-deal-card--happy { border-color: rgba(138, 43, 226, 0.28); }
.tr-deal-card--family { border-color: rgba(46, 160, 90, 0.28); }

.tr-deal-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: var(--tr-happy);
}

.tr-deal-card--family .tr-deal-card__badge { background: #2ea05a; }

.tr-deal-card__lead {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--tr-text-muted);
    line-height: 1.35;
}

.tr-deal-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 4px;
    color: var(--tr-text);
}

.tr-deal-card__price strong {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--tr-happy-dark);
}

.tr-deal-card--family .tr-deal-card__price strong { color: #1f8a48; }

.tr-deal-card__price span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tr-text-muted);
}

.tr-deal-card__compare {
    margin: 0;
    font-size: 12.5px;
    color: var(--tr-text-muted);
}

.tr-extra { border: 1px solid var(--tr-border); border-radius: var(--tr-radius-sm); overflow: hidden; margin-bottom: 12px; }
.tr-extra--deal {
    border-color: rgba(138, 43, 226, 0.28);
    box-shadow: 0 10px 22px rgba(138, 43, 226, 0.08);
}
.tr-extra__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 10px;
}
.tr-extra__img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 16px;
    background: var(--tr-surface-alt);
    border: 1px solid var(--tr-border);
}
.tr-extra__body { flex: 1 1 auto; min-width: 0; }
.tr-extra__badge {
    display: inline-block;
    background: var(--tr-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 6px;
}
.tr-extra__badge--save { background: var(--tr-happy); }
.tr-extra__title { font-size: 16.5px; font-weight: 800; margin: 0 0 4px; }
.tr-extra__price { font-size: 14px; font-weight: 700; color: var(--tr-accent-dark); margin: 0 0 6px; }
.tr-extra__deal {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin: 0 0 8px;
}
.tr-extra__deal-now {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tr-happy-dark);
    letter-spacing: -0.02em;
}
.tr-extra__deal-now small {
    font-size: 12px;
    font-weight: 600;
    color: var(--tr-text-muted);
}
.tr-extra__deal-was {
    font-size: 13px;
    color: var(--tr-text-muted);
}
.tr-extra__deal-was s {
    color: #9aa1b5;
    margin-right: 4px;
}
.tr-extra__text { font-size: 13.5px; color: var(--tr-text-muted); margin: 0; }
.tr-extra__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--tr-surface-alt);
    border-top: 1px solid var(--tr-border);
    padding: 10px 12px;
}
.tr-extra__sum { font-size: 13.5px; font-weight: 700; color: var(--tr-text-muted); }

@media (min-width: 520px) {
    .tr-extra__img {
        flex-basis: 88px;
        width: 88px;
        height: 88px;
        border-radius: 18px;
    }
}

/* Info-Sheet: vergünstigte Preise */
.tr-info-deals {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
}
.tr-info-deal {
    padding: 12px;
    border-radius: 14px;
    background: var(--tr-surface-alt);
    border: 1px solid var(--tr-border);
}
.tr-info-deal--happy { border-color: rgba(138, 43, 226, 0.25); background: #f7f1ff; }
.tr-info-deal--family { border-color: rgba(46, 160, 90, 0.25); background: #f1faf4; }
.tr-info-deal__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--tr-happy-dark);
}
.tr-info-deal--family .tr-info-deal__badge { color: #1f8a48; }
.tr-info-deal__lead { margin: 0 0 4px; font-size: 13px; color: var(--tr-text-muted); }
.tr-info-deal__price { margin: 0 0 2px; font-size: 15px; }
.tr-info-deal__price strong { font-size: 1.35rem; }
.tr-info-deal__price span { font-size: 12.5px; color: var(--tr-text-muted); margin-left: 4px; }
.tr-info-deal__compare { margin: 0; font-size: 12.5px; color: var(--tr-text-muted); }

@media (min-width: 520px) {
    .tr-deal-strip__grid { grid-template-columns: 1fr 1fr; }
}

.tr-total__row--extras {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}
.tr-total__row--extras > span:first-child {
    flex: 0 0 auto;
    padding-top: 6px;
}
.tr-summary--inline {
    margin: 0;
    padding: 0;
    max-width: none;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.tr-total {
    background: var(--tr-surface-alt);
    border: 1px dashed var(--tr-border);
    border-radius: var(--tr-radius-sm);
    padding: 14px;
}

.tr-total__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14.5px;
    padding: 3px 0;
}

.tr-total__row--sum {
    border-top: 1px solid var(--tr-border);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 17px;
    font-weight: 800;
}

.tr-total__hint { font-size: 12.5px; color: var(--tr-text-muted); margin-top: 8px; }

.tr-total__hint a {
    color: var(--tr-primary-dark);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tr-total__hint a i { font-size: 10px; }

/* ------------------------------------------------------------------ Formular */

.tr-field { margin-bottom: 14px; }

.tr-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tr-input {
    width: 100%;
    /* 16px verhindert das Auto-Zoom von iOS Safari */
    font-size: 16px;
    font-family: inherit;
    padding: 13px 14px;
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-sm);
    background: var(--tr-surface);
    color: var(--tr-text);
    -webkit-appearance: none;
    appearance: none;
}

.tr-input:focus {
    outline: none;
    border-color: var(--tr-primary);
    box-shadow: 0 0 0 3px rgba(4, 161, 254, .16);
}

.tr-input--error { border-color: var(--tr-danger); background: #fffafa; }

.tr-field-error {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-danger);
}

.tr-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    cursor: pointer;
}

.tr-check input {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--tr-accent);
}

.tr-check a,
.tr-check__link {
    color: var(--tr-primary-dark);
    font: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tr-check__link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tr-check--error { border-radius: 10px; box-shadow: 0 0 0 2px var(--tr-danger); padding: 8px; margin-left: -8px; }
.tr-check--error input { accent-color: var(--tr-danger); }

.tr-consent-hinweis {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fdecea;
    color: #8c2019;
    border-left: 4px solid var(--tr-danger);
    border-radius: var(--tr-radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.tr-consent-hinweis[hidden] { display: none; }

/* ------------------------------------------------------------- Aktionsleiste */

.tr-actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 10px;
    padding: 12px 16px calc(12px + var(--tr-safe-bottom));
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--tr-border);
}

.tr-actionbar__inner {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.tr-btn {
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    min-height: 52px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, opacity .15s ease;
}

.tr-btn:active { transform: scale(.98); }

.tr-btn--back {
    flex: 0 0 auto;
    min-width: 58px;
    background: var(--tr-surface-alt);
    border: 1px solid var(--tr-border);
    color: var(--tr-text);
}

.tr-btn--next { flex: 1 1 auto; background: var(--tr-accent); color: #fff; }
.tr-btn--next:disabled { background: #cbd3de; color: #8c97a6; cursor: default; }
.tr-btn--submit { background: var(--tr-danger); color: #fff; }
.tr-btn--ghost { background: transparent; border: 1px solid var(--tr-border); color: var(--tr-text); }
.tr-btn--schmal { flex: 0 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------------- Modal */

.tr-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 25, 40, .55);
    padding: 0;
}

.tr-modal[open], .tr-modal.is-open { display: flex; }

/* Zweites Modal über dem Info-Menü (z. B. Storno-Erklärung) */
.tr-modal--overlay { z-index: 110; }

.tr-modal__box {
    background: var(--tr-surface);
    width: 100%;
    max-width: 520px;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(20px + var(--tr-safe-bottom));
    max-height: 86vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: tr-slide-up .22s ease;
}

@keyframes tr-slide-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.tr-modal__title { font-size: 18px; font-weight: 800; margin: 0 0 10px; line-height: 1.3; }
.tr-modal__body { font-size: 14.5px; color: var(--tr-text); }
.tr-modal__body p { margin: 0 0 10px; }
.tr-modal__hl { background: #fff5e6; border-left: 4px solid var(--tr-warn); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.tr-modal__actions { display: flex; gap: 10px; margin-top: 18px; }
.tr-modal__actions .tr-btn { flex: 1 1 auto; }

/* Längere Infotexte (z. B. Stornierungsgebühren) – iPhone-lesbar */
.tr-modal__box--lesetext {
    max-height: min(92vh, 100%);
    padding: 22px 18px calc(22px + var(--tr-safe-bottom));
}

.tr-modal__box--lesetext .tr-modal__title {
    font-size: 18px;
    letter-spacing: -.2px;
    margin-bottom: 14px;
    padding-right: 4px;
}

.tr-modal__body--lesetext {
    font-size: 16px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.tr-modal__body--lesetext p {
    margin: 0 0 14px;
}

.tr-modal__body--lesetext p:last-child { margin-bottom: 0; }

.tr-modal__body--lesetext strong {
    font-weight: 700;
    white-space: nowrap;
}

.tr-modal__dank {
    margin-top: 4px !important;
    padding-top: 12px;
    border-top: 1px solid var(--tr-border);
    font-weight: 600;
}

/* --------------------------------------------------- Dialog Stornobedingungen */

.tr-modal__box--storno { padding-top: 22px; }

.tr-storno__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tr-border);
}

.tr-storno__icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e9f7d8 0%, #d3edb4 100%);
    color: var(--tr-accent-dark);
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tr-storno__titel {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.tr-storno__sub {
    margin: 2px 0 0;
    font-size: 13.5px;
    color: var(--tr-text-muted);
}

.tr-storno__liste {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
}

.tr-storno__punkt {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 0;
    border-bottom: 1px solid var(--tr-border);
}

.tr-storno__punkt:last-child { border-bottom: 0; }

.tr-storno__marke {
    flex: 0 0 auto;
    min-width: 52px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--tr-surface-alt);
    border: 1px solid var(--tr-border);
    color: var(--tr-text-muted);
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tr-storno__punkt--gut .tr-storno__marke {
    background: var(--tr-accent);
    border-color: var(--tr-accent);
    color: #fff;
}

.tr-storno__punkt--warn .tr-storno__marke {
    background: #fdecea;
    border-color: #f3b0aa;
    color: var(--tr-danger);
}

.tr-storno__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-storno__text strong { font-size: 15px; font-weight: 700; line-height: 1.3; }
.tr-storno__text span { font-size: 13px; color: var(--tr-text-muted); line-height: 1.35; }

.tr-storno__fuss {
    margin: 16px 0 0;
    padding: 11px 13px;
    border-radius: var(--tr-radius-sm);
    background: var(--tr-surface-alt);
    font-size: 13.5px;
    color: var(--tr-text);
    text-align: center;
}

.tr-storno__info-link {
    margin: 14px 0 0;
}

.tr-storno__info-link .tr-btn--info {
    width: 100%;
    min-height: 48px;
    height: auto;
    padding: 12px 14px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    justify-content: flex-start;
    white-space: normal;
}

.tr-storno__info-link .tr-btn--info i {
    flex: 0 0 auto;
    color: var(--tr-primary);
    font-size: 16px;
}

/* ------------------------------------------------------ Linkliste im Info-Sheet */

.tr-linklist { display: flex; flex-direction: column; }

.tr-linklist a,
.tr-linklist button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 4px;
    border: 0;
    border-bottom: 1px solid var(--tr-border);
    border-radius: 0;
    background: transparent;
    color: var(--tr-text);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tr-linklist a:last-child,
.tr-linklist button:last-child { border-bottom: 0; }

.tr-linklist a:active,
.tr-linklist button:active { background: var(--tr-surface-alt); }

.tr-linklist a span,
.tr-linklist button span { flex: 1 1 auto; }

.tr-linklist a i:first-child,
.tr-linklist button i:first-child {
    width: 22px;
    text-align: center;
    color: var(--tr-primary);
    font-size: 16px;
}

.tr-linklist a i:last-child,
.tr-linklist button i:last-child {
    color: var(--tr-text-muted);
    font-size: 12px;
}

/* ------------------------------------------------------------- Größere Screens */

@media (min-width: 620px) {
    :root { --tr-bar-height: 84px; }
    .tr-header__logo { height: 42px; }
    .tr-header__title { font-size: 17px; }
    .tr-stepper__label { font-size: 12px; }
    .tr-step-title { font-size: 25px; }
    .tr-card { padding: 24px 22px; }
    .tr-times { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
    /* Auf breiten Screens sollen die Kalenderfelder nicht quadratisch mitwachsen */
    .tr-day { aspect-ratio: auto; min-height: 58px; font-size: 16px; }
    .tr-cal-grid, .tr-cal-weekdays { gap: 6px; }
    .tr-modal { align-items: center; padding: 24px; }
    .tr-modal__box { border-radius: 20px; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
