﻿/* ==========================================================================
   Map "Search Results" side panel (collapsible)
   Load AFTER bootstrap.css, site.css and find-agent.css
   ========================================================================== */
.mrp-host { /* the element that wraps BOTH the map and the panel */
    position: relative;
    overflow: hidden;
}

.mrp {
    --mrp-width: 345px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--mrp-width);
    max-width: calc(100% - 40px); /* always leave room for the toggle tab */
    z-index: 1001; /* above Leaflet/Google map panes */
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0, 0, 0, .08);
    transition: transform .3s ease;
    font-family: "Red Hat Display", "Red Hat Text", system-ui, sans-serif;
}

    .mrp.is-closed {
        transform: translateX(-100%);
    }

.mrp__header {
    padding: 24px 16px 14px;
    flex: 0 0 auto;
}

.mrp__title {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f1f1f;
}

.mrp__count {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.mrp__list {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain; /* scrolling the list won't scroll the page */
    padding: 0 20px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
    /* Cards from find-agent.js: full width, no grid sizing inside the panel */
    .mrp__list > * {
        width: 100%;
        max-width: none;
        margin: 0;
        flex: 0 0 auto;
        box-sizing: border-box;
    }

.mrp, .mrp * {
    box-sizing: border-box;
}

.mrp__empty {
    padding: 24px 0;
    color: #8a8a8a;
    font-size: 14px;
    text-align: center;
}

/* Toggle tab on the panel's right edge (stays visible when the panel is closed) */
.mrp__toggle {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 26px;
    height: 200px;
    padding: 0;
    border: 0;
    border-radius: 0 14px 14px 0;
    background: #fff;
    color: #1f1f1f;
    box-shadow: 4px 0 10px rgba(0, 0, 0, .08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mrp__toggle:hover {
        color: #f7791e;
    }

    .mrp__toggle:focus-visible {
        outline: 2px solid #f7791e;
        outline-offset: 2px;
    }

    .mrp__toggle svg {
        transition: transform .3s ease;
    }

.mrp.is-closed .mrp__toggle svg {
    transform: rotate(180deg);
}
/* "<" becomes ">" */

/* Phones: panel takes most of the width */
@media (max-width: 576px) {
    .mrp {
        --mrp-width: 85%;
    }

    .mrp__title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .mrp__toggle {
        height: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mrp, .mrp__toggle svg {
        transition: none;
    }
}
