/* =========================================================
   XTicket Seating 12
   Renderer visual genérico
   ========================================================= */

.xt-seat-wrap {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    margin: 0 auto;
}

.xt-seat-bar {
    position: sticky;
    top: 12px;
    z-index: 50;

    display: flex;
    align-items: center;
    gap: 18px;

    width: 100%;
    box-sizing: border-box;

    padding: 14px 18px;
    margin-bottom: 18px;

    background: rgba(20, 18, 14, .96);
    border: 1px solid rgba(212, 167, 44, .25);
    border-radius: 14px;

    box-shadow: 0 12px 35px rgba(0,0,0,.20);
    backdrop-filter: blur(12px);
}

.xt-seat-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    flex: 0 1 auto;

    font-size: 12px;
    line-height: 1.2;
}

.xt-seat-legend span {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.xt-seat-legend i {
    width: 11px;
    height: 11px;
    min-width: 11px;
    display: inline-block !important;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    margin: 0 !important;
}

.xt-seat-bar .xt-sel {
    flex: 1 1 220px;
    min-width: 160px;

    font-size: 13px;
    color: #e8e2d4;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xt-seat-bar button#xt-sel-btn {
    flex: 0 0 auto;

    padding: 11px 24px;

    border: 0 !important;
    border-radius: 9px;

    background: #d4a72c !important;
    background-image: none !important;

    color: #121009 !important;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    box-shadow: none;
}

.xt-seat-bar button#xt-sel-btn:hover:not([disabled]) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.xt-seat-bar button#xt-sel-btn[disabled] {
    background: #514b3d !important;
    color: #aaa395 !important;
    opacity: 1;
    cursor: not-allowed;
}

/* =========================================================
   Contenedor del plano
   ========================================================= */

.xt-plan-scroll {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px;
    background: #11100d;
    border-radius: 18px;
    touch-action: none;
}

.xt-plan-scroll.is-panning {
    cursor: grabbing;
}

#xt-plan {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 auto;
    transform-origin: center center;
    flex: 0 1 auto;
}

.xt-plan-scroll.is-panning #xt-plan {
    transition: none;
}

/* =========================================================
   Sillas
   ========================================================= */

.xt-seat {
    cursor: pointer;
    outline: none;
}

.xt-seat circle {
    vector-effect: non-scaling-stroke;

    stroke-width: 1.4;

    fill-opacity: .28;

    transition:
        fill-opacity .12s ease,
        stroke-width .12s ease,
        filter .12s ease,
        transform .12s ease;
}

.xt-seat:hover circle {
    fill-opacity: .75;
    stroke-width: 2.4;

    filter:
        drop-shadow(0 0 5px rgba(255,255,255,.25));
}

.xt-seat[data-taken="1"] {
    cursor: not-allowed;
}

.xt-seat[data-taken="1"] circle {
    fill: #3a3a3a !important;
    stroke: #555 !important;
    fill-opacity: 1;
}

.xt-seat.sel circle {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 3.5 !important;

    fill-opacity: 1 !important;

    filter:
        drop-shadow(0 0 7px rgba(255,255,255,.75));
}

/* =========================================================
   Texto del plano
   ========================================================= */

#xt-plan text {
    font-family:
        "IBM Plex Sans",
        "Inter",
        system-ui,
        sans-serif;

    pointer-events: none;
}

/* =========================================================
   Controles de zoom
   ========================================================= */

.xt-seat-zoom {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 30;

    display: flex;
    align-items: center;
    gap: 4px;

    padding: 5px;

    background: rgba(15,14,12,.94);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;

    box-shadow: 0 8px 25px rgba(0,0,0,.30);
}

.xt-seat-zoom button {
    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 7px;

    background: transparent !important;
    color: #e8e2d4 !important;

    font-size: 18px;
    line-height: 34px;
    text-align: center;

    cursor: pointer;
}

.xt-seat-zoom button:hover {
    background: rgba(212,167,44,.16) !important;
}

.xt-seat-zoom-value {
    min-width: 48px;

    color: #aaa395;
    font-size: 11px;
    text-align: center;
}

/* =========================================================
   Indicador de ayuda
   ========================================================= */

.xt-seat-help {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 20;

    padding: 7px 10px;

    background: rgba(15,14,12,.82);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;

    color: #8f897d;
    font-size: 11px;

    pointer-events: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {

    .xt-seat-wrap {
        padding: 12px;
    }

    .xt-seat-bar {
        position: relative;
        top: auto;

        gap: 12px;
        padding: 13px;
    }

    .xt-seat-legend {
        width: 100%;
        order: 1;
    }

    .xt-seat-bar .xt-sel {
        order: 2;
        flex-basis: 100%;
    }

    .xt-seat-bar button#xt-sel-btn {
        order: 3;
        width: 100%;
    }

    .xt-plan-scroll {
        min-height: 440px;
        padding: 18px;
    }

    .xt-seat-help {
        display: none;
    }
}

@media (max-width: 600px) {

    .xt-seat-wrap {
        padding: 8px;
    }

    .xt-seat-bar {
        border-radius: 11px;
    }

    .xt-plan-scroll {
        min-height: 390px;
        padding: 10px;
        border-radius: 13px;
    }

    .xt-seat-zoom {
        right: 10px;
        bottom: 10px;
    }
}

/* =========================================================
   XTICKET SEATING - FULL WIDTH
   ========================================================= */

.xt-seat-wrap {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.xt-plan-scroll {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#xt-plan {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* =========================================================
   XTICKET — SEATING PAGE FULL WIDTH
   ========================================================= */

.xt-seat-page {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

body:has(.xt-seat-page) .xt-layout {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

body:has(.xt-seat-page) .xt-layout-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

body:has(.xt-seat-page) .xt-plan-scroll {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

body:has(.xt-seat-page) #xt-plan {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* =========================================================
   XTICKET SEATING — PREMIUM LIGHT
   Fondo blanco + identidad dinámica
   ========================================================= */

body:has(.xt-seat-page) {
    background: #ffffff !important;
    color: #172033 !important;
}

body:has(.xt-seat-page) .xt-seat-page {
    width: 100% !important;
    max-width: none !important;
    background: #ffffff !important;
    border: 1px solid #e7e9ed !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 30px rgba(20, 30, 45, .07) !important;
    overflow: hidden !important;
}

body:has(.xt-seat-page) .xt-seat-bar {
    background: #ffffff !important;
    border: 1px solid #e7e9ed !important;
    border-radius: 18px !important;
    color: #172033 !important;
    box-shadow: 0 5px 20px rgba(20, 30, 45, .06) !important;
}

body:has(.xt-seat-page) .xt-seat-legend,
body:has(.xt-seat-page) .xt-seat-legend span {
    color: #4b5563 !important;
}

body:has(.xt-seat-page) .xt-seat-legend i {
    border: 1px solid rgba(0,0,0,.12) !important;
}

body:has(.xt-seat-page) .xt-sel {
    color: #6b7280 !important;
}

body:has(.xt-seat-page) .xt-plan-scroll {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e7e9ed !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 30px rgba(20, 30, 45, .06) !important;
}

body:has(.xt-seat-page) #xt-plan {
    background: #ffffff !important;
}

body:has(.xt-seat-page) #xt-plan rect {
    fill: #f3e3b5 !important;
    stroke: #dfc77f !important;
    opacity: 1 !important;
    filter: drop-shadow(0 4px 10px rgba(160, 120, 35, .12));
}

body:has(.xt-seat-page) #xt-plan text {
    font-family: Arial, sans-serif !important;
}

body:has(.xt-seat-page) #xt-plan text[letter-spacing="4"] {
    fill: #1f2937 !important;
}

body:has(.xt-seat-page) #xt-plan text {
    fill: #64748b;
}

body:has(.xt-seat-page) .xt-seat {
    cursor: pointer;
}

body:has(.xt-seat-page) .xt-seat circle {
    transition:
        transform .15s ease,
        filter .15s ease,
        opacity .15s ease;
}

body:has(.xt-seat-page) .xt-seat:hover circle {
    filter: brightness(1.08)
            drop-shadow(0 3px 5px rgba(15,23,42,.18));
}

body:has(.xt-seat-page) .xt-seat.sel circle {
    stroke: #172033 !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 5px rgba(15,23,42,.30));
}

body:has(.xt-seat-page) .xt-seat[data-taken="1"] {
    opacity: .45 !important;
    cursor: not-allowed !important;
}

/*
   IMPORTANTE:
   NO fijamos color al botón.
   Pretix/XTicket conserva el color de marca
   configurado para la tienda.
*/

body:has(.xt-seat-page) #xt-sel-btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    min-height: 46px !important;
    padding: 0 30px !important;
    transition: transform .15s ease, filter .15s ease !important;
}

body:has(.xt-seat-page) #xt-sel-btn:not(:disabled):hover {
    filter: brightness(.94) !important;
    transform: translateY(-1px);
}

body:has(.xt-seat-page) #xt-sel-btn:disabled {
    opacity: .55 !important;
}

@media (max-width: 900px) {
    body:has(.xt-seat-page) .xt-seat-page,
    body:has(.xt-seat-page) .xt-seat-bar,
    body:has(.xt-seat-page) .xt-plan-scroll {
        border-radius: 16px !important;
    }
}
