/* ============================================
   GotOne Brand Styles
   Primary: #0183fe  (bright blue)
   Dark:    #0a1628  (navy, matches logo bg)
   ============================================ */

/* --- Global --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: #0a1628;
}

/* --- Header bar --- */
.gotone-header {
    background: #0a1628;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.gotone-header img {
    height: 56px;
    width: auto;
    object-fit: contain;
}
.gotone-header h1 {
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}
.gotone-header .subtitle {
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0;
}

/* --- Sidebar: dark navy --- */
.gotone-sidebar {
    background-color: #0a1628 !important;
    color: #e2e8f0;
}
.gotone-sidebar hr {
    border-color: #1e293b;
    opacity: 0.5;
}
.gotone-sidebar .text-success {
    color: #4ade80 !important;
}
.gotone-sidebar .text-muted {
    color: #64748b !important;
}
.gotone-sidebar .form-check-label,
.gotone-sidebar label {
    color: #cbd5e1 !important;
    font-size: 0.8rem;
}

/* --- Buttons: white pill on dark sidebar --- */
.gotone-sidebar .btn-primary,
.gotone-sidebar .btn-primary:hover,
.gotone-sidebar .btn-primary:focus,
.gotone-sidebar .btn-primary:active {
    background-color: white !important;
    border-color: white !important;
    color: #0a1628 !important;
    border-radius: 100px !important;
    font-weight: 600;
}
.gotone-sidebar .btn-primary:hover {
    background-color: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
}

/* --- Fetch button: brand blue CTA --- */
.gotone-sidebar .fetch-btn-cta,
.gotone-sidebar .fetch-btn-cta:hover,
.gotone-sidebar .fetch-btn-cta:focus,
.gotone-sidebar .fetch-btn-cta:active {
    background-color: #0183fe !important;
    border-color: #0183fe !important;
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem;
}
.gotone-sidebar .fetch-btn-cta:hover {
    background-color: #0070e0 !important;
    border-color: #0070e0 !important;
}
.gotone-sidebar .btn-outline-secondary,
.gotone-sidebar .btn-outline-secondary:hover {
    border-radius: 100px !important;
    color: #cbd5e1 !important;
    border-color: #475569 !important;
}
.gotone-sidebar .btn-outline-secondary:hover {
    background-color: #1e293b !important;
}

/* --- Playback buttons: consistent sizing --- */
.gotone-sidebar .playback-btn {
    width: 36px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
.gotone-sidebar .playback-btn-main {
    width: 56px;
    font-size: 0.8rem;
}

/* --- Sidebar date picker on dark bg --- */
.gotone-sidebar .dash-datepicker-input {
    color: #0a1628 !important;
    background: white !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}
.gotone-sidebar .dash-datepicker {
    background: white !important;
    border-radius: 8px !important;
}
/* Calendar popup — force dark text throughout */
.gotone-sidebar .dash-datepicker-calendar,
.gotone-sidebar .dash-datepicker-calendar * {
    color: #0a1628 !important;
}
.gotone-sidebar .dash-datepicker-calendar {
    background: white !important;
}
.gotone-sidebar .dash-datepicker-controls {
    color: #0a1628 !important;
}
.gotone-sidebar .dash-datepicker-month-sizer {
    color: #0a1628 !important;
}
.gotone-sidebar .dash-datepicker-calendar-date-outside {
    color: #94a3b8 !important;
}

/* --- Calendar month/year dropdown on dark sidebar --- */
.gotone-sidebar .dash-dropdown-value,
.gotone-sidebar .dash-dropdown-value span {
    color: #0a1628 !important;
    font-weight: 600 !important;
}
.gotone-sidebar .dash-options-list-option,
.gotone-sidebar .dash-options-list-option-text,
.gotone-sidebar .dash-dropdown-option {
    color: #0a1628 !important;
    background-color: white !important;
}
.gotone-sidebar .dash-dropdown-content {
    background-color: white !important;
}

/* --- POI checklist on dark sidebar --- */
.gotone-sidebar .poi-checklist .form-check {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

/* --- Sidebar slider on dark bg --- */
.gotone-sidebar .rc-slider-rail {
    background-color: #334155 !important;
}
.gotone-sidebar .rc-slider-mark-text {
    color: #94a3b8 !important;
    font-size: 0.65rem !important;
}
.gotone-sidebar .rc-slider-dot {
    display: none !important;
}
/* Slider tooltip: dark text on white bg (inherits sidebar light text otherwise) */
.gotone-sidebar .dash-slider-tooltip {
    color: #0a1628 !important;
    font-weight: 600 !important;
}

/* --- Spinner --- */
.spinner-border.text-primary {
    color: #0183fe !important;
}

/* --- Date picker accent --- */
.SingleDatePickerInput {
    border-radius: 8px !important;
}
.CalendarDay__selected {
    background: #0183fe !important;
    border-color: #0183fe !important;
}

/* --- Slider track --- */
.rc-slider-track {
    background-color: #0183fe !important;
}
.rc-slider-handle {
    border-color: #0183fe !important;
}
.rc-slider-handle:active,
.rc-slider-handle:focus {
    border-color: #0183fe !important;
    box-shadow: 0 0 0 3px rgba(1, 131, 254, 0.2) !important;
}
.rc-slider-dot-active {
    border-color: #0183fe !important;
}

/* --- Measure tool: use brand blue instead of indigo --- */
.measure-tooltip .leaflet-tooltip {
    background: rgba(1, 131, 254, 0.9) !important;
}
.measure-tooltip .leaflet-tooltip::before {
    border-top-color: rgba(1, 131, 254, 0.9) !important;
}

/* ============================================
   Mobile Responsive
   Triggers on narrow screens (< 768px) OR
   short screens (< 500px tall, i.e. landscape phones)
   ============================================ */
@media (max-width: 767.98px), (max-height: 500px) {

    /* --- Header: compact --- */
    .gotone-header {
        padding: 0.5rem 0.75rem;
    }
    .gotone-header img {
        height: 36px;
    }
    .gotone-header h1 {
        font-size: 0.95rem;
    }
    .gotone-header .subtitle {
        display: none;
    }

    /* --- Sidebar: CSS drawer (slides in from left) --- */
    .gotone-sidebar {
        position: fixed !important;
        top: 0;
        left: -300px;
        width: 280px !important;
        height: 100vh !important;
        max-width: 85vw !important;
        z-index: 2000;
        transition: left 0.3s ease;
        flex: none !important;
        box-shadow: none;
        padding-top: 2.5rem !important;
    }
    .gotone-sidebar.drawer-open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    /* Backdrop overlay when drawer is open */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1999;
    }

    /* --- Map: full viewport --- */
    .map-wrapper {
        height: calc(100vh - 52px) !important;
    }

    /* --- Map column: full width on mobile --- */
    .map-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* --- Hamburger button (top-right, clear of Leaflet zoom controls) --- */
    .hamburger-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1100;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        display: block;
        color: #0a1628;
    }

    /* --- Touch targets: 44px minimum (Apple HIG) --- */
    .playback-btn {
        width: 44px !important;
        height: 44px !important;
    }
    .playback-btn-main {
        width: 64px !important;
    }
    .rc-slider-handle {
        width: 24px !important;
        height: 24px !important;
        margin-top: -10px !important;
    }
}

/* Hide mobile-only elements on desktop (wide AND tall screens) */
@media (min-width: 768px) and (min-height: 500px) {
    .hamburger-btn { display: none !important; }
    .sidebar-close-btn { display: none !important; }
    .sidebar-backdrop { display: none !important; }
}
