* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}


.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.info-panel.hidden {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 18px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.show-panel-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    z-index: 10;
    transition: all 0.2s;
    display: none;
}

.show-panel-btn.visible {
    display: block;
}


.show-panel-btn:hover {
    background: #f8f8f8;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .info-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        max-height: 60vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
        padding: 16px;
    }


    .info-panel.hidden {
        transform: translateY(100%);
    }

    .show-panel-btn {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }


    .panel-header h2 {
        font-size: 16px;
    }

    .client-filter {
        padding: 8px;
        margin-bottom: 12px;
    }

    .track-item {
        padding: 10px;
        margin-bottom: 6px;
    }
}

.info-panel h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
}

.client-filter {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
}

.client-filter h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.client-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.client-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #2196F3;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
}

.admin-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    margin-top: 8px;
}

.admin-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.client-tag:hover {
    background: #1976D2;
}

.client-tag .remove {
    font-weight: bold;
    margin-left: 4px;
}

.add-client-form {
    display: flex;
    gap: 6px;
}

.add-client-form input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.add-client-form button {
    padding: 6px 12px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.add-client-form button:hover {
    background: #1976D2;
}

.track-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f8f8;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.track-item:hover {
    background: #e8e8e8;
}

.track-item.active {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.track-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.track-info {
    font-size: 12px;
    color: #666;
}

.track-distance {
    font-size: 14px;
    color: #2196F3;
    margin-top: 4px;
}

.no-tracks {
    text-align: center;
    color: #999;
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.version-display {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.35);
    padding: 4px 8px;
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
    font-family: monospace;
}

@media (max-width: 768px) {
    .version-display {
        font-size: 10px;
        padding: 3px 6px;
    }
}
.maplibregl-ctrl-attrib.maplibregl-compact {
    background-color: rgb(255,255,255,0.6);
    color: #333;
    font-size: 10px;
}
.maplibregl-ctrl-attrib-button {
    opacity: 0.5;
}
details.maplibregl-ctrl-attrib {
    background-color: rgb(255,255,255,0.6);
    color: #333;
    font-size: 10px;
}
