/* Extracted styles from index.html */
#map { height: 100vh; width: 100%; z-index: 1; }

.distance-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #000;
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
    text-shadow: 
        2px 2px 0 #fff, -2px -2px 0 #fff,
        2px -2px 0 #fff, -2px 2px 0 #fff,
        0px 2px 0 #fff, 0px -2px 0 #fff,
        2px 0px 0 #fff, -2px 0px 0 #fff,
        2px 2px 4px rgba(0,0,0,0.3);
}

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

input[type=range] {
    height: 6px;
    -webkit-appearance: none;
    background: #e5e7eb;
    border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #4b5563;
    border-radius: 50%;
    cursor: pointer;
}

/* パネルのアニメーション用 */
#settings-panel {
     transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
     /* Place the panel so its top aligns near the toggle; inner spacer controls
         the visible gap. This reduces the large empty space between toggle and panel. */
     left: 1rem !important;
     top: 1rem !important;
     /* Ensure the outer wrapper does not produce the scrollbar; move scrolling
         to the inner white panel so the scrollbar appears inside the rounded box */
     overflow: visible !important;
}

/* Target the inner white panel (rounded container) and make it scrollable. We
   use an attribute-match selector to avoid changing HTML. */
#settings-panel > div[class*="rounded-2xl"] {
    box-sizing: border-box;
    /* Fit inside viewport considering the panel top offset and a small margin */
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding-right: 0.75rem; /* space for the scrollbar so content doesn't touch edge */
}
#settings-panel.hidden-panel {
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
}

/* Hide potential Leaflet controls that appear behind the custom toggle button
   (e.g. default zoom buttons or other top-left controls). This prevents
   a duplicate circular control showing under the toggle.) */
.leaflet-top.leaflet-left > * {
    display: none !important;
}

/* Ensure the toggle button is always on top and receives pointer events */
#toggle-ui-btn {
    z-index: 2000 !important;
    pointer-events: auto;
}
