/**
 * Map Locator - Frontend styles
 * Design: dark sidebar, red accent, list by state, map right
 */

.ml-wrapper {
    display: flex;
    flex-wrap: wrap;
    min-height: 500px;
}

/* Sidebar */
.ml-sidebar {
    flex: 0 0 25%;
    max-width: 100%;
    background: #fff;
    color: #1D1D1D;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.ml-search-form #ml-search-input {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
.ml-search-form button#ml-search-btn {
    padding: 0 20px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

@media (max-width: 768px) {
    .ml-wrapper {
        flex-direction: column;
    }
    .ml-sidebar {
        flex: 1 1 auto;
        max-height: 45vh;
    }
    .ml-map-container {
        min-height: 55vh;
    }
}

/* Search bar - red header */
.ml-search-bar {
    background: #c53030;
    color: #fff;
    padding: 16px 20px;
}

.ml-sidebar  .ml-search-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
}

.ml-search-form {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.ml-search-input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 15px;
    color: #1a1a1a;
}

.ml-search-input::placeholder {
    color: #71717a;
}

.ml-search-input:focus {
    outline: none;
}

.ml-search-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ml-search-btn:hover {
    background: #333;
}

.ml-search-btn svg {
    flex-shrink: 0;
}

/* Office count */
.ml-office-count {
    margin: 0;
    padding: 12px 20px;
    font-size: 0.95rem;
    background: #EBEBEB;
}

#ml-office-count {
    font-weight: 700;
    color: #1D1D1D;
}

/* Office list */
.ml-office-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.ml-office-list h3 {
    color: #fff;
    background: #1D1D1D;
    padding: 15px 35px;
    margin: 0;
}

.ml-state-group {
    margin-bottom: 16px;
}

.ml-state-name {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

.ml-office-item {
    padding: 12px 35px;
    border-bottom: 1px solid #2d2d2d;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ml-office-item a {
    font-size: 100%;
    color: #106CB0;
    text-decoration: none;
}
.ml-office-item a:hover {
    color:#c53030;
}

.ml-link-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ml-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ml-office-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ml-office-item.ml-office-highlight-primary {
    background: rgba(16, 108, 176, 0.22);
    border-left: 3px solid #106CB0;
    padding-left: 35px;
}

.ml-office-item.ml-office-highlight-coverage {
    background: rgba(16, 108, 176, 0.18);
    border-left: 3px solid #106CB0;
    padding-left: 10px;
}

.ml-office-item:last-child {
    border-bottom: none;
}

.ml-office-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.ml-office-address,
.ml-office-hours,
.ml-office-phone {
    font-size: 0.875rem;
    margin-top: 2px;
}

.ml-office-website {
    font-size: 0.875rem;
    margin-top: 4px;
}

.ml-office-website a {
    color: #106CB0;
    text-decoration: none;
}

.ml-office-website a:hover {
    text-decoration: underline;
    color: #1D1D1D;
}

.ml-no-offices {
    padding: 20px 0;
    color: #71717a;
    font-size: 0.95rem;
}

/* Map container */
.ml-map-container {
    flex: 1;
    min-width: 300px;
    min-height: 500px;
    background: #2d2d2d;
    overflow: hidden;
}

.ml-map-container .leaflet-tile-pane {
    filter: none;
}

/* Red pin marker */
.ml-marker-pin {
    background: none !important;
    border: none !important;
}

.ml-marker-dot {
    display: block;
    width: 16px;
    height: 16px;
    margin: 4px;
    background: #c53030;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ml-marker-dot-highlight-primary {
    background: #c53030;
    width: 20px;
    height: 20px;
    margin: 2px;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.28), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.ml-marker-dot-highlight-coverage {
    background: #60a5fa;
    width: 20px;
    height: 20px;
    margin: 2px;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.ml-marker-pin .leaflet-marker-icon {
    background: none !important;
    border: none !important;
}

/* Leaflet popup */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 5px 0 0 0;
}


div.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    padding-bottom: 5px;
}

.ml-office-hours-dl {
    display: flex;
    column-gap: 32px;
    row-gap: 2%;
    margin: 0;
    flex-wrap: wrap;
}

.ml-office-hours-day,
.ml-office-hours-time {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    flex: 1 0 46%;
    max-width: 46%;
}

.ml-office-hours-time {
    text-align: right;
}

.ml-sidebar .ml-office-hours-dl {
    column-gap: 16px;
}

.ml-sidebar .ml-office-hours-day,
.ml-sidebar .ml-office-hours-time {
    font-size: 0.875rem;
}

.leaflet-popup-content .ml-office-hours-dl,
.ml-office-hours-dl--popup {
    margin-top: 8px;
    font-size: 13px;
}
.leaflet-popup-content dl {
    margin-bottom: 0.3rem;
    gap: 0 !important;
}
.leaflet-popup-content dl .ml-office-hours-day,
.leaflet-popup-content dl .ml-office-hours-time {
    font-size: 100%;
    width: auto;
    max-width: inherit !important;
    min-width: inherit !important;
    flex: 1 1 50%;
}

.ml-office-cities-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ml-office-cities-item {
    flex: 0 0 25%;
    max-width: 25%;
    margin: 0 0 10px;
    padding: 0 12px 0 0;
}

@media (max-width: 767px) {
    .ml-office-cities-item {
        flex-basis: 50%;
        max-width: 50%;
    }
}

.ml-office-item.ml-office-item--visitor-suggested {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

.ml-visitor-geo-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #1e3a5f;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
}

.ml-visitor-geo-notice[hidden] {
    display: none !important;
}

.ml-office-form-notice {
    margin: 1em 0;
    padding: 12px 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1d2327;
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-radius: 4px;
}

.ml-office-form-notice a {
    color: #b45309;
    font-weight: 600;
}
