/* 
   Map Specific CSS
*/

body {
    /* Prevent scrolling on map page */
    overscroll-behavior-y: none;
}

.map-container {
    position: relative;
    width: 100vw;
    height: calc(100vh - 70px); /* minus navbar */
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Overlays */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-search {
    flex-grow: 1;
    display: flex;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
}

.map-search input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}



/* Bottom Sheet */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    z-index: 20;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.bottom-sheet.collapsed {
    transform: translateY(calc(100% - 80px)); /* Shows just the top handle/title area */
}

.bottom-sheet.expanded {
    transform: translateY(0);
}

.drag-handle {
    width: 40px;
    height: 5px;
    background-color: var(--gray-soft);
    border-radius: var(--radius-full);
    margin: 12px auto;
    cursor: grab;
}

.sheet-content {
    padding: 0 1.5rem 2rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.sheet-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Recommendation Card */
.recommendation-card {
    border: 1px solid var(--gray-soft);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #FAFAFA;
}

.recommendation-card.highlight {
    border-color: var(--primary-blue);
    background-color: #F0F5FF;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.rec-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.prob-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
}

.prob-high { background-color: #DCFCE7; color: var(--success-green); }
.prob-medium { background-color: #FEF9C3; color: #CA8A04; }
.prob-low { background-color: #FEE2E2; color: var(--danger-red); }

.rec-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.rec-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rec-explanation {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-main);
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-soft);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}
.btn-group .btn {
    flex: 1;
}

/* Responsive Map Layout */
@media (min-width: 768px) {
    .map-container {
        display: flex;
        flex-direction: row-reverse;
    }

    #map {
        position: relative;
        flex-grow: 1;
        height: 100%;
        width: calc(100% - 400px);
    }

    .map-controls {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 360px;
        z-index: 1000;
    }

    .bottom-sheet {
        position: relative;
        width: 400px;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transform: none !important;
        transition: none;
        display: flex;
        flex-direction: column;
    }

    .drag-handle {
        display: none; /* No drag handle on desktop */
    }
    
    .sheet-content {
        padding-top: 80px; /* Space for the search bar */
        height: 100%;
        overflow-y: auto;
    }
}
