/*
 * ABO RES – frontend
 * Wszystkie klasy mają prefiks abo-res-, aby ograniczyć ryzyko konfliktu z motywem.
 */

.abo-res-plan {
    --abo-res-text: #181818;
    --abo-res-muted: #707070;
    --abo-res-line: #d7d4cd;
    --abo-res-soft: #f7f5f1;
    --abo-res-accent: #a88c5b;
    --abo-res-accent-dark: #806a43;
    --abo-res-occupied: #d53535;
    --abo-res-occupied-dark: #b92c2c;
    --abo-res-white: #ffffff;
    position: relative;
    width: 860px;
    max-width: 100%;
    margin: 34px 0;
    color: var(--abo-res-text);
    font: inherit;
}

.abo-res-plan *,
.abo-res-plan *::before,
.abo-res-plan *::after {
    box-sizing: border-box;
}

.abo-res-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.abo-res-instruction {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.abo-res-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--abo-res-muted);
}

.abo-res-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.abo-res-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid var(--abo-res-line);
}

.abo-res-legend-dot-free {
    background: var(--abo-res-white);
}

.abo-res-legend-dot-occupied {
    background: var(--abo-res-occupied);
    border-color: var(--abo-res-occupied);
}

.abo-res-scroll-hint {
    display: none;
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--abo-res-muted);
}

.abo-res-map-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.abo-res-map {
    width: max-content;
    min-width: 100%;
    padding: 8px 0 2px;
}

.abo-res-stage {
    min-width: 760px;
    margin: 0 48px 34px 0;
    padding: 11px 20px 10px;
    border: 1px solid var(--abo-res-text);
    background: var(--abo-res-white);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.abo-res-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.abo-res-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.abo-res-seats {
    display: flex;
    gap: 5px;
}

.abo-res-seat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    min-width: 31px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--abo-res-line);
    border-radius: 2px;
    background: var(--abo-res-white);
    color: var(--abo-res-text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
}

.abo-res-seat--free:not(:disabled) {
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.abo-res-seat--free:not(:disabled):hover,
.abo-res-seat--free:not(:disabled):focus {
    border-color: var(--abo-res-accent);
    background: var(--abo-res-accent);
    color: var(--abo-res-white);
    outline: none;
    transform: translateY(-1px);
}

.abo-res-seat--free:disabled {
    cursor: default;
    opacity: 0.72;
}

.abo-res-seat--occupied,
.abo-res-seat--occupied:disabled {
    border-color: var(--abo-res-occupied);
    background: var(--abo-res-occupied);
    color: var(--abo-res-white);
    cursor: not-allowed;
    opacity: 1;
}

.abo-res-row-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 31px;
    padding: 0 8px;
    border-left: 1px solid var(--abo-res-line);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.abo-res-admin-front-notice {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #dba617;
    background: #fff8e5;
    color: #5d4b1f;
    font-size: 13px;
}

body.abo-res-modal-open {
    overflow: hidden;
}

.abo-res-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.abo-res-modal--open {
    display: flex;
}

.abo-res-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.abo-res-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 38px 42px 40px;
    background: var(--abo-res-white);
    color: var(--abo-res-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.abo-res-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--abo-res-text);
    font: inherit;
    font-size: 30px;
    font-weight: 300;
    line-height: 34px;
    cursor: pointer;
}

.abo-res-modal-close:hover,
.abo-res-modal-close:focus {
    color: var(--abo-res-accent-dark);
    outline: 1px solid var(--abo-res-accent);
}

.abo-res-modal-kicker {
    margin-bottom: 8px;
    color: var(--abo-res-accent-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.abo-res-modal-heading h3 {
    margin: 0 0 12px;
    padding: 0;
    color: var(--abo-res-text);
    font: inherit;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

.abo-res-selected-line {
    margin: 0 0 26px;
    padding: 12px 14px;
    border-left: 3px solid var(--abo-res-accent);
    background: var(--abo-res-soft);
    font-size: 14px;
}

.abo-res-selected-seat {
    font-weight: 700;
}

.abo-res-modal-form .wpcf7-form p {
    margin-top: 0;
}

.abo-res-modal-form .wpcf7-form-control-wrap {
    display: block;
}

.abo-res-modal-form input[type="text"],
.abo-res-modal-form input[type="email"],
.abo-res-modal-form input[type="tel"],
.abo-res-modal-form textarea,
.abo-res-modal-form select {
    width: 100%;
    max-width: 100%;
}

.abo-res-modal-form input[type="submit"],
.abo-res-modal-form button[type="submit"] {
    cursor: pointer;
}

@media (max-width: 900px) {
    .abo-res-plan {
        width: 100%;
    }

    .abo-res-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .abo-res-scroll-hint {
        display: block;
    }
}

@media (max-width: 640px) {
    .abo-res-plan {
        margin: 26px 0;
    }

    .abo-res-stage {
        margin-bottom: 25px;
    }

    .abo-res-modal {
        --abo-res-mobile-top-offset: 170px;
        align-items: flex-start;
        padding: var(--abo-res-mobile-top-offset) 12px 12px;
    }

    .abo-res-modal-dialog {
        max-height: calc(100vh - var(--abo-res-mobile-top-offset) - 12px);
        padding: 34px 22px 28px;
    }

    .abo-res-modal-heading h3 {
        font-size: 23px;
    }
}
