/*
Theme Name: Sierra Child
Theme URI: https://www.sierra.keydesign.xyz/
Description: Tema hijo para Sierra
Author: Key-Design
Template: sierra
Version: 1.0.0
*/

/* ==========================================================================
   Personalizaciones de FooEvents Seating
   ========================================================================== */

/* --- 0. Contenedor General del Diálogo --- */
.ui-dialog.fooevents-seating-dialog,
div[class*="fooevents-seating-dialog"] {
    max-width: 96vw !important;
    box-sizing: border-box !important;
    padding: 10px 14px 18px 14px !important;
}

.ui-dialog.fooevents-seating-dialog .ui-dialog-titlebar,
div[class*="fooevents-seating-dialog"] .ui-dialog-titlebar {
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.ui-dialog.fooevents-seating-dialog .ui-dialog-content,
#fooevents_seating_chart_view {
    padding: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* --- 1. Base de los Asientos --- */
html body div.fooevents_seating_chart_view_row span,
html body .fooevents_seating_chart_view_row span {
    background-image: none !important;
    background-repeat: no-repeat !important;
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    line-height: 25px !important;
    padding: 0 !important;
    margin: 2px 1.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
}

/* Asientos disponibles (Verde) */
html body div.fooevents_seating_chart_view_row span.available,
html body .fooevents_seating_chart_view_row span.available {
    background-color: #22c55e !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

html body div.fooevents_seating_chart_view_row span.available:hover {
    background-color: #16a34a !important;
    transform: scale(1.1) !important;
}

/* Asientos ocupados / reservados (Gris) */
html body div.fooevents_seating_chart_view_row span.unavailable,
html body .fooevents_seating_chart_view_row span.unavailable {
    background-color: #cbd5e1 !important;
    color: #64748b !important;
    opacity: 0.75 !important;
    cursor: not-allowed !important;
}

/* Asientos seleccionados (Morado) */
html body div.fooevents_seating_chart_view_row span.selected,
html body .fooevents_seating_chart_view_row span[class*="selected"] {
    background-color: #8b5cf6 !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
}

/* Asientos bloqueados (Rojo) */
html body div.fooevents_seating_chart_view_row span.blocked,
html body .fooevents_seating_chart_view_row span.blocked {
    background-color: #fca5a5 !important;
    color: #991b1b !important;
    cursor: not-allowed !important;
}

/* --- 2. Comportamiento Responsive: Mobile vs Desktop --- */

/* MOBILE: Scroll vertical natural */
@media screen and (max-width: 991px) {
    .ui-dialog.fooevents-seating-dialog .ui-dialog-content,
    #fooevents_seating_chart_view {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    html body div.fooevents_seating_chart_view_row {
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
        justify-content: flex-start !important;
        margin-bottom: 8px !important;
    }

    #fooevents_seating_chart_view::before {
        display: none !important;
    }
}

/* DESKTOP: Filas continuas con holgura inferior */
@media screen and (min-width: 992px) {
    .ui-dialog.fooevents-seating-dialog .ui-dialog-content,
    #fooevents_seating_chart_view {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    html body div.fooevents_seating_chart_view_row {
        width: max-content !important;
        min-width: 1250px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        align-items: center !important;
        margin-bottom: 3px !important;
    }

    html body div.fooevents_seating_chart_view_row:last-of-type {
        margin-bottom: 12px !important;
    }
}

/* --- 3. Leyenda Superior --- */
#fooevents_seating_legend_container,
.fooevents_seating_chart_legend,
.fooevents_seating_chart_view_legend,
div[class*="seating_chart"][class*="legend"] {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    margin: 4px 0 6px 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    align-items: center !important;
    gap: 0px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#fooevents_seating_legend_container::-webkit-scrollbar,
.fooevents_seating_chart_legend::-webkit-scrollbar,
.fooevents_seating_chart_view_legend::-webkit-scrollbar {
    display: none !important;
}

#fooevents_seating_legend_container > *,
.fooevents_seating_chart_legend > *,
.fooevents_seating_chart_view_legend > * {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-right: 14px !important;
}

#fooevents_seating_legend_container i,
#fooevents_seating_legend_container span,
.fooevents_seating_chart_legend i,
.fooevents_seating_chart_legend span,
.fooevents_seating_chart_view_legend i,
.fooevents_seating_chart_view_legend span {
    background-image: none !important;
    display: inline-block !important;
    width: 12px !important;
    min-width: 12px !important;
    height: 12px !important;
    min-height: 12px !important;
    border-radius: 3px !important;
    margin-right: 5px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

#fooevents_seating_legend_container [class*="available"],
.fooevents_seating_chart_legend [class*="available"],
.fooevents_seating_chart_view_legend [class*="available"] {
    background-color: #22c55e !important;
}

#fooevents_seating_legend_container [class*="unavailable"],
.fooevents_seating_chart_legend [class*="unavailable"],
.fooevents_seating_chart_view_legend [class*="unavailable"] {
    background-color: #cbd5e1 !important;
}

#fooevents_seating_legend_container [class*="blocked"],
.fooevents_seating_chart_legend [class*="blocked"],
.fooevents_seating_chart_view_legend [class*="blocked"] {
    background-color: #fca5a5 !important;
}

#fooevents_seating_legend_container [class*="selected"],
.fooevents_seating_chart_legend [class*="selected"],
.fooevents_seating_chart_view_legend [class*="selected"] {
    background-color: #8b5cf6 !important;
}

/* Reemplazo de texto: "ASIENTO seleccionado" -> "Seleccionado" */
#fooevents_seating_legend_container > *:has([class*="selected"]),
.fooevents_seating_chart_legend > *:has([class*="selected"]),
.fooevents_seating_chart_view_legend > *:has([class*="selected"]) {
    font-size: 0 !important;
}

#fooevents_seating_legend_container > *:has([class*="selected"])::after,
.fooevents_seating_chart_legend > *:has([class*="selected"])::after,
.fooevents_seating_chart_view_legend > *:has([class*="selected"])::after {
    content: "Seleccionado" !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #475569 !important;
}

/* --- 4. Barra de Escenario (Reemplazo ortográfico de ESENARIO por ESCENARIO) --- */
.fooevents_seating_chart_front {
    background: #f1f5f9 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-align: center !important;
    padding: 8px 0 !important;
    margin-top: 4px !important;
    margin-bottom: 10px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.fooevents_seating_chart_front::after {
    content: "ESCENARIO" !important;
    display: inline-block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    line-height: normal !important;
}

/* --- 5. Títulos de Filas (FILA A, FILA B...) --- */
.fooevents_seating_chart_view_row_name,
div.fooevents_seating_chart_view_row_name,
div[class*="row_name"],
.fooevents_seating_chart_view_row strong {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-top: 8px !important;
    margin-bottom: 3px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 100% !important;
}

/* --- 6. Botón de Confirmación --- */
.fooevents_seating_chart_view_select_seats,
#fooevents_seating_chart_view_select_seats,
.fooevents_seating_submit,
#fooevents_seating_chart_submit,
.fooevents-seating-dialog button,
input[type="submit"][id*="seating"],
button[id*="seating"] {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 26px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.2s ease !important;
    margin-top: 28px !important;
    margin-bottom: 6px !important;
    display: inline-block !important;
}

.fooevents_seating_chart_view_select_seats:hover,
#fooevents_seating_chart_view_select_seats:hover,
.fooevents_seating_submit:hover,
#fooevents_seating_chart_submit:hover,
.fooevents-seating-dialog button:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}