/* ============================================================
   SUN CALCULATOR — kursy.dawidmazur.pl
   Layout: header + map + time slider + overlay panels
   Dark theme, Sora font, cyan accent
   ============================================================ */

/* --- Hide Publigo page elements --- */
.contenter > h1,
.contenter > .breadcrumbs {
    display: none !important;
}

/* --- Remove container constraints (only on calculator page) --- */
.contenter,
.contenter_tresci,
#primary,
.site-main,
.content-area,
.entry-content,
article {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* ============================================================
   HEADER BAR
   ============================================================ */
.sc-header {
    background: #13111C;
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
    padding: 14px 20px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.sc-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sc-header-icon {
    width: 28px;
    height: 28px;
    color: #06B6D4;
    flex-shrink: 0;
}

.sc-header-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    font-family: 'Sora', sans-serif;
    -webkit-text-fill-color: #fff;
    background: none;
}

.sc-header-desc {
    font-size: 12px;
    color: #565e78;
    margin: 2px 0 0;
    line-height: 1.5;
    font-family: 'Sora', sans-serif;
}

/* ============================================================
   MAP CONTAINER
   ============================================================ */
.sc-map-container {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: calc(100vh - 64px - 60px - 130px);
    min-height: 320px;
}

#sun-calc-map {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ---- MapLibre GL dark overrides ---- */
#sun-calc-map .maplibregl-ctrl-attrib {
    background: rgba(14, 12, 21, 0.75) !important;
    color: #565e78 !important;
    font-size: 10px !important;
    font-family: 'Sora', sans-serif !important;
}

#sun-calc-map .maplibregl-ctrl-attrib a {
    color: #565e78 !important;
}

#sun-calc-map .maplibregl-ctrl-attrib-button {
    background-color: rgba(14, 12, 21, 0.75) !important;
}

/* ---- MapLibre navigation control dark theme ---- */
#sun-calc-map .maplibregl-ctrl-group {
    background: rgba(19, 17, 28, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden;
}

#sun-calc-map .maplibregl-ctrl-group button {
    width: 34px !important;
    height: 34px !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #BCC3D7 !important;
    cursor: pointer;
}

#sun-calc-map .maplibregl-ctrl-group button:last-child {
    border-bottom: none !important;
}

#sun-calc-map .maplibregl-ctrl-group button:hover {
    background-color: rgba(6, 182, 212, 0.1) !important;
}

/* Invert nav control icons for dark theme */
#sun-calc-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
    filter: invert(0.75) brightness(1.2);
}

/* ---- Layer switch control ---- */
.sc-layer-switch {
    /* wrapper — positioned by MapLibre */
}

.sc-layer-switch-inner {
    display: flex;
    gap: 2px;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.sc-layer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
    color: #8a90a5;
}

.sc-layer-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #BCC3D7;
}

.sc-layer-btn--active {
    background: rgba(6, 182, 212, 0.15);
    color: #06B6D4;
}

.sc-layer-btn--active:hover {
    background: rgba(6, 182, 212, 0.22);
    color: #22D3EE;
}

/* ---- 2D / 3D toggle button ---- */
.sc-3d-toggle {
    /* wrapper — positioned by MapLibre */
}

.sc-3d-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 8px;
    color: #8a90a5;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.sc-3d-btn:hover {
    background: rgba(19, 17, 28, 0.96);
    border-color: rgba(6, 182, 212, 0.3);
    color: #BCC3D7;
}

.sc-3d-btn.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06B6D4;
    color: #06B6D4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sc-3d-btn.active:hover {
    background: rgba(6, 182, 212, 0.22);
    color: #22D3EE;
}

/* ---- ShadeMap shadow toggle button ---- */
.sc-shadow-toggle {
    /* no extra container styling needed */
}

.sc-shadow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 8px;
    color: #8a90a5;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sc-shadow-btn:hover {
    background: rgba(19, 17, 28, 0.96);
    border-color: rgba(6, 182, 212, 0.3);
    color: #BCC3D7;
}

.sc-shadow-btn.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06B6D4;
    color: #06B6D4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sc-shadow-btn.active:hover {
    background: rgba(6, 182, 212, 0.22);
    color: #22D3EE;
}

/* ---- Playback controls (timelapse) ---- */
.sc-playback {
    display: flex;
    gap: 2px;
    align-items: center;
}

.sc-btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 6px;
    color: #06B6D4;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    line-height: 1;
    transition: all 0.15s ease;
}

.sc-btn-play:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.35);
}

.sc-btn-play.active {
    background: rgba(6, 182, 212, 0.25);
    border-color: #06B6D4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
    color: #22D3EE;
}

.sc-btn-speed {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #565e78;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    line-height: 1.3;
    transition: all 0.15s ease;
}

.sc-btn-speed:hover {
    color: #BCC3D7;
    border-color: rgba(255, 255, 255, 0.12);
}

/* ---- Share button ---- */
.sc-btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #565e78;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.15s ease;
}

.sc-btn-share:hover {
    color: #06B6D4;
    border-color: rgba(6, 182, 212, 0.2);
    background: rgba(6, 182, 212, 0.06);
}

/* ---- Toast notification ---- */
.sc-toast {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(6, 182, 212, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
}

.sc-toast--visible {
    opacity: 1;
}

/* ============================================================
   SEARCH BAR OVERLAY (on map)
   ============================================================ */
.sc-search {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 440px;
}

.sc-search-inner {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 10px;
    padding: 3px 3px 3px 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.sc-search-icon {
    width: 16px;
    height: 16px;
    color: #565e78;
    flex-shrink: 0;
}

.sc-search-inner input {
    flex: 1;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 13px;
    font-family: 'Sora', sans-serif !important;
    padding: 9px 10px !important;
    outline: none !important;
    box-shadow: none !important;
}

.sc-search-inner input::placeholder {
    color: #565e78 !important;
}

#sc-btn-geo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(6, 182, 212, 0.1);
    color: #06B6D4;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

#sc-btn-geo:hover {
    background: rgba(6, 182, 212, 0.22);
}

#sc-btn-geo svg {
    width: 16px;
    height: 16px;
}

#sc-btn-geo.sc-loading {
    animation: sc-pulse 1s ease-in-out infinite;
}

@keyframes sc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- Search results dropdown ---- */
.sc-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(19, 17, 28, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.sc-search-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #BCC3D7;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    font-family: 'Sora', sans-serif;
}

.sc-search-item:last-child {
    border-bottom: none;
}

.sc-search-item:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #fff;
}

.sc-search-loading,
.sc-search-empty {
    padding: 12px 16px;
    font-size: 12px;
    color: #565e78;
    text-align: center;
    font-family: 'Sora', sans-serif;
}

/* ---- Search history header ---- */
.sc-search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #565e78;
    font-family: 'Sora', sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-search-clear {
    background: none;
    border: none;
    color: #565e78;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Sora', sans-serif;
    transition: all 0.15s;
}

.sc-search-clear:hover {
    color: #06B6D4;
    background: rgba(6, 182, 212, 0.08);
}

/* ---- History item with icon ---- */
.sc-search-item--history {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-history-icon {
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.5;
}

.sc-history-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Result type icon ---- */
.sc-search-item--result {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-result-icon {
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.6;
}

.sc-result-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   INFO PANEL OVERLAY (on map, bottom-right)
   ============================================================ */
.sc-panel {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 1000;
    width: 280px;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.12);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    font-family: 'Sora', sans-serif;
}

.sc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-panel-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.sc-location-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.sc-location-coords {
    font-size: 10px;
    color: #565e78;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

.sc-tz-label {
    font-size: 10px;
    color: #06B6D4;
    font-weight: 500;
    margin-left: 4px;
    opacity: 0.8;
}

/* ============================================================
   MOBILE PILL (phase badge on map)
   Hidden on desktop, shown on mobile via media query
   ============================================================ */
.sc-pill {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 1000;
    background: rgba(19, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    display: none; /* hidden on desktop */
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
    font-family: 'Sora', sans-serif;
}

.sc-pill:active {
    transform: scale(0.96);
}

.sc-pill-icon { font-size: 14px; line-height: 1; }
.sc-pill-text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.sc-pill-alt {
    font-size: 11px;
    color: #565e78;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   BOTTOM SHEET ELEMENTS (handle + close)
   ============================================================ */
.sc-sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 8px auto 4px;
    display: none; /* shown on mobile */
}

.sc-panel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #565e78;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    z-index: 2;
    display: none; /* shown on mobile */
}

.sc-panel-close:hover { color: #BCC3D7; }

/* Date text (short format for mobile, hidden on desktop) */
.sc-date-text {
    display: none;
    font-size: 12px;
    font-weight: 600;
    color: #BCC3D7;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sc-panel-toggle {
    background: none;
    border: none;
    color: #565e78;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.sc-panel-toggle:hover {
    color: #BCC3D7;
}

.sc-panel-toggle svg {
    transition: transform 0.2s ease;
}

.sc-panel-body {
    padding: 10px 14px 14px;
}

/* ---- Compact view: 2x2 grid ---- */
.sc-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sc-compact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.sc-compact-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.sc-compact-icon--sunrise { color: #ff6b35; }
.sc-compact-icon--sunset { color: #ffd166; }
.sc-compact-icon--golden { color: #f0b429; }
.sc-compact-icon--blue { color: #3b7dd8; }

.sc-compact-label {
    font-size: 10px;
    color: #565e78;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.sc-compact-value {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.sc-compact-value--small {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.sc-compact-phase {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    color: #BCC3D7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Expanded view: full times list ---- */
.sc-expanded {
    padding-top: 4px;
}

.sc-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #BCC3D7;
}

.sc-badge {
    display: inline-block;
    min-width: 80px;
    text-align: center;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border-radius: 4px;
    color: #fff;
    font-family: 'Sora', monospace;
    flex-shrink: 0;
    white-space: nowrap;
}

.sc-time-label {
    font-size: 11px;
    color: #8a90a5;
}

.sc-badge--blue    { background: #3b7dd8; }
.sc-badge--civil   { background: #5b8def; color: #fff; }
.sc-badge--sunrise  { background: #ff6b35; }
.sc-badge--sunset   { background: #ff6b35; }
.sc-badge--golden  { background: #f0b429; color: #1a1a2e; }
.sc-badge--noon    { background: #ffd166; color: #1a1a2e; }

.sc-extra {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-extra-row {
    font-size: 11px;
    color: #565e78;
    padding: 2px 0;
}

.sc-extra-row strong {
    color: #BCC3D7;
}

/* ============================================================
   TIME SLIDER BAR (below map)
   ============================================================ */
.sc-slider-bar {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #13111C;
    border-top: 1px solid rgba(6, 182, 212, 0.1);
    padding: 12px 20px 14px;
    font-family: 'Sora', sans-serif;
}

.sc-slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 10px;
    gap: 12px;
}

.sc-slider-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-slider-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date input */
.sc-date-input {
    background: rgba(6, 182, 212, 0.06) !important;
    border: 1px solid rgba(6, 182, 212, 0.18) !important;
    color: #BCC3D7 !important;
    font-size: 12px !important;
    font-family: 'Sora', sans-serif !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    cursor: pointer;
}

.sc-date-input:focus {
    border-color: #06B6D4 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2) !important;
}

/* Day navigation buttons */
.sc-btn-day {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #565e78;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.sc-btn-day:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: #BCC3D7;
}

/* Time display */
.sc-time-display {
    font-size: 14px;
    color: #BCC3D7;
    font-variant-numeric: tabular-nums;
}

.sc-time-display strong {
    font-weight: 700;
    color: #fff;
    font-size: 16px;
}

/* "Teraz" button */
.sc-btn-now {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #06B6D4;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.sc-btn-now:hover {
    background: rgba(6, 182, 212, 0.18);
}

.sc-btn-now--active {
    background: #06B6D4;
    color: #0E0C15;
    border-color: #06B6D4;
}

.sc-btn-now--active:hover {
    background: #22D3EE;
    border-color: #22D3EE;
}

/* ---- Range slider ---- */
.sc-slider-track {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.sc-time-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Webkit thumb */
.sc-time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #06B6D4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.sc-time-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.4);
}

.sc-time-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25);
}

/* Firefox thumb */
.sc-time-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #06B6D4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.sc-time-slider::-moz-range-track {
    height: 14px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Slider labels ---- */
.sc-slider-labels {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
    margin: 6px auto 0;
    font-size: 10px;
    color: #565e78;
    font-variant-numeric: tabular-nums;
    padding: 0 2px;
}

/* ============================================================
   RESPONSIVE — MOBILE (≤680px)
   ============================================================ */
@media (max-width: 680px) {
    /* --- HIDE HEADER on mobile --- */
    .sc-header {
        display: none !important;
    }

    /* --- TRANSPARENT NAV: map shows through --- */
    .dm-nav {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom-color: transparent !important;
        box-shadow: none !important;
    }

    /* --- MAP: extend behind transparent nav --- */
    .sc-map-container {
        height: calc(100vh - 92px);
        height: calc(100dvh - 92px);
        margin-top: -56px !important;
        min-height: 300px;
    }

    /* --- SEARCH: pushed below transparent nav --- */
    .sc-search {
        top: 66px;
        width: 94%;
    }

    /* --- PILL: visible on mobile --- */
    .sc-pill {
        display: flex;
    }

    /* --- PANEL: bottom sheet behavior --- */
    .sc-panel {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.2s ease;
        opacity: 0;
        pointer-events: none;
    }

    .sc-panel--sheet {
        max-height: 50vh;
        opacity: 1;
        pointer-events: auto;
        overflow-y: auto;
    }

    .sc-panel--sheet-expanded {
        max-height: 72vh;
    }

    /* Show sheet handle + close on mobile when sheet open */
    .sc-panel--sheet .sc-sheet-handle {
        display: block;
    }

    .sc-panel--sheet .sc-panel-close {
        display: block;
    }

    /* Hide desktop toggle chevron on mobile */
    .sc-panel-toggle {
        display: none !important;
    }

    .sc-panel-header {
        padding: 8px 14px;
        padding-right: 36px; /* space for close button */
    }

    .sc-panel-body {
        padding: 6px 14px 14px;
    }

    /* --- SLIDER BAR: compact (~90px) --- */
    .sc-slider-bar {
        padding: 6px 12px 8px;
    }

    .sc-slider-controls {
        flex-wrap: nowrap;
        gap: 6px;
        margin-bottom: 6px;
    }

    .sc-slider-left {
        gap: 4px;
    }

    /* Hide native date input on mobile, show short text */
    .sc-date-input {
        display: none !important;
    }
    .sc-date-text {
        display: inline;
    }

    .sc-btn-day {
        width: 26px;
        height: 26px;
        font-size: 9px;
    }

    .sc-slider-right {
        gap: 6px;
    }

    .sc-time-display {
        font-size: 13px;
    }

    .sc-time-display strong {
        font-size: 14px;
    }

    /* Hide TZ label in slider on mobile (save space) */
    .sc-slider-right .sc-tz-label {
        display: none;
    }

    .sc-btn-now {
        padding: 4px 8px;
        font-size: 10px;
    }

    /* Playback + share compact on mobile */
    .sc-btn-play {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .sc-btn-speed {
        padding: 2px 5px;
        font-size: 9px;
    }

    .sc-btn-share {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    /* Bigger touch-friendly slider thumb */
    .sc-time-slider {
        height: 16px;
        border-radius: 8px;
    }

    .sc-time-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    .sc-time-slider::-moz-range-thumb {
        width: 26px;
        height: 26px;
    }

    .sc-slider-labels {
        margin-top: 4px;
        font-size: 9px;
    }

    /* Show only 5 labels: 00, 06, 12, 18, 24 */
    .sc-slider-labels span:nth-child(2),
    .sc-slider-labels span:nth-child(4),
    .sc-slider-labels span:nth-child(6) {
        display: none;
    }

    /* --- MapLibre CONTROLS: push top-right below nav + search --- */
    #sun-calc-map .maplibregl-ctrl-top-right {
        top: 120px !important;
        right: 6px !important;
    }

    /* --- Hide zoom/compass on mobile (pinch + 3D toggle suffice) --- */
    #sun-calc-map .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group {
        display: none !important;
    }

    /* --- Push attribution above pill area --- */
    #sun-calc-map .maplibregl-ctrl-bottom-right {
        bottom: 48px !important;
    }

    /* --- Smaller toggle buttons on mobile --- */
    .sc-shadow-btn {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .sc-3d-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    /* --- Layer switch: smaller buttons on mobile --- */
    #sun-calc-map .maplibregl-ctrl-bottom-left {
        bottom: 8px !important;
        left: 6px !important;
    }

    .sc-layer-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    /* --- COMPACT GRID still 2x2 on tablet-sized mobile --- */
    .sc-compact-grid {
        gap: 6px;
    }
}

/* ============================================================
   RESPONSIVE — SMALL PHONE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .sc-compact-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .sc-pill {
        bottom: 10px;
        right: 10px;
        padding: 5px 12px;
    }

    .sc-pill-text { font-size: 11px; }
    .sc-pill-alt { font-size: 10px; }

    .sc-panel-header {
        padding: 6px 12px;
        padding-right: 32px;
    }

    .sc-panel-body {
        padding: 4px 12px 12px;
    }

    /* Even smaller controls on small phones */
    .sc-shadow-btn,
    .sc-3d-btn {
        width: 30px;
        height: 30px;
    }

    .sc-3d-btn { font-size: 10px; }
    .sc-shadow-btn { font-size: 14px; }

    #sun-calc-map .maplibregl-ctrl-bottom-right {
        bottom: 42px !important;
    }

    .sc-layer-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    /* Hide speed button on small phones (default 1× speed) */
    .sc-btn-speed {
        display: none;
    }

    .sc-btn-play {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }

    .sc-btn-share {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
}

/* ============================================================
   RESPONSIVE — ULTRA-NARROW (≤400px)
   ============================================================ */
@media (max-width: 400px) {
    .sc-slider-controls {
        font-size: 11px;
    }

    .sc-btn-day {
        width: 24px;
        height: 24px;
    }

    .sc-btn-now {
        padding: 3px 6px;
        font-size: 9px;
    }

    .sc-date-text {
        font-size: 11px;
    }

    .sc-time-display {
        font-size: 12px;
    }

    .sc-time-display strong {
        font-size: 13px;
    }

    /* Ultra-narrow: even tighter controls */
    .sc-shadow-btn,
    .sc-3d-btn {
        width: 28px;
        height: 28px;
    }

    .sc-3d-btn { font-size: 9px; }
    .sc-shadow-btn { font-size: 13px; }

    .sc-layer-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .sc-search {
        width: 88%;
    }
}
