/* ============================================================
   EVENT DETAIL — PUBLIC PAGE
   Premium dark theme with interactive map viewer
   ============================================================ */

/* ── Container ── */
.ed-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* ── Navigation ── */
.ed-nav {
    padding: 1.25rem 0;
}

.ed-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.ed-back-btn:hover {
    color: rgba(255,255,255,0.85);
}

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.ed-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    min-height: 320px;
}

.ed-hero-image {
    position: absolute;
    inset: 0;
}

.ed-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(167,139,250,0.08));
}

.ed-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,20,0.95) 0%, rgba(10,10,20,0.4) 60%, rgba(10,10,20,0.15) 100%);
}

.ed-hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
}

/* Badges */
.ed-hero-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.ed-badge-category {
    background: rgba(167,139,250,0.2);
    color: #c4b5fd;
    border: 1px solid rgba(167,139,250,0.25);
}

.ed-badge-live {
    background: rgba(16,185,129,0.85);
    color: #fff;
}

.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ed-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.ed-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ed-info-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
}

.ed-info-chip svg {
    color: rgba(255,255,255,0.45);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════
   MAP SECTION (PROMINENTE)
   ══════════════════════════════════════════ */
.ed-map-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.ed-map-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.ed-map-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ed-map-icon {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(167,139,250,0.1));
    color: #818cf8;
}

.ed-map-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin: 0;
}

.ed-map-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin: 0.15rem 0 0;
}

/* Stats pills */
.ed-map-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ed-stat-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.8rem;
}

.ed-stat-value {
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

.ed-stat-label {
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
}

.ed-stat-available .ed-stat-value { color: #34d399; }
.ed-stat-reserved .ed-stat-value  { color: #fbbf24; }
.ed-stat-occupied .ed-stat-value  { color: #818cf8; }

/* Map Layout: canvas + sidebar */
.ed-map-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 650px;
}

.ed-map-canvas-area {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ── Map Toolbar ── */
.ed-map-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
}

.ed-map-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}

.ed-map-search-wrap svg {
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.ed-map-search-wrap input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
}

.ed-map-search-wrap input::placeholder {
    color: rgba(255,255,255,0.3);
}

.ed-search-count {
    font-size: 0.7rem;
    color: #818cf8;
    font-weight: 600;
    white-space: nowrap;
}

/* Filters */
.ed-map-filters {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ed-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.ed-filter-btn:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.8);
}

.ed-filter-btn.active {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.3);
    color: #a5b4fc;
}

.ed-filter-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}

.ed-filter-dot.available { background: #10b981; }
.ed-filter-dot.reserved  { background: #f59e0b; }
.ed-filter-dot.occupied  { background: #6366f1; }

/* ── Canvas Viewport ── */
.ed-map-viewport {
    position: relative;
    overflow: auto;
    background: rgba(0,0,0,0.3);
    flex: 1;
    min-height: 0;
}

.ed-map-inner {
    position: relative;
    display: inline-block;
}

.ed-map-inner img {
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.ed-map-inner canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
}

/* Zoom Controls — anchored to canvas-area (position:relative), NOT inside the scrolling viewport */
.ed-map-zoom {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(15,15,25,0.9);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 0.25rem;
    backdrop-filter: blur(12px);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.ed-map-zoom button {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.15s;
}

.ed-map-zoom button:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.ed-zoom-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    min-width: 44px;
    text-align: center;
}

/* ── Stands Sidebar ── */
.ed-stands-sidebar {
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    min-width: 0;
}

.ed-sidebar-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ed-sidebar-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.ed-sidebar-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.06);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

.ed-stands-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.ed-stand-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ed-stand-item:hover,
.ed-stand-item.hovered {
    background: rgba(99,102,241,0.08);
}

.ed-stand-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ed-stand-dot.available { background: #10b981; }
.ed-stand-dot.reserved  { background: #f59e0b; }
.ed-stand-dot.occupied  { background: #6366f1; }

.ed-stand-info {
    flex: 1;
    min-width: 0;
}

.ed-stand-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ed-stand-meta {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
}

.ed-stand-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ed-stand-status.available { color: #34d399; background: rgba(16,185,129,0.12); }
.ed-stand-status.reserved  { color: #fbbf24; background: rgba(245,158,11,0.12); }
.ed-stand-status.occupied  { color: #a5b4fc; background: rgba(99,102,241,0.12); }

.ed-stands-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}

/* Map empty state */
.ed-map-empty-section {
    padding: 3rem;
}

.ed-map-empty {
    text-align: center;
    padding: 2rem;
}

.ed-map-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ed-map-empty h3 {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.ed-map-empty p {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════
   CONTENT + SIDEBAR
   ══════════════════════════════════════════ */
.ed-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ed-main {
    min-width: 0;
}

/* Sections */
.ed-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.ed-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.25rem;
}

.ed-section-title svg {
    color: #818cf8;
}

.ed-description {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    line-height: 1.75;
}

.ed-description p {
    margin-bottom: 0.75rem;
}

/* Schedule */
.ed-schedule-item {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ed-schedule-item:last-child {
    border-bottom: none;
}

.ed-schedule-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #818cf8;
}

.time-sep {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
}

.ed-schedule-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.25rem;
}

.ed-schedule-body p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.5rem;
}

.ed-schedule-meta {
    display: flex;
    gap: 1rem;
}

.ed-schedule-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

/* ── Sidebar Cards ── */
.ed-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ed-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.25rem;
}

.ed-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
}

.ed-card-title svg {
    color: #818cf8;
}

/* Organizer */
.ed-organizer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ed-organizer-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(167,139,250,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #a5b4fc;
    font-size: 1rem;
    overflow: hidden;
}

.ed-organizer-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.ed-organizer-name {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.ed-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #34d399;
    font-weight: 500;
}

/* Details list */
.ed-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ed-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.ed-detail-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

.ed-detail-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-align: right;
}

/* Stands stats */
.ed-stands-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ed-stand-stat {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}

.ed-stand-stat-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
}

.ed-stand-available .ed-stand-stat-val {
    color: #34d399;
}

.ed-stand-stat-lbl {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ed-map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 10px;
    color: #a5b4fc;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.ed-map-link:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════
   POPUP
   ══════════════════════════════════════════ */
.ed-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.ed-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.ed-popup {
    position: fixed;
    z-index: 999;
    background: rgba(20,20,35,0.98);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 1.25rem;
    min-width: 250px;
    max-width: 320px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95) translateY(4px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.ed-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ed-popup-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.ed-popup-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.ed-popup-status.available { color: #34d399; background: rgba(16,185,129,0.15); }
.ed-popup-status.reserved  { color: #fbbf24; background: rgba(245,158,11,0.15); }
.ed-popup-status.occupied  { color: #a5b4fc; background: rgba(99,102,241,0.15); }

.ed-popup-meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.4rem;
}

.ed-popup-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.ed-popup-close {
    margin-top: 0.875rem;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.ed-popup-close:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}

/* ══════════════════════════════════════════
   RELATED EVENTS
   ══════════════════════════════════════════ */
.ed-related {
    margin-top: 1rem;
}

.ed-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ed-related-card {
    display: flex;
    gap: 1rem;
    padding: 0.875rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.ed-related-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.ed-related-img {
    width: 80px; height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
}

.ed-related-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.ed-related-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-related-body h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-related-body span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .ed-map-layout {
        grid-template-columns: 1fr;
    }
    
    .ed-stands-sidebar {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.06);
        max-height: 300px;
    }
    
    .ed-stands-list {
        max-height: 250px;
    }
    
    .ed-content-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ed-container {
        padding: 0 1rem 3rem;
    }
    
    .ed-hero {
        border-radius: 14px;
        min-height: 260px;
    }
    
    .ed-hero-content {
        padding: 2rem 1.5rem;
        min-height: 260px;
    }
    
    .ed-title {
        font-size: 1.5rem;
    }
    
    .ed-quick-info {
        gap: 0.5rem;
    }
    
    .ed-info-chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .ed-map-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1rem;
    }
    
    .ed-map-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
    }
    
    .ed-map-search-wrap {
        max-width: none;
    }
    
    .ed-map-filters {
        overflow-x: auto;
    }
    

    
    .ed-section {
        padding: 1.25rem;
    }
    
    .ed-popup {
        left: 1rem !important;
        right: 1rem;
        top: auto !important;
        bottom: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .ed-title {
        font-size: 1.3rem;
    }
    
    .ed-map-stats {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .ed-stat-pill {
        white-space: nowrap;
    }
}
