/* PublicShop.Web Styles
 * Uses CSS custom properties for vendor branding: --vendor-primary
 */

/* Header */
.shop-header {
    background-color: var(--vendor-primary, #3C60A8);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shop-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.shop-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

/* Footer */
.shop-footer {
    border-top: 1px solid #dee2e6;
    margin-top: 3rem;
}

/* Section titles */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    border-bottom: 3px solid var(--vendor-primary, #3C60A8);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Event Cards */
.event-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.event-card.featured-card {
    border-color: var(--vendor-primary, #3C60A8);
    border-width: 2px;
}

.event-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.event-card-body {
    padding: 1rem;
}

/* Badges */
.event-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

.category-badge {
    background-color: #e9ecef;
    color: #495057;
}

.featured-badge {
    background-color: var(--vendor-primary, #3C60A8);
    color: #fff;
}

/* Event card content */
.event-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
    margin-top: 0.5rem;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.vs-text {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.9em;
}

.event-venue {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.event-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vendor-primary, #3C60A8);
}

/* Detail page */
.event-detail-image img {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

.event-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
}

.teams-vs-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.team-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.team-logo {
    height: 64px;
    width: 64px;
    object-fit: contain;
}

.vs-badge {
    font-size: 1rem;
    font-weight: 700;
    color: #6c757d;
    padding: 0.3rem 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 50px;
}

/* Info card */
.event-info-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.info-row {
    padding: 0.3rem 0;
    color: #495057;
}

/* Price display */
.from-price-display {
    text-align: center;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vendor-primary, #3C60A8);
}

.sale-info {
    text-align: center;
}

/* Pricing table */
.pricing-section {
    margin-bottom: 2rem;
}

.pricing-table {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.pricing-table thead {
    background-color: var(--vendor-primary, #3C60A8);
    color: #fff;
}

.pricing-table thead th {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border: none;
}

.pricing-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.pricing-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Empty state */
.empty-state {
    padding: 4rem 1rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .event-detail-title {
        font-size: 1.4rem;
    }

    .team-logo {
        height: 48px;
        width: 48px;
    }

    .teams-vs-layout {
        gap: 1rem;
    }
}

/* ===== Venue Map ===== */

/* Map container */
.venue-map-container {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 60vh;
    background: #fafafa;
}
@media (max-width: 991.98px) { .venue-map-container { height: 55vh; } }
@media (max-width: 767.98px) { .venue-map-container { height: 50vh; } }

/* SVG fills container */
.venue-map-container svg { width: 100%; height: 100%; display: block; }

/* Section SVG interaction transitions */
.venue-map-container svg g[data-section-id] { transition: opacity 0.2s, stroke-width 0.2s; cursor: pointer; }

/* Tooltip */
.venue-map-tooltip { position: fixed; z-index: 1000; background: #fff; border: 1px solid #dee2e6; border-radius: 6px; padding: 10px 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.15); pointer-events: none; max-width: 280px; font-size: 0.875rem; }
.venue-map-tooltip .tooltip-name { font-weight: 600; margin-bottom: 2px; }
.venue-map-tooltip .tooltip-zone { color: #6c757d; font-size: 0.8rem; }
.venue-map-tooltip .tooltip-category { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.venue-map-tooltip .color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.venue-map-tooltip .tooltip-price { margin-top: 2px; color: #495057; }
.venue-map-tooltip .tooltip-seats { color: #6c757d; font-size: 0.8rem; margin-top: 2px; }

/* Venue Map Wrapper (for side panel layout) */
.venue-map-wrapper { position: relative; overflow: hidden; }

/* Section drill-down side panel (desktop) */
.venue-panel { position: absolute; top: 0; right: 0; width: 350px; height: 100%; background: #fff; border-left: 1px solid #dee2e6; border-radius: 0 0.5rem 0.5rem 0; z-index: 15; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; box-shadow: -2px 0 8px rgba(0,0,0,0.1); pointer-events: none; }
.venue-panel.open { transform: translateX(0); pointer-events: auto; }
.venue-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #dee2e6; }
.venue-panel-title { margin: 0; font-size: 1.1rem; }
.venue-panel-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #6c757d; padding: 0 4px; }
.venue-panel-close:hover { color: #000; }
.venue-panel-body { padding: 16px; }

/* Panel body content */
.panel-zone { color: #6c757d; font-size: 0.9rem; margin-bottom: 8px; }
.panel-category { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-category .color-swatch { width: 16px; height: 16px; border-radius: 4px; }
.panel-subprices { list-style: none; padding: 0; margin: 0 0 12px 0; }
.panel-subprices li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.panel-subprices li:last-child { border-bottom: none; }
.panel-rows { width: 100%; font-size: 0.85rem; margin-top: 8px; }
.panel-rows th { font-weight: 600; padding: 4px 8px; border-bottom: 2px solid #dee2e6; text-align: left; }
.panel-rows td { padding: 4px 8px; border-bottom: 1px solid #f0f0f0; }
.panel-total { font-weight: 600; margin-top: 8px; font-size: 0.9rem; }
.panel-capacity { font-size: 1rem; font-weight: 600; color: #495057; margin-top: 8px; }

/* Panel toggle arrow (right edge of map, visible when panel closed) */
.venue-panel-toggle { position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 24px; height: 48px; background: #fff; border: 1px solid #dee2e6; border-right: none; border-radius: 4px 0 0 4px; cursor: pointer; z-index: 10; box-shadow: -2px 0 4px rgba(0,0,0,0.1); font-size: 12px; color: #6c757d; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; }
.venue-panel-toggle:hover { background: #f0f0f0; }
.venue-panel-toggle.hidden { opacity: 0; pointer-events: none; }

/* Panel header actions (pin + close) */
.venue-panel-actions { display: flex; gap: 4px; align-items: center; }
.venue-panel-pin { width: 28px; height: 28px; border: 1px solid #3C60A8; border-radius: 4px; background: #fff; color: #3C60A8; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: background 0.15s, color 0.15s; }
.venue-panel-pin:hover { background: #e8edf5; }
.venue-panel-pin.pinned { background: #3C60A8; color: #fff; }

/* Panel legend (shown when no section selected) */
.panel-legend-item { margin-bottom: 12px; }
.panel-legend-item .color-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; vertical-align: middle; }
.panel-legend-item .legend-name { font-weight: 500; font-size: 0.85rem; margin-left: 8px; vertical-align: middle; }
.panel-legend-prices { list-style: none; padding: 0; margin: 4px 0 0 22px; }
.panel-legend-prices li { display: flex; justify-content: space-between; padding: 2px 0; font-size: 0.8rem; color: #6c757d; }
.panel-legend-hint { text-align: center; font-size: 0.8rem; color: #6c757d; padding: 8px 0; border-top: 1px solid #f0f0f0; margin-top: 8px; }

/* Panel drag handle (mobile only) */
.venue-panel-drag-handle { display: none; }

/* Bottom sheet (mobile) */
@media (max-width: 767.98px) {
    .venue-panel { position: fixed; top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: 50vh; border-left: none; border-radius: 1rem 1rem 0 0; border-top: 1px solid #dee2e6; transform: translateY(100%); transition: transform 0.3s ease; box-shadow: 0 -4px 16px rgba(0,0,0,0.15); }
    .venue-panel.open { transform: translateY(0); pointer-events: auto; }
    .venue-panel-drag-handle { display: block; width: 40px; height: 4px; background: #ced4da; border-radius: 2px; margin: 8px auto; }
    .venue-panel-toggle { display: none; }
    .venue-panel-pin { display: none; }
}

/* Fallback card grid */
.venue-fallback-grid .fallback-card { border: 1px solid #dee2e6; border-radius: 0.5rem; padding: 16px; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; }
.venue-fallback-grid .fallback-card:hover { border-color: var(--vendor-primary, #3C60A8); box-shadow: 0 2px 8px rgba(60,96,168,0.15); }
.venue-fallback-grid .fallback-card .card-section-name { font-weight: 600; margin-bottom: 4px; }
.venue-fallback-grid .fallback-card .card-zone { font-size: 0.85rem; color: #6c757d; }
.venue-fallback-grid .fallback-card .card-price-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.85rem; }
.venue-fallback-grid .fallback-card .card-price-badge .color-swatch { width: 12px; height: 12px; border-radius: 3px; }
.venue-fallback-grid .fallback-card .card-seats { font-size: 0.85rem; color: #6c757d; margin-top: 4px; }

/* ===== Auth Controls ===== */

/* Header auth section */
.shop-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.shop-auth-user {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-auth-link {
    color: #fff;
    text-decoration: none;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s;
}

.shop-auth-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* Sign-in banner (event detail page) */
.signin-banner {
    background: #f0f4fa;
    border: 1px solid #d0daf0;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: #495057;
}

.signin-banner a {
    color: var(--vendor-primary, #3C60A8);
    font-weight: 600;
    text-decoration: none;
}

.signin-banner a:hover {
    text-decoration: underline;
}
