/**
 * ElevationChart.css - Styles for standalone elevation profile component
 *
 * This stylesheet is self-contained and can be used with ElevationChart.js
 * independently of the map viewer.
 */

/* ============================================
   STANDALONE MODE (always visible)
   ============================================ */

.elevation-chart-standalone {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.elevation-chart-canvas {
    display: block;
    width: 100%;
}

/* ============================================
   DRAWER MODE (collapsible)
   ============================================ */

.elevation-chart-drawer {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.elevation-chart-drawer.collapsed {
    width: auto;
}

.elevation-chart-drawer:not(.collapsed) {
    width: 100%;
}

/* Toggle button */
.elevation-chart-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    user-select: none;
    background: linear-gradient(to bottom, #fafafa, #f0f0f0);
}

.elevation-chart-drawer:not(.collapsed) .elevation-chart-toggle {
    justify-content: center;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    margin-bottom: 4px;
}

.elevation-chart-toggle:hover {
    background: linear-gradient(to bottom, #fff, #f5f5f5);
}

.elevation-chart-icon {
    color: #666;
    flex-shrink: 0;
}

.elevation-chart-label {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.elevation-chart-chevron {
    color: #666;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.elevation-chart-drawer:not(.collapsed) .elevation-chart-chevron {
    transform: rotate(180deg);
}

/* Content area */
.elevation-chart-content {
    display: none;
    padding: 0 0 4px 0;
    position: relative;
}

.elevation-chart-drawer:not(.collapsed) .elevation-chart-content {
    display: block;
}

/* ============================================
   HOVER TOOLTIP
   ============================================ */

.elevation-chart-hover {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    z-index: 10;
}

.elevation-chart-hover.visible {
    opacity: 1;
}

/* ============================================
   NO DATA MESSAGE
   ============================================ */

.elevation-chart-no-data {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 500px) {
    .elevation-chart-standalone,
    .elevation-chart-drawer {
        border-radius: 4px;
    }

    .elevation-chart-toggle {
        padding: 6px 10px;
    }

    .elevation-chart-label {
        font-size: 11px;
    }
}
