/* =================================
   GLOBAL BASE STYLES — ruter.dk
   ================================= */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    height: -webkit-fill-available;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* =================================
   LEAFLET / MAP TYPOGRAPHY
   ================================= */

.leaflet-control-custom-attribution {
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
}

.leaflet-popup-content h3 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    margin-bottom: 0.5rem;
}

.leaflet-popup-content p {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* =================================
   RESPONSIVE FONT SIZE OVERRIDES
   ================================= */

@media (max-width: 768px) {
    :root {
        --font-size-xs: 0.7rem;
        --font-size-sm: 0.8rem;
        --font-size-base: 0.9rem;
        --font-size-lg: 1rem;
        --font-size-xl: 1.1rem;
        --font-size-2xl: 1.3rem;
        --font-size-3xl: 1.6rem;
        --font-size-4xl: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
}

/* =================================
   COOKIE BANNER
   ================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    animation: slideUpFadeIn 0.3s ease-out forwards;
}

/* Special styling for iframe embeds */
.cookie-banner.is-iframe {
    position: fixed;
    bottom: 0;
    right: 0;
    left: auto;
    width: auto;
    max-width: 350px;
    box-sizing: border-box;
    z-index: 999999;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 100px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.cookie-banner-text a {
    color: #007bff;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-text a:hover {
    color: #0056b3;
    text-decoration: none;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    white-space: nowrap;
}

.is-iframe .cookie-btn {
    padding: 8px 12px;
    border-radius: 50%;
    min-width: auto;
}

.cookie-btn-accept {
    background: #28a745;
    color: white;
}

.cookie-btn-accept:hover {
    background: #218838;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.cookie-btn-decline {
    background: #6c757d;
    color: white;
}

.cookie-btn-decline:hover {
    background: #545b62;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

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

.cookie-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cookie-banner-text a:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

/* Ensure banner doesn't interfere with map controls */
.cookie-banner ~ .leaflet-control-container .leaflet-bottom {
    margin-bottom: 80px;
    transition: margin-bottom 0.3s ease;
}

.cookie-banner:not(.show) ~ .leaflet-control-container .leaflet-bottom {
    margin-bottom: 10px;
}

.map-fullscreen-active .cookie-banner {
    position: fixed;
    z-index: 999999;
}

@keyframes slideUpFadeIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 12px;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cookie-banner-text {
        min-width: auto;
        text-align: center;
    }

    .cookie-banner-text p {
        font-size: 13px;
    }

    .cookie-banner-actions {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 10px 12px;
    }

    .cookie-banner-content {
        gap: 10px;
    }

    .cookie-banner-text p {
        font-size: 12px;
        line-height: 1.3;
    }
}

@media (prefers-contrast: high) {
    .cookie-banner {
        background: white;
        border-top: 2px solid #000;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .cookie-banner-text p { color: #000; }

    .cookie-btn-accept {
        background: #000;
        color: white;
        border: 2px solid #000;
    }

    .cookie-btn-decline {
        background: white;
        color: #000;
        border: 2px solid #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-btn {
        transition: none;
    }

    .cookie-btn:hover {
        transform: none;
        box-shadow: none;
    }
}
