/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Matching SaaS Admin */
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --secondary: #7C3AED;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;

    --bg-page: #F5F7FB;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;

    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 14px;
    overflow: hidden;
    /* Full screen map */
}

/* Map specific */
.fullscreen-map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Controls Overlay - Card Style */
.controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 24px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.controls.minimized {
    transform: translateY(calc(100% - 60px));
}

/* Typography & Elements */
h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* Floating Brand Overlay */
.floating-brand {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    /* Above Leaflet (usually 400-800) */
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    min-width: 200px;
    /* Ensure consistent width */
    max-width: 300px;
    /* Allow expansion */
    transition: all 0.2s ease;
}

.floating-brand img {
    height: 32px;
    /* Fixed height for consistency */
    width: auto;
    display: block;
    margin-bottom: 4px;
    max-width: 100%;
}

.floating-brand span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.mobile-menu-btn {
    display: inline-flex;
    /* Show on ALL screens */
    margin-top: 0;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
}

.menu-item-btn {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    /* Align icon left */
    font-weight: 600;
    padding: 8px 12px;
    background: transparent;
    color: var(--text-dark);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 13px;
}

.menu-item-btn:hover {
    background: #F8FAFC;
    color: var(--primary);
}

@media (max-width: 768px) {
    .floating-brand {
        max-width: 85vw;
        /* Allow wider on mobile if needed */
    }
}


/* Adjust zoom control to not overlap if needed, though they are usually bottom right or top left. 
   Leaflet default top-left might overlap. Let's move zoom to bottom-right or top-right?
   For now, just ensure branding is high z-index.
*/
.leaflet-top.leaflet-left {
    top: 90px;
    /* Push down Zoom controls if they are on left */
}

/* Form Elements */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 13px;
}

select,
input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #FFF;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s;
    margin-bottom: 16px;
    font-family: inherit;
    -webkit-appearance: none;
    /* Mobile fix */
}

select:focus,
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    margin-bottom: 12px;
    font-family: inherit;
}

button:last-child {
    margin-bottom: 0;
}

#startBtn {
    background-color: var(--primary);
    color: white;
}

#startBtn:hover {
    background-color: var(--primary-hover);
}

button[onclick="shareLocation()"] {
    background-color: var(--text-dark);
    border: 1px solid var(--text-dark);
    color: white;
}

button[onclick="shareLocation()"]:hover {
    background-color: #1e293b;
    /* Slightly lighter for hover */
    border-color: #1e293b;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lang-btn {
    flex: 1;
    padding: 8px;
    background: #fff;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    border-right: 1px solid var(--border);
    font-size: 13px;
    transition: all 0.2s;
}

.lang-btn:last-child {
    border-right: none;
}

.lang-btn.active {
    background: #EFF6FF;
    color: var(--primary);
    font-weight: 600;
}

.lang-btn:hover:not(.active) {
    background-color: #F8FAFC;
    color: var(--text-dark);
}

/* Leaflet Overrides */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 240px !important;
    /* Move above controls */
}

.leaflet-bar a {
    background-color: var(--bg-card) !important;
    color: var(--text-dark) !important;
    border-bottom: 1px solid var(--border) !important;
}

.leaflet-bar a:hover {
    background-color: #F1F5F9 !important;
}

/* Offline Banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 12px;
    z-index: 2000;
    display: none;
    font-size: 13px;
    font-weight: 500;
}

/* Service Result Buttons */
.service-result-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0;
}

.service-result-btn:hover {
    background: #F8FAFC;
    border-color: var(--primary);
    transform: translateX(2px);
}

/* Custom Scrollbar for Menu */
#brandMenuContent {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

#brandMenuContent::-webkit-scrollbar {
    width: 6px;
}

#brandMenuContent::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 3px;
}

#brandMenuContent::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

#brandMenuContent::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Toast Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}