/**
 * Audio Tour Styling
 * 
 * GPS-baserad ljudguide - Modern & Stilren design.
 * 
 * @package Omtanksamma
 */

/* =====================================================
   RESET & BASE
   ===================================================== */

.audio-tour-standalone {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #0C1A26 0%, #1B3147 50%, #1A6B82 100%);
    overflow-x: hidden;
}

.audio-tour {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* =====================================================
   LOADING STATE
   ===================================================== */

.audio-tour__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.audio-tour__loading-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.audio-tour__loading p {
    color: #ffffff;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   WELCOME SECTION
   ===================================================== */

.audio-tour__welcome {
    padding: 3rem 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Tillbakaknapp */
.audio-tour__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    align-self: flex-start;
    transition: all 0.2s ease;
}

.audio-tour__back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.audio-tour__back-btn svg {
    flex-shrink: 0;
}

.audio-tour__logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.audio-tour__logo-img {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.audio-tour__welcome-header {
    margin-bottom: 3rem;
}

.audio-tour__hero-text h1,
.audio-tour__title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.audio-tour__lead,
.audio-tour__description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

.audio-tour__description {
    margin-top: 1.5rem;
}

.audio-tour__info {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem auto;
    max-width: 380px;
    width: 100%;
}

.audio-tour__info-item {
    flex: 1;
}

.audio-tour__info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.audio-tour__info-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.audio-tour__info-item--flag {
    justify-content: center;
}

.audio-tour__info-icon {
    color: rgba(255, 255, 255, 0.95);
    stroke-width: 2;
    width: 20px;
    height: 20px;
}

.audio-tour__info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.125rem;
}

.audio-tour__info-label {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.audio-tour__info-value {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 700;
}

.audio-tour__flag {
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.audio-tour__flag:hover {
    transform: scale(1.1);
}

.audio-tour__actions {
    margin: 2rem 0;
}

.audio-tour__start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: #1A6B82;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(26, 107, 130, 0.4);
    letter-spacing: 0.02em;
}

.audio-tour__start-btn:hover {
    background: #2990AA;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 107, 130, 0.5);
}

.audio-tour__start-btn:active {
    background: #125162;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 107, 130, 0.4);
}

.audio-tour__start-btn svg {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .audio-tour__info {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .audio-tour__info-item {
        padding: 0.75rem 0.5rem;
    }
    
    .audio-tour__info-value {
        font-size: 1.125rem;
    }
    
    .audio-tour__language-selector {
        gap: 0.5rem;
    }
    
    .audio-tour__language-btn {
        max-width: none;
        padding: 0.875rem;
    }
    
    .language-flag {
        font-size: 2rem;
    }
    
    .audio-tour__title {
        font-size: 1.75rem;
    }
}

/* =====================================================
   ACTIVE TOUR SECTION
   ===================================================== */

.audio-tour__active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: 100vw;
    background: #f5f7fa;
    overflow: hidden;
}

.audio-tour__header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    color: #1a1a1a;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
}

.audio-tour__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.audio-tour__back-btn {
    background: #1A6B82;
    border: none;
    color: #ffffff;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(26, 107, 130, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-tour__back-btn:hover {
    background: #2990AA;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 107, 130, 0.4);
}

.audio-tour__header-location {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #E1E8F0 0%, #F2F5F8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-tour__header-location .location-label {
    font-size: 0.8125rem;
    color: #64778A;
    font-weight: 600;
}

.audio-tour__header-location .location-name {
    font-size: 1rem;
    color: #1A6B82;
    font-weight: 700;
}

.audio-tour__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
}

.audio-tour__notice-icon {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.125rem;
}

.audio-tour__notice p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.audio-tour__notice strong {
    color: #ffffff;
    font-weight: 600;
}

/* Namn-formulär */
.audio-tour__user-form {
    margin: 1.5rem 0 1rem;
}

.audio-tour__form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.audio-tour__form-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1rem 0;
    text-align: center;
}

.audio-tour__form-field {
    width: 100%;
}

.audio-tour__name-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: #0C1A26;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: center;
}

.audio-tour__name-input::placeholder {
    color: #64778A;
}

.audio-tour__name-input:focus {
    border-color: #1A6B82;
    box-shadow: 0 0 0 3px rgba(26, 107, 130, 0.1);
}

/* Språkväljare */
.audio-tour__language-selector {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
    justify-content: center;
}

.audio-tour__language-btn {
    flex: 1;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: rgba(255, 255, 255, 0.7);
}

.audio-tour__language-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.audio-tour__language-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #1A6B82;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 107, 130, 0.3);
}

.audio-tour__language-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.language-flag {
    font-size: 2.5rem;
    line-height: 1;
}

.language-name {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.language-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.gps-status-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gps-status-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.gps-location-pin {
    flex-shrink: 0;
    color: #666;
    transition: color 0.3s ease;
}

.gps-status-lamp {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Live/Success status - Grön lampa */
.gps-status-btn[data-status="live"] .gps-status-lamp,
.gps-status-btn[data-status="success"] .gps-status-lamp {
    color: #4CAF50;
    filter: drop-shadow(0 0 4px rgba(76, 175, 80, 0.8));
}

.gps-status-btn[data-status="live"] .gps-location-pin,
.gps-status-btn[data-status="success"] .gps-location-pin {
    color: #333;
}

/* Disconnected/Error status - Röd lampa */
.gps-status-btn[data-status="disconnected"] .gps-status-lamp,
.gps-status-btn[data-status="error"] .gps-status-lamp {
    color: #F44336;
    filter: drop-shadow(0 0 4px rgba(244, 67, 54, 0.8));
}

.gps-status-btn[data-status="disconnected"] .gps-location-pin,
.gps-status-btn[data-status="error"] .gps-location-pin {
    color: #999;
}

/* Connecting/Loading status - Orange lampa */
.gps-status-btn[data-status="connecting"] .gps-status-lamp,
.gps-status-btn[data-status="loading"] .gps-status-lamp {
    color: #FFA500;
    filter: drop-shadow(0 0 4px rgba(255, 165, 0, 0.8));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.gps-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.audio-tour__progress {
    margin-top: 0.75rem;
}

.audio-tour__progress-bar-container {
    background: #e8eaed;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.625rem;
}

.audio-tour__progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.audio-tour__progress-text {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

/* Header Next Button */
.audio-tour__header-next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1A6B82;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(26, 107, 130, 0.3);
}

.audio-tour__header-next-btn:hover {
    background: #226d84;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 107, 130, 0.4);
}

.audio-tour__header-next-btn:active {
    transform: translateY(0);
}

/* =====================================================
   MAP & STOPS CONTAINER
   ===================================================== */

.audio-tour__content {
    flex: 1;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
}

.audio-tour__map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#tour-map {
    width: 100%;
    height: 100%;
}

/* Ljudvågsanimation - overlay på kartan */
.audio-tour__waveform {
    position: fixed;
    bottom: 68px; /* precis över stoppanelen */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 100px;
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.waveform__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1A6B82;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.waveform__bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
}

.waveform__bar {
    width: 3px;
    background: #1A6B82;
    border-radius: 3px;
    animation: waveform-idle 1.4s ease-in-out infinite;
    height: 6px;
}

.audio-tour__waveform.playing .waveform__bar {
    animation: waveform-play 0.8s ease-in-out infinite alternate;
}

@keyframes waveform-idle {
    0%, 100% { height: 4px; opacity: 0.3; }
    50% { height: 10px; opacity: 0.6; }
}

@keyframes waveform-play {
    0% { height: 4px; }
    100% { height: 24px; }
}

/* Sikte-knapp styling */
.leaflet-control-locate {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin-top: 10px !important;
    margin-right: 10px !important;
}

.leaflet-control-locate:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}

.leaflet-control-locate svg {
    color: #1A6B82;
}

.audio-tour__stops {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    overflow: visible;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(calc(100% - 56px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 55vh;
}

.audio-tour__stops.expanded {
    transform: translateY(0);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
}

.audio-tour__stops-toggle {
    width: 100%;
    background: #ffffff;
    border: none;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 24px 24px 0 0;
    position: relative;
    z-index: 1;
    min-height: 60px;
}

.audio-tour__stops-toggle:hover {
    background: #f8f9ff;
}

.audio-tour__stops-toggle h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.audio-tour__stops-toggle .toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #667eea;
    transform: rotate(180deg);
}

.audio-tour__stops-toggle.expanded .toggle-icon {
    transform: rotate(0deg);
}

.audio-tour__stops-list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: calc(50vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, #F2F5F8 0%, #FFFFFF 100%);
}

.tour-stop-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin: 0.5rem 1rem;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid #E1E8F0;
    box-shadow: 0 2px 8px rgba(12, 26, 38, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.tour-stop-item:hover {
    background: #FFFFFF;
    border-color: #1A6B82;
    box-shadow: 0 4px 16px rgba(26, 107, 130, 0.12);
    transform: translateY(-2px);
}

.tour-stop-item:last-child {
    margin-bottom: 1rem;
}

.tour-stop-item.active {
    background: linear-gradient(135deg, #E1E8F0 0%, #F2F5F8 100%);
    border: 2px solid #1A6B82;
    box-shadow: 0 4px 20px rgba(26, 107, 130, 0.2);
}

.tour-stop-item.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -2px;
    bottom: -2px;
    width: 4px;
    background: #1A6B82;
    border-radius: 12px 0 0 12px;
}

.tour-stop-item.visited {
    opacity: 0.85;
    background: #F8F9FA;
}

.tour-stop-item.visited:hover {
    opacity: 1;
    background: #FFFFFF;
    border-color: #A8C8D8;
}

.tour-stop-item.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
    border-left: 4px solid #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.tour-stop-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.tour-stop-item.locked:hover {
    transform: none;
    border-color: #E1E8F0;
    box-shadow: 0 2px 8px rgba(12, 26, 38, 0.04);
}

.stop-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1A6B82 0%, #2990AA 100%);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(26, 107, 130, 0.25);
    transition: all 0.25s ease;
}

.tour-stop-item:hover .stop-number {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 107, 130, 0.3);
}

.tour-stop-item.visited .stop-number {
    background: linear-gradient(135deg, #CBD8E5 0%, #E1E8F0 100%);
    color: #64778A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tour-stop-item.locked .stop-number {
    background: #F2F5F8;
    color: #CBD8E5;
    box-shadow: none;
}

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

.stop-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.stop-duration {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.stop-play-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    color: #1A6B82;
    border: 2px solid #1A6B82;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.stop-play-btn svg {
    flex-shrink: 0;
}

.stop-play-btn:hover {
    background: #1A6B82;
    color: #ffffff;
    transform: scale(1.08);
    border-color: #1A6B82;
}

.stop-play-btn:hover svg {
    fill: currentColor;
    stroke: currentColor;
}

.stop-play-btn--replay {
    border-color: #64778A;
    color: #64778A;
}

.stop-play-btn--replay:hover {
    background: #64778A;
    color: #ffffff;
    border-color: #64778A;
}

.stop-play-btn:disabled {
    background: transparent;
    color: #E1E8F0;
    border-color: #E1E8F0;
    cursor: not-allowed;
}

.stop-play-btn:disabled:hover {
    transform: none;
    background: transparent;
}

.stop-status {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stop-status[data-status="active"] {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.stop-status[data-status="visited"] {
    background: #9E9E9E;
}

/* =====================================================
   AUDIO PLAYER
   ===================================================== */

/* Player inbäddad i avsnittsguiden */
.audio-tour__player-embedded {
    background: rgba(26, 107, 130, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 1rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.audio-tour__player-inner {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.audio-tour__player-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.audio-tour__player-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.audio-tour__player-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.audio-tour__player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.audio-tour__player-btn {
    width: 44px;
    height: 44px;
    background: #1A6B82;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(26, 107, 130, 0.3);
    flex-shrink: 0;
}

.audio-tour__player-btn:hover {
    transform: scale(1.08);
    background: #226d84;
    box-shadow: 0 6px 16px rgba(26, 107, 130, 0.4);
}

.audio-tour__player-btn:active {
    transform: scale(0.95);
}

.audio-tour__player-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audio-tour__player-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
}

.audio-tour__player-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.audio-tour__player-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.audio-tour__player-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.audio-tour__player-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.audio-tour__player-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.audio-tour__player-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Nästa-knapp */
.audio-tour__next-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #1A6B82;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(26, 107, 130, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: slideInRight 0.4s ease-out;
}

.audio-tour__next-btn:hover {
    background: #2990AA;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 107, 130, 0.5);
}

.audio-tour__next-btn:active {
    transform: translateY(0);
}

.next-btn-text {
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

/* =====================================================
   NOTIFICATIONS
   ===================================================== */

/* Kartmarkörer - mindre och mer diskreta */
.audio-tour-marker {
    background: transparent;
    border: none;
}

.audio-tour-marker .marker-number {
    width: 28px;
    height: 28px;
    background: #1A6B82;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(26, 107, 130, 0.4);
    border: 2px solid #ffffff;
    transition: all 0.2s ease;
}

.audio-tour-marker:hover .marker-number {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(26, 107, 130, 0.5);
}

/* User position marker */
.user-position-marker {
    background: transparent;
    border: none;
}

.user-position-marker .user-dot {
    width: 16px;
    height: 16px;
    background: #1A6B82;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(26, 107, 130, 0.6);
    animation: pulse-user 2s ease-in-out infinite;
}

@keyframes pulse-user {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Hitta min position-knapp */
.leaflet-control-locate {
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    color: #1A6B82;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.leaflet-control-locate:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.leaflet-control-locate:active {
    transform: translateY(0);
}

/* =====================================================
   NOTIFICATIONS (TOAST)
   ===================================================== */

.tour-notification {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 1rem 1.75rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 90%;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tour-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tour-notification--success {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.4);
}

.tour-notification--error {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.4);
}

.tour-notification--warning {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    box-shadow: 0 8px 32px rgba(255, 152, 0, 0.4);
}

.tour-notification--info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

/* =====================================================
   LEAFLET MAP CUSTOMIZATION
   ===================================================== */

.audio-tour-marker {
    background: transparent;
    border: none;
}

.marker-number {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    border: 5px solid #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-tour-marker:hover .marker-number {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.6);
}

.audio-tour-marker.active .marker-number {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    animation: pulse 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
}

.audio-tour-marker.visited .marker-number {
    background: linear-gradient(135deg, #b0b0b0 0%, #808080 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.user-position-marker {
    background: transparent;
    border: none;
    animation: userPulse 2.5s ease-in-out infinite;
}

.user-dot {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: 5px solid #ffffff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
    position: relative;
}

.user-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.25);
    border-radius: 50%;
    animation: userRipple 2.5s ease-out infinite;
}

@keyframes userPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes userRipple {
    0% {
        width: 48px;
        height: 48px;
        opacity: 0.7;
    }
    100% {
        width: 96px;
        height: 96px;
        opacity: 0;
    }
}

/* Leaflet Popup Styling */
.tour-stop-popup {
    text-align: center;
    padding: 0.75rem;
}

.tour-stop-popup h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a1a1a;
}

.tour-stop-popup img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tour-stop-popup p {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.popup-play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.popup-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (min-width: 768px) {
    .audio-tour__content {
        flex-direction: row;
    }
    
    .audio-tour__map {
        flex: 2;
        min-height: auto;
    }
    
    .audio-tour__stops {
        flex: 1;
        max-height: none;
        border-top: none;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0;
        margin-top: 0;
    }
    
    .audio-tour__player-embedded {
        margin: 0 1.5rem 1.5rem;
        padding: 1.25rem;
    }
    
    .audio-tour__welcome-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .audio-tour__welcome {
        padding: 2rem 1rem;
    }
    
    .audio-tour__welcome-header h1 {
        font-size: 2rem;
    }
    
    .audio-tour__tour-info {
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .tour-stop-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .stop-number {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .audio-tour__player-embedded {
        margin: 0 0.75rem 0.75rem;
        padding: 0.875rem;
    }
    
    .audio-tour__player-btn {
        width: 40px;
        height: 40px;
    }
}
