/* ==========================================================
   Termin buchen – Standortwahl Modal
   ========================================================== */

#terminModal {
    --tm-brand: #ff9326;
    --tm-bg: #141414;
    --tm-card: #1d1d1d;
    --tm-card-hover: #242424;
    --tm-line: rgba(255, 255, 255, .10);
    --tm-text: #ffffff;
    --tm-muted: rgba(255, 255, 255, .62);
}

#terminModal .modal-dialog {
    max-width: 760px;
}

#terminModal .modal-content {
    position: relative;
    background: var(--tm-bg);
    color: var(--tm-text);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

/* thin brand line on top */
#terminModal .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tm-brand);
}

.tm-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--tm-line);
    border-radius: 50%;
    background: transparent;
    color: var(--tm-text);
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .25s, color .25s, transform .25s;
    z-index: 2;
}

.tm-close:hover,
.tm-close:focus-visible {
    border-color: var(--tm-brand);
    color: var(--tm-brand);
    transform: rotate(90deg);
    outline: none;
}

.tm-body {
    padding: 56px 56px 48px;
}

.tm-eyebrow {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--tm-brand);
    margin: 0 0 14px;
}

.tm-title {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 400;
    color: var(--tm-text);
    margin: 0 0 10px;
}

.tm-title em {
    font-style: italic;
    color: var(--tm-brand);
}

.tm-lead {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: var(--tm-muted);
    margin: 0 0 36px;
}

.tm-locations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tm-loc {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px 24px;
    background: var(--tm-card);
    border: 1px solid var(--tm-line);
    color: var(--tm-text) !important;
    text-decoration: none !important;
    transition: background .3s, border-color .3s, transform .3s;
    overflow: hidden;
}

.tm-loc:hover,
.tm-loc:focus-visible {
    background: var(--tm-card-hover);
    border-color: var(--tm-brand);
    transform: translateY(-3px);
    outline: none;
}

.tm-loc__num {
    font-family: 'Playfair Display', serif;
    font-size: 44px;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--tm-brand);
    margin-bottom: 22px;
    transition: color .3s;
}

.tm-loc:hover .tm-loc__num {
    color: var(--tm-brand);
}

.tm-loc__studio {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--tm-muted);
    margin-bottom: 6px;
}

.tm-loc__name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    line-height: 1.2;
    color: var(--tm-text);
    margin-bottom: 12px;
}

.tm-loc__addr {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tm-muted);
    margin-bottom: 26px;
}

.tm-loc__addr i {
    color: var(--tm-brand);
    margin-right: 6px;
}

.tm-loc__cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--tm-line);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tm-text);
}

.tm-loc__cta i {
    font-size: 18px;
    color: var(--tm-brand);
    transition: transform .3s;
}

.tm-loc:hover .tm-loc__cta i {
    transform: translateX(6px);
}

.tm-note {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    color: var(--tm-muted);
    text-align: center;
    margin: 28px 0 0;
}

/* Fade-up animation of the content when the modal opens */
#terminModal.show .tm-anim {
    animation: tmUp .55s cubic-bezier(.2, .7, .2, 1) both;
}

#terminModal.show .tm-anim:nth-child(2) { animation-delay: .06s; }
#terminModal.show .tm-anim:nth-child(3) { animation-delay: .12s; }
#terminModal.show .tm-locations .tm-loc:nth-child(1) { animation-delay: .18s; }
#terminModal.show .tm-locations .tm-loc:nth-child(2) { animation-delay: .26s; }

@keyframes tmUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    #terminModal.show .tm-anim { animation: none; }
    .tm-loc, .tm-close, .tm-loc__cta i { transition: none; }
}

/* Backdrop a bit darker for this modal */
.modal-backdrop.tm-backdrop.show {
    opacity: .75;
}

/* ---------- Mobile: full screen ---------- */
@media (max-width: 767.98px) {
    #terminModal .modal-dialog {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }

    #terminModal .modal-content {
        height: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
    }

    .tm-body {
        padding: 84px 22px 32px;
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    .tm-title {
        font-size: 32px;
    }

    .tm-lead {
        margin-bottom: 28px;
    }

    .tm-locations {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tm-loc {
        padding: 24px 22px 20px;
    }

    .tm-loc__num {
        font-size: 36px;
        margin-bottom: 16px;
    }

    .tm-note {
        margin-top: auto;
        padding-top: 24px;
    }
}
