/* Mobile Map Styles - Google Maps/Waze Style */

/* Desktop only visibility */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Floating controls (hidden on desktop) */
.floating-controls {
    display: none;
}

/* Desktop map adjustments */
#map {
    height: 700px; /* Increased from 600px */
}

/* Desktop-specific map page layout */
@media (min-width: 769px) {
    .map-page .main-content {
        min-height: auto;
        padding: 1rem 0;
    }

    .map-page .footer {
        margin-top: -1rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Show/Hide elements */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Full screen map for mobile */
    body.map-page {
        margin: 0;
        padding: 0;
        overflow: hidden;
        height: 100vh;
    }

    .map-page .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        background: var(--surface-elevated);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px var(--shadow-elevation);
    }

    .map-page .main-content {
        padding: 0;
        margin: 0;
        min-height: 100vh;
    }

    .map-page .map-main {
        height: 100vh;
        width: 100vw;
    }

    .map-page .fullscreen-map {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
    }

    .map-page #map {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100vh !important;
    }

    /* Floating Action Buttons */
    .floating-controls {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        position: fixed;
        bottom: 2rem;
        right: 1rem;
        z-index: 1000;
    }

    .floating-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--surface);
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 12px var(--shadow-elevation);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--text-primary);
    }

    .floating-btn:active {
        transform: scale(0.95);
    }

    .floating-btn.primary {
        background: var(--danger-color);
        color: white;
        width: 64px;
        height: 64px;
        border: none;
    }

    .floating-btn svg {
        width: 24px;
        height: 24px;
    }

    /* Bottom Sheet Modals (Google Maps style) */
    .bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        pointer-events: none;
    }

    .bottom-sheet.active {
        transform: translateY(0);
        pointer-events: auto;
    }

    .bottom-sheet::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--overlay-color);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .bottom-sheet.active::before {
        opacity: 1;
        pointer-events: auto;
    }

    .bottom-sheet-content {
        background: var(--surface);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 16px var(--shadow-elevation);
        max-height: 80vh;
        overflow-y: auto;
        position: relative;
        border: 1px solid var(--border-color);
    }

    .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .bottom-sheet-header h3 {
        margin: 0;
        font-size: 1.25rem;
        color: var(--text-primary);
    }

    .close-sheet {
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .close-sheet:hover {
        color: var(--text-primary);
    }

    .bottom-sheet-body {
        padding: 1.5rem;
    }

    .bottom-sheet-body .form-group {
        margin-bottom: 1rem;
    }

    .bottom-sheet-body .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .bottom-sheet-body .form-group select {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background: var(--surface);
        color: var(--text-primary);
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    }

    .bottom-sheet-body .layer-controls {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .bottom-sheet-body .layer-controls label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
        background: var(--surface);
        border-radius: 8px;
        border: 1px solid var(--border-color);
        cursor: pointer;
        font-size: 1rem;
    }

    .bottom-sheet-body .layer-controls input[type="checkbox"] {
        width: 24px;
        height: 24px;
        margin: 0;
    }

    /* Adjust report modal for mobile */
    .map-page .modal.active {
        z-index: 1300;
    }

    .map-page .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 100px);
    }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .floating-controls {
        bottom: 2.5rem;
        right: 1.5rem;
    }

    .floating-btn {
        width: 60px;
        height: 60px;
    }

    .floating-btn.primary {
        width: 68px;
        height: 68px;
    }

    .bottom-sheet-content {
        max-height: 70vh;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .floating-controls {
        bottom: 1.5rem;
        right: 0.75rem;
        gap: 0.5rem;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
    }

    .floating-btn.primary {
        width: 56px;
        height: 56px;
    }

    .bottom-sheet-header {
        padding: 1rem;
    }

    .bottom-sheet-body {
        padding: 1rem;
    }
}
