/* ═══════════════════════════════════════════════════════════════════════════
   seatMap.css - Generic Seating Chart Styles
   Works with any SVG that follows the data-section convention.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────────────── */

hr {
    border-color: #2d2d2d;
}

.seat-map-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
}

.seat-map-header {
    text-align: center;
    margin-bottom: 15px;
    /* Override the global header flex (shared-dark-theme) so it stacks on mobile */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}

.seat-map-header .h2 {
    margin-bottom: 2px;
    width: 100%;
}

.seat-map-header .event-datetime {
    color: #9ca3af;
    font-size: 0.95em;
}

.event-date-prominent {
    font-size: 20px;
    font-weight: 700;
    color: #e6edf3;
    margin-top: 4px;
    letter-spacing: .3px;
}

.event-time-sub {
    font-size: 15px;
    color: #9ca3af;
    margin-top: 2px;
}

.seat-map-svg-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.seat-map-svg-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Section Path Defaults ────────────────────────────────────────────── */

/* Let clicks on text/labels inside sections pass through to the clickable shape */
a.sectionLink text,
a.sectionLink tspan,
.seat-map-svg-wrapper text,
.seat-map-svg-wrapper tspan {
    pointer-events: none;
}

/* All clickable sections default to green (available) */
path.section,
rect.section,
polygon.section {
    fill: #4CAF50;
    fill-opacity: 1;
    cursor: pointer;
    transition: fill 0.2s ease, fill-opacity 0.15s ease;
}

/* Hover: darken */
a.sectionLink:hover path.section,
a.sectionLink:hover rect.section,
a.sectionLink:hover polygon.section,
path.section:hover,
rect.section:hover,
polygon.section:hover {
    fill: #333333;
    fill-opacity: 0.9;
}

/* ── Section States ───────────────────────────────────────────────────── */

/* Open / available - green */
.openSection {
    fill: #4CAF50 !important;
    fill-opacity: 1 !important;
}

/* Sold out - red, no pointer */
.soldOutSection {
    fill: #ff0000 !important;
    fill-opacity: 1 !important;
    cursor: not-allowed !important;
}

.soldOutSection:hover {
    fill: #cc0000 !important;
}

/* Handicap accessible - green fill with blue stroke indicator */
.handicapSection {
    fill: #4CAF50;
    fill-opacity: 1;
    stroke: #2196F3 !important;
    stroke-width: 0.6 !important;
    stroke-opacity: 1 !important;
}

/* Handicap + sold out */
.handicapSection.soldOutSection {
    fill: #ff0000 !important;
    stroke: #2196F3 !important;
}

/* General Admission sections - dark red */
.gaSection {
    fill: #6f0b0b !important;
    fill-opacity: 1 !important;
}

.gaSection:hover {
    fill: #4a0707 !important;
}

.gaSection.soldOutSection {
    fill: #ff0000 !important;
}

/* VIP sections */
.vipSection {
    fill: #7855a3 !important;
    fill-opacity: 1 !important;
}

.vipSection:hover {
    fill: #5a3d7a !important;
}

/* Disabled / not for sale - dark, non-interactive */
.disabledSection {
    fill: #333333 !important;
    fill-opacity: 1 !important;
    cursor: default !important;
    pointer-events: none;
}

/* ── Legend ────────────────────────────────────────────────────────────── */

.seat-map-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
    border-top: 1px solid #2d2d2d;
    color: #fff;
}

.seat-map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #d1d5db;
}

.seat-map-legend-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #555;
    display: inline-block;
}

.swatch-available { background-color: #4CAF50; }
.swatch-soldout   { background-color: #ff0000; }
.swatch-handicap  { background-color: #4CAF50; border: 2px solid #2196F3; }
.swatch-ga        { background-color: #6f0b0b; }
.swatch-vip       { background-color: #7855a3; }

/* ── Tooltip ──────────────────────────────────────────────────────────── */

.seat-map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.seat-map-tooltip.visible {
    opacity: 1;
}

.seat-map-tooltip .tooltip-section {
    font-weight: bold;
    font-size: 14px;
}

.seat-map-tooltip .tooltip-price {
    color: #4CAF50;
}

.seat-map-tooltip .tooltip-soldout {
    color: #ff6666;
    font-weight: bold;
}

.seat-map-tooltip .tooltip-handicap {
    color: #64B5F6;
    font-size: 11px;
}

/* ── Sold Out Banner ──────────────────────────────────────────────────── */

#soldOutMessage {
    text-align: center;
}

/* ── Upgrade / Floating Cart ──────────────────────────────────────────── */

.seat-map-upgrade-cart {
    max-width: 400px;
    margin: 20px auto;
    border-radius: 10px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 576px) {
    .seat-map-container {
        padding: 5px;
    }

    .seat-map-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
    }

    .seat-map-header .h2 {
        font-size: 1.15rem;
        margin-bottom: 2px;
    }

    .event-date-prominent {
        font-size: 1.35rem;
        font-weight: 700;
    }

    .event-time-sub {
        font-size: 1rem;
    }

    .seat-map-legend {
        gap: 10px;
    }

    .seat-map-tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ── Utility ──────────────────────────────────────────────────────────── */

.hidden {
    display: none !important;
}

/* Black fill for labels/text inside SVG */
.blackFill {
    fill: #000;
}

/* ══════════════════════════════════════════════════════════════════════════
   ADA / Accessibility
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Skip-to-Content Link ─────────────────────────────────────────────── */

.skip-to-content {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
    background: #000;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    outline: 3px solid #FFD700;
    outline-offset: -3px;
}

/* ── Screen Reader Only ───────────────────────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Focus Indicators for Keyboard Navigation ─────────────────────────── */

/* High-visibility focus ring on section links (keyboard Tab) */
a.sectionLink:focus {
    outline: none;
}

a.sectionLink:focus-visible {
    outline: none;
}

a.sectionLink:focus-visible path.section,
a.sectionLink:focus-visible rect.section,
a.sectionLink:focus-visible polygon.section,
a.sectionLink:focus path.section,
a.sectionLink:focus rect.section,
a.sectionLink:focus polygon.section {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
    stroke: #FFD700 !important;
    stroke-width: 1.2 !important;
    stroke-opacity: 1 !important;
}

/* Keep handicap stroke visible alongside focus ring */
a.sectionLink:focus-visible .handicapSection,
a.sectionLink:focus .handicapSection {
    stroke: #FFD700 !important;
    stroke-width: 1.2 !important;
}

/* Focus styling for general interactive elements */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* ── Reduced Motion ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    path.section,
    rect.section,
    polygon.section {
        transition: none !important;
    }

    .seat-map-tooltip {
        transition: none !important;
    }
}

/* ── High Contrast Mode ───────────────────────────────────────────────── */

@media (forced-colors: active) {
    path.section,
    rect.section,
    polygon.section {
        forced-color-adjust: none;
    }

    .soldOutSection {
        border: 2px solid ButtonText;
    }

    .handicapSection {
        border: 2px solid Highlight;
    }

    a.sectionLink:focus path.section,
    a.sectionLink:focus rect.section,
    a.sectionLink:focus polygon.section {
        outline: 3px solid Highlight;
    }

    .seat-map-legend-swatch {
        border: 2px solid ButtonText;
    }

    .seat-map-tooltip {
        border: 1px solid ButtonText;
    }
}

/* ── Event Details Card ────────────────────────────────────────────────── */

.seat-map-details-card {
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-color: #0d1117;
}

.details-card-header {
    background: linear-gradient(135deg, #161b22, #1c2333);
    color: #fff;
    padding: 14px 20px;
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #2d2d2d;
}

.details-card-header i {
    margin-right: 6px;
    opacity: 0.85;
}

.details-card-body {
    padding: 0;
    background: #0d1117;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #1e2530;
    transition: background-color 0.15s ease;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row:hover {
    background-color: rgba(255,255,255,0.03);
}

.detail-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: rgba(242, 92, 40, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f25c28;
    font-size: 0.95em;
    margin-top: 2px;
}

.detail-content {
    flex: 1;
    min-width: 0;
}

.detail-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8b949e;
    font-weight: 600;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 0.95em;
    color: #e6edf3;
    font-weight: 500;
    line-height: 1.4;
}

.detail-sub {
    font-size: 0.85em;
    color: #8b949e;
    margin-top: 1px;
}

.detail-time-block {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 4px 10px;
    margin-right: 8px;
    margin-top: 2px;
    font-size: 0.9em;
    color: #e6edf3;
}

.detail-time-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #8b949e;
    margin-right: 4px;
    font-weight: 600;
}

/* ── Advisories ───────────────────────────────────────────────────────── */

.seat-map-advisories {
    margin-top: 20px;
}

.seat-map-advisories h4 {
    font-size: 1.05em;
    font-weight: 600;
    color: #ffd95c;
    margin-bottom: 12px;
}

.seat-map-advisories .alert {
    margin-bottom: 10px;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
}

/* ── Additional Details ───────────────────────────────────────────────── */

.seat-map-additional-details {
    margin-top: 20px;
}

.seat-map-additional-details h4 {
    font-size: 1.05em;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 12px;
}

.seat-map-additional-details .card {
    border-radius: 8px;
    border: 1px solid #2d2d2d;
    overflow: hidden;
}

.seat-map-additional-details .card-header {
    background-color: #161b22;
    color: #fff;
    font-size: 0.95em;
    padding: 10px 16px;
    border-bottom: 1px solid #2d2d2d;
}

.seat-map-additional-details .card-body {
    font-size: 0.9em;
    color: #d1d5db;
    padding: 12px 16px;
}

/* ── Refund Policy ────────────────────────────────────────────────────── */

.refund-policy-content {
    font-size: 0.93em;
    color: #d1d5db;
    line-height: 1.6;
}

/* ── Event Description ────────────────────────────────────────────────── */

.event-desc-content {
    font-size: 0.93em;
    color: #d1d5db;
    line-height: 1.6;
}

/* ── Event Image ─────────────────────────────────────────────────────── */

.seat-map-event-image {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.seat-map-event-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 500px;
    margin: auto;
}

/* ── Color-Blind Friendly Patterns (optional enhancement) ────────────── */
/* Sold-out sections get a diagonal stripe pattern overlay via SVG filter  */
/* The pattern is added dynamically by JS if the SVG supports it.         */
/* For maximum accessibility, tooltips and ARIA labels provide text info.  */
