@import url('./single.css');

/* Wandelroman-specific styles */

:root {
    --pane-radius: 0.5rem;
    --panel-width: 22rem;
}

#header-row {
    position: relative;
    border-bottom: 5px solid var(--color-darkred);
    transition: all 0.3s ease;
    background: var(--color-darkbrown);
}

#header-row:hover {
    border-bottom-color: var(--color-lightred);
}

.genre-tags {
    font-family: var(--font-alt);
    font-size: 0.65rem;
    color: white;
    display: block;
    text-transform: lowercase;
    margin-top: 4.5rem;
}

#header-row h1 {
    margin-top: 0;
}

/* Down arrow indicator */
#header-row::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: calc(50% + (var(--panel-width) / 2));
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--color-darkred);
    transition: all 0.2s ease;
}

#header-row:hover::after {
    border-top-color: var(--color-lightred);
}

/* Rotate arrow when expanded */
#header-row.expanded::after {
    transform: translateX(-50%) rotate(180deg);
    border-top-color: var(--color-darkred);
}

#header-row.expanded:hover::after {
    border-top-color: var(--color-lightred);

}

#header-row span:has(a) {
    text-decoration: none;
}

#header-row p {
    margin-bottom: 1.15rem;
}

#header-row h2,
#header-row h3 {
    margin: 0.25rem;
    color: var(--color-lightgray);
    scroll-margin-top: 3.5rem;
}

#header-row .header-cast {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-darkred);
    margin-bottom: 1rem;
}

.header-cast .icon-person {
    margin-top: 3px;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.header-cast-names {
    display: flex;
    flex-wrap: wrap;
}


.header-cast-names * {
    margin-right: 0.75rem;
}

#header-row .header-cast a {
    text-decoration: underline;
}

#header-row .header-cast a:hover {
    text-decoration: none;
}

/* Description container */
.wandelroman-header-description {
    cursor: pointer;
}

/* Truncate description text to 3 lines when collapsed */
.description-text {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Expanded state - show all description text */
#header-row.expanded .description-text {
    display: block;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Hide Cast section when collapsed */
.description-cast {
    display: none;
    transition: all 0.3s ease;
}

/* Show Cast section when expanded */
#header-row.expanded .description-cast {
    display: block;
    background-color: var(--color-darkbrown);
    border-radius: var(--pane-radius);
    padding: var(--pane-radius);
}

/* "meer" indicator when truncated - on clickable span */
.header-expand-toggle {
    display: block;
    text-align: center;
    margin-top: 1em;
    cursor: pointer;
}

.header-expand-toggle::after {
    content: '(meer)';
    color: var(--color-darkred);
    opacity: 0.9;
    font-size: 1rem;
}

/* Change to "minder" when expanded */
#header-row.expanded .header-expand-toggle::after {
    content: '(minder)';
}



/* Sidebar info links styling */

/* Make container tall enough so aside doesn't reach footer */
.content-row:has(.aside-info-pane) {
    min-height: 20vh;
}

.aside-info-pane {
    position: absolute;
    top: 10rem;
    width: var(--panel-width);
    margin-bottom: calc(var(--panel-spacing) * -8);
    border: 1px solid var(--color-lightbeige);
    border-radius: var(--pane-radius);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    float: left;
}

.aside-info-pane dl {
    line-height: 1.75rem;
}

.aside-info-pane dt {
    font-family: var(--font-alt);
    color: var(--color-darkred);
    font-size: 0.75rem;
}

.aside-info-pane dt:not(:first-child) {
    margin-top: 1.8rem;
}

.aside-info-pane dd {
    margin-bottom: 0.65rem;
    font-size: 1.1rem;

}

.aside-info-media button {
    align-self: center;
    bottom: 0px;
    z-index: 1000;
    pointer-events: auto;
    opacity: 1;
}

.aside-info-media .btn {
    transform: unset;
}

#map-aside {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 125px;
    border-radius: var(--pane-radius) var(--pane-radius) 0 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
    background-color: white;
}

#map-aside:hover {
    opacity: 0.8;
}

.ready-to-start {
    background-color: var(--color-lightbeige);
    padding: var(--panel-spacing);
}

.ready-to-start h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}


.ready-to-start .btn {
    width: 100%;
}

/* Start button states */
#startWandelroman.awaiting-verification {
    position: relative;
    overflow: hidden;
}


#startWandelroman.verified {
    background-color: var(--color-darkred);
    color: white;
    animation: pulse 0.6s ease-in-out;
}

#startWandelroman:disabled {
    opacity: 0.6;
    cursor: wait;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}


.aside-info-pane ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.aside-info-pane ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.aside-info-pane ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-darkred);
    font-weight: bold;
    font-size: 1.1rem;
}


/* Fullscreen Map Modal */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.map-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#map-fullscreen {
    width: 100%;
    height: 100%;
    position: relative;
}

.map-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--color-darkbrown);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.map-modal-close:hover {
    background: var(--color-lightred);
    color: white;
    transform: rotate(90deg);
}

.main-content-pane ul {
    font-size: 1.1rem;

}

/* Map container styling */
/* #map {
    border: 1px solid var(--color-lightbeige);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
} */

/* Info Panel in Main Content */
.info-panel {
    border-left: 3px solid var(--color-darkred);
    padding-left: 1rem;
    margin: calc(var(--panel-spacing)/1) 0;
    padding: calc(var(--panel-spacing)/2) var(--panel-spacing);
    margin-left: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--color-lightgray);
}

.info-panel-meta-label {
    display: inline;
    font-size: 1rem;
    white-space: nowrap;
}

.info-panel-meta-label::after{
    content: ':';
}


.info-panel-meta-value {
    display: inline;
    font-size: 1rem;
    font-weight: 500;
}

.info-panel-meta-value::after {
    content: ' - ';
}

.info-panel-meta-value:is(:last-of-type)::after {
    content: '';
}




.info-panel-meta-label [class^="icon-"],
.info-panel-meta-label [class*=" icon-"] {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
    margin-bottom: 3px;
}

/* Ctrl scroll tooltip styling */
.ctrl-scroll-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(45, 30, 30, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: var(--font-alt);
    font-size: 0.9rem;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Audio controls styling */
audio {
    border-radius: 8px;
}


/* Hidden Audio for Previews */
.hidden-audio {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Fixed Audio Player at Bottom */
.audio-player-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--color-darkbrown), rgba(45, 30, 30, 0.98));
    border-top: 2px solid var(--color-lightred);
    padding: 1rem 2rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.audio-player-fixed.active {
    transform: translateY(0);
}

.audio-player-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Album Art / Thumbnail */
.audio-player-artwork {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.audio-player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Track Info */
.audio-player-info {
    flex: 1;
    min-width: 0;
    color: white;
}

.audio-player-title {
    font-family: var(--font-text);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-player-artist {
    font-family: var(--font-alt);
    font-size: 0.85rem;
    color: var(--color-lightbeige);
    margin: 0;
}

/* Controls */
.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.audio-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-lightred);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
}

.audio-control-btn:hover {
    background: var(--color-darkred);
    transform: scale(1.08);
}

.audio-control-btn.play-pause {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
}

.audio-control-btn svg {
    width: 24px;
    height: 24px;
}

.audio-control-btn.play-pause svg {
    width: 26px;
    height: 26px;
}

.audio-control-btn.rewind-btn svg,
.audio-control-btn.forward-btn svg {
    width: 28px;
    height: 28px;
}

/* Progress Bar */
.audio-player-progress {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(50px, auto) 1fr minmax(50px, auto);
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.audio-progress-bar-container {
    position: relative;
    height: 6px;
    background: rgba(232, 226, 213, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    grid-column: 2;
}

.audio-progress-bar {
    height: 100%;
    background: var(--color-lightred);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.audio-progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--color-lightred);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.audio-progress-bar-container:hover .audio-progress-bar::after {
    width: 16px;
    height: 16px;
    right: -8px;
}

.audio-time-display {
    display: contents;
}

.audio-time-display span {
    font-family: var(--font-alt);
    font-size: 0.75rem;
    color: var(--color-lightbeige);
}

#currentTime {
    grid-column: 1;
    text-align: left;
}

#totalTime {
    grid-column: 3;
    text-align: right;
}

/* Close Button */
.audio-player-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(232, 226, 213, 0.1);
    border: 1px solid rgba(232, 226, 213, 0.3);
    color: var(--color-lightbeige);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    flex-shrink: 0;
}

.audio-player-close:hover {
    background: rgba(232, 226, 213, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* Player Map Container */
.player-map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    position: relative;
}

/* Map Toggle Button */
.player-map-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(45, 30, 30, 0.8);
    border: 1px solid var(--color-lightred);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 6px;
    z-index: 10;
}

.player-map-toggle:hover {
    background: rgba(162, 51, 37, 0.9);
    transform: scale(1.05);
}

.player-map-toggle svg {
    width: 100%;
    height: 100%;
}

/* Fullscreen Player Mode */
.audio-player-fixed.fullscreen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-darkbrown);
    padding: 6rem 2rem 2rem 2rem;
    transform: none;
    border-top: none;
}

.audio-player-fixed.fullscreen .audio-player-container {
    max-width: 100%;
    height: calc(100vh - 8rem);
    flex-direction: column;
    gap: 1.5rem;
}

.audio-player-fixed.fullscreen .audio-player-artwork {
    width: 100%;
    height: calc(100% - 200px);
    min-height: 400px;
    max-height: 800px;
    border-radius: var(--pane-radius);
    position: relative;
}

.audio-player-fixed.fullscreen .player-map-toggle {
    width: 40px;
    height: 40px;
    top: 16px;
    right: 16px;
    background: rgba(45, 30, 30, 0.9);
    border: 2px solid var(--color-lightred);
    z-index: 1000;
}

.audio-player-fixed.fullscreen .audio-player-info {
    text-align: center;
}

.audio-player-fixed.fullscreen .audio-player-title {
    font-size: 1.5rem;
    white-space: normal;
}

.audio-player-fixed.fullscreen .audio-player-artist {
    font-size: 1rem;
}

.audio-player-fixed.fullscreen .audio-player-controls {
    justify-content: center;
}

.audio-player-fixed.fullscreen .audio-player-progress {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.audio-player-fixed.fullscreen .audio-progress-bar-container {
    grid-column: 2;
}

.audio-player-fixed.fullscreen #currentTime {
    grid-column: 1;
}

.audio-player-fixed.fullscreen #totalTime {
    grid-column: 3;
}

/* GPS Location Button */
.gps-button {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--color-lightbeige);
    color: var(--color-darkbrown);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.gps-button:hover {
    background: var(--color-lightbeige);
    border-color: var(--color-lightred);
    transform: scale(1.08);
}

.gps-button.active {
    background: var(--color-lightred);
    border-color: var(--color-lightred);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(162, 51, 37, 0.6);
    }
}

/* User Location Marker */
.user-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4A90E2;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: location-pulse 2s infinite;
}

@keyframes location-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(74, 144, 226, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Location Notification */
.location-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    max-width: 500px;
    width: 90%;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.location-notification.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;
}

.location-notification-content {
    background: var(--color-darkbrown);
    border: 2px solid var(--color-lightred);
    border-radius: var(--pane-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.location-notification-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.location-notification-message {
    flex: 1;
    margin: 0;
    color: white;
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.5;
}

.location-notification-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(232, 226, 213, 0.1);
    border: 1px solid rgba(232, 226, 213, 0.3);
    color: var(--color-lightbeige);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.location-notification-close:hover {
    background: rgba(232, 226, 213, 0.2);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 760px) {

    /* Center arrow on mobile */
    #header-row::after {
        left: 50%;
    }

    /* Show 4 lines on mobile */
    .wandelroman-header-description {
        line-clamp: 4;
        -webkit-line-clamp: 4;
    }

    /* Reset aside positioning on mobile */
    .aside-info-pane {
        position: static;
        top: unset;
        float: none;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: var(--panel-spacing);
    }

    .audio-player-fixed {
        padding: 0.75rem 1rem;
    }

    .audio-player-container {
        gap: 0.75rem;
    }

    .audio-player-artwork {
        width: 50px;
        height: 50px;
    }

    .audio-player-title {
        font-size: 1rem;
    }

    .audio-player-artist {
        font-size: 0.75rem;
    }

    .audio-control-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .audio-control-btn.play-pause {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    /* Fullscreen mobile styles */
    .audio-player-fixed.fullscreen {
        padding: 5rem 1rem 1rem 1rem;
    }

    .audio-player-fixed.fullscreen .audio-player-container {
        height: calc(100vh - 6rem);
        gap: 1rem;
    }

    .audio-player-fixed.fullscreen .audio-player-artwork {
        height: calc(100% - 180px);
        min-height: 250px;
    }

    .audio-player-fixed.fullscreen .player-map-toggle {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .audio-player-fixed.fullscreen .audio-player-title {
        font-size: 1.2rem;
    }

    .audio-player-fixed.fullscreen .audio-player-artist {
        font-size: 0.9rem;
    }

    .gps-button {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .audio-player-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .audio-player-info {
        order: 1;
        flex: 1 1 auto;
    }

    .audio-player-artwork {
        order: 2;
    }

    .audio-player-controls {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
        gap: 0.75rem;
    }

    .audio-player-close {
        order: 4;
    }

    .audio-player-progress {
        order: 5;
        flex: 1 1 100%;
    }

    .audio-player-fixed {
        padding: 0.75rem;
    }

    /* Fullscreen mobile styles for small devices */
    .audio-player-fixed.fullscreen {
        padding: 4.5rem 0.75rem 0.75rem 0.75rem;
    }

    .audio-player-fixed.fullscreen .audio-player-container {
        height: calc(100vh - 5.5rem);
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .audio-player-fixed.fullscreen .audio-player-artwork {
        height: calc(100% - 160px);
        min-height: 200px;
        order: 0;
    }

    .audio-player-fixed.fullscreen .audio-player-info {
        order: 1;
        flex: 0 0 auto;
    }

    .audio-player-fixed.fullscreen .audio-player-controls {
        order: 2;
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .audio-player-fixed.fullscreen .audio-player-progress {
        order: 3;
        flex: 0 0 auto;
    }

    .audio-player-fixed.fullscreen .audio-player-close {
        order: 4;
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .audio-player-fixed.fullscreen .player-map-toggle {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }

    .audio-player-fixed.fullscreen .audio-control-btn {
        width: 40px;
        height: 40px;
    }

    .audio-player-fixed.fullscreen .audio-control-btn.play-pause {
        width: 46px;
        height: 46px;
    }

    .gps-button {
        bottom: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }
}