/* ── Mega Menu: Spektakle ── */

/* Suppress the native WP submenu dropdown for the Spektakle item on desktop;
   the mega menu replaces it. */
@media (min-width: 769px) {
    .pot-mega-parent .wp-block-navigation__submenu-container {
        display: none !important;
    }
}

.pot-mega {
    position: fixed;
    /* top is set by JS */
    left: 0;
    right: 0;
    z-index: 10000;
    /* background: rgba(0, 0, 0, 0.88); */
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.pot-mega--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pot-mega.hidden {
    display: none;
}

.pot-mega__inner {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
    min-height: 420px;
}

/* ── Left column: show list ── */
.pot-mega__left {
    flex: 0 0 340px;
}

.pot-mega__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pot-mega__show-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pot-mega__show-item:hover,
.pot-mega__show-item--active {
    background-color: rgba(255,255,255,0.06);
}

.pot-mega__show-item--active {
    border-left: 2px solid rgba(241, 184, 1, 0.7);
}

.pot-mega__show-thumb {
    width: 48px;
    height: 30px;
    object-fit: cover;
    border-radius: 0.25rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.pot-mega__show-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1.3;
}

.pot-mega__show-item:hover .pot-mega__show-name,
.pot-mega__show-item--active .pot-mega__show-name {
    color: #fff;
}

/* "All performances" overview link at the bottom of the list */
.pot-mega__all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(241, 184, 1, 0.85);
    text-decoration: none;
    border: 1px solid rgba(241, 184, 1, 0.25);
    border-radius: 0.375rem;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pot-mega__all-link:hover {
    color: #f1b801;
    border-color: rgba(241, 184, 1, 0.5);
    background: rgba(241, 184, 1, 0.08);
}
.pot-mega__all-link svg {
    width: 14px;
    height: 14px;
}

/* ── Right column: detail ── */
.pot-mega__right {
    flex: 1;
    min-width: 0;
}

.pot-mega__detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.pot-mega__detail-content {
    animation: potMegaFadeIn 0.2s ease;
}

@keyframes potMegaFadeIn {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pot-mega__detail-cover img {
    max-height: 200px;
}

/* ── Marker on Spektakle nav link ── */
.pot-mega__marker {
    position: absolute;
    bottom: 3px;
    left: -8px;
    width: 95px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: contain;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pot-mega__marker--visible {
    opacity: 1;
}

/* Force nav children transparent so ::before shows through */
.pot-mega-nav--open,
.pot-mega-nav--open .wp-block-navigation__container,
.pot-mega-nav--open .wp-block-navigation__responsive-container,
.pot-mega-nav--open .wp-block-navigation__responsive-container-content {
    background-color: transparent !important;
    background: transparent !important;
}

/* Nav area background when mega menu is open */
.pot-mega-nav--open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: -1;
    pointer-events: none;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .pot-mega,
    .pot-mega__marker {
        display: none !important;
    }
}
