/*
 * Location picker (assets/js/location-picker.js)
 * The clinic drops one pin on the map. Shared by the clinic application form
 * and the clinic profile page, so it styles itself from the page's own
 * colour variables and falls back to the CavClinics navy.
 */
.loc-picker {
    --loc-accent: var(--gt-navy, var(--primary-color, #2D457A));
    --loc-line: var(--gt-line, #E1E7F0);
    --loc-muted: var(--gt-muted, #586277);
    border: 1px solid var(--loc-line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.loc-picker-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid var(--loc-line);
    background: var(--gt-mist, #F4F7FB);
}

.loc-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--loc-line);
    border-radius: 8px;
    background: #fff;
    color: var(--loc-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.loc-picker-btn:hover:not(:disabled) {
    border-color: var(--loc-accent);
    background: #eef3fb;
}

.loc-picker-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.loc-picker-map {
    height: 340px;
    width: 100%;
    background: #e9eef5;
}

.loc-picker-map.is-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--loc-muted);
    font-size: 14px;
    text-align: center;
}

.loc-picker-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--loc-line);
    color: var(--loc-muted);
    font-size: 13px;
    line-height: 1.5;
}

.loc-picker-status i {
    margin-top: 2px;
    flex-shrink: 0;
}

.loc-picker-status.is-set { color: #15803d; background: #f0fdf4; }
.loc-picker-status.is-warn { color: #b45309; background: #fffbeb; }
.loc-picker-status.is-error { color: #b91c1c; background: #fef2f2; }

.loc-picker-status a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.loc-picker.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Leaflet's own controls, nudged to match the page. */
.loc-picker .leaflet-container {
    font: inherit;
}

.loc-picker .leaflet-control-attribution {
    font-size: 10px;
}

@media (max-width: 560px) {
    .loc-picker-map { height: 280px; }
    .loc-picker-btn { flex: 1 1 auto; justify-content: center; }
}
