/* =================================
   FULL-PAGE EXPLORE MAP STYLES
   ================================= */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* --- Top Bar --- */
.full-map-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 2000;
}

.full-map-topbar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.full-map-topbar__logo img {
    height: 24px;
    width: auto;
}

.full-map-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.full-map-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: #191919;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: background 0.2s;
}

.full-map-share-btn:hover {
    background: #333;
}

.full-map-share-btn.copied {
    background: #27ae60;
}

/* --- Map Container --- */
.full-map-wrapper {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
}

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

/* --- Filter Panel --- */
.filter-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    max-height: calc(100% - 80px);
    overflow-y: auto;
    width: 220px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.filter-panel.collapsed {
    transform: scale(0);
    transform-origin: top left;
    opacity: 0;
    pointer-events: none;
}

.filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    color: #333;
}

.filter-panel__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.filter-panel__close:hover {
    color: #191919;
}

.filter-toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 999;
    width: 34px;
    height: 34px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
    transition: background 0.15s;
}

.filter-toggle-btn:hover {
    background: #f4f4f4;
}

.filter-toggle-btn.hidden {
    display: none;
}

/* Filter Groups */
.filter-group {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group__title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 0.35rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: #333;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.filter-checkbox__name {
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-checkbox.inactive {
    opacity: 0.4;
}

.filter-checkbox.inactive .filter-checkbox__dot {
    background: #ccc !important;
}

/* --- Sidebar --- */
.full-map-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    box-shadow: -3px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.full-map-sidebar.open {
    transform: translateX(0);
}

.full-map-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.full-map-sidebar__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 0;
    line-height: var(--line-height-tight);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

.full-map-sidebar__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.full-map-sidebar__close:hover {
    color: #191919;
}

.full-map-sidebar__body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

/* Sidebar content elements */
.sidebar-image {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    max-height: 200px;
    margin-bottom: 0.75rem;
}

.sidebar-desc {
    font-size: var(--font-size-sm);
    color: #555;
    line-height: var(--line-height-normal);
    margin-bottom: 1rem;
    white-space: pre-line;
}

.sidebar-meta {
    font-size: var(--font-size-sm);
    color: #666;
    margin-bottom: 0.35rem;
}

.sidebar-meta strong {
    color: #333;
}

.sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: #229966;
    text-decoration: none;
    margin-right: 0.75rem;
}

.sidebar-link:hover {
    color: #1a7a50;
    text-decoration: underline;
}

.sidebar-gpx {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #191919;
    color: #fff;
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.sidebar-gpx:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.sidebar-detail-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 0.85rem;
    background: #229966;
    color: #fff;
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-detail-link:hover {
    background: #1a7a50;
    color: #fff;
    text-decoration: none;
}

.sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.sidebar-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #27ae60;
    color: #fff;
    margin-bottom: 0.5rem;
}

/* --- Ruter Logo (bottom-right on map) --- */
.full-map-logo {
    position: absolute;
    bottom: 4px;
    right: 40px;
    z-index: 1000;
    display: block;
    line-height: 0;
}

.full-map-logo .ruterdk-logo {
    width: 100px;
    height: 40px;
    padding: 0 10px;
}

/* --- Custom Attribution --- */
.map-attribution {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 1000;
    background: #fff;
    border: 1px solid #E9F2EE;
    border-radius: 20px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    overflow: hidden;
    width: 28px;
    height: 28px;
    transition: width 0.3s ease;
}

.map-attribution.expanded {
    width: 320px;
}

.attribution-info-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}

.attribution-info-btn:hover { background: #f5f5f5; }

.attribution-info-btn img {
    width: 18px;
    height: 18px;
}

.attribution-text {
    display: none;
    padding: 0 8px;
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

.map-attribution.expanded .attribution-text { display: block; }

.attribution-text a { color: #666; }

/* --- Responsive --- */
@media (max-width: 767px) {
    .filter-panel {
        width: 180px;
        font-size: 0.85rem;
    }

    .full-map-sidebar {
        position: absolute;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 55%;
        max-height: 55%;
        transform: translateY(100%);
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.15);
        border-radius: 12px 12px 0 0;
    }

    .full-map-sidebar.open {
        transform: translateY(0);
    }

    .full-map-topbar {
        padding: 0 0.75rem;
    }
}
