/* Offcanvas-like left column */
.reserve-left {
    width: 28rem;
    max-width: 100%;
    background: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.12);
    overflow-x: hidden;
}

.reserve-header {
    padding: 15px 20px 10px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #fff;
    flex: 0 0 auto;
}

.reserve-body {
    padding: 16px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.reserve-footer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0) 100%);
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.reserve-map {
    height: 100vh;
    width: 100%;
}

.fields-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fields-row .flex-fill {
    flex: 1;
    min-width: 0;
}

.zone-block {
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 12px;
}

.zone-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.zone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.zone-grid .slot-btn {
    width: 100%;
    height: 35px;
    padding: 0 .6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0.5rem;
}

/* disabled style: resaltar en #a9a9a9 */
.slot-btn:disabled,
.slot-placeholder,
.slot-placeholder:disabled {
    background: #a9a9a99c !important;
    color: #fff !important;
    border-color: #a9a9a974 !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.slot-btn.active {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
    border-radius: 0.5rem !important;
}

.center-slot {
    outline: 2px solid rgba(13, 110, 253, 0.06);
    border-radius: 0.5rem;
}

/* Mobile layout: reserve-left full viewport, only reserve-body scrolls */
@media (max-width: 991px) {

    html,
    body {
        height: 100%;
    }

    /* usar variable --vh ajustada por JS para evitar issues del browser chrome */
    .reserve-left {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: calc(var(--vh, 1vh) * 100);
        /* fallback a 1vh si no existe --vh */
        max-height: calc(var(--vh, 1vh) * 100);
        overflow: hidden;
        /* impedir scroll del body */
        position: relative;
        background: #fff;
    }

    .reserve-header {
        flex: 0 0 auto;
        z-index: 2;
    }

    .reserve-body {
        flex: 1 1 auto;
        min-height: 0;
        /* important for flex children to allow proper scrolling */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
        /* footer visible fuera del scroll */
    }

    .reserve-footer {
        flex: 0 0 auto;
        position: relative;
        z-index: 3;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
        background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0) 100%);
        border-top: 1px solid rgba(0, 0, 0, 0.04);
    }

    /* asegurarse que el resto de columnas no ocupen espacio */
    .row>.col:not(.col-12) {
        display: none !important;
    }

    .flatpickr-input {
        height: auto !important;
        /* margin-top: 5px; */
    }

    .form-label{
        margin-bottom: 0rem!important;
    }
}

.flatpickr-input {
    height: 38px !important;
    border-radius: 4px !important
}
