/* PetCure booking map — location step */

.pc-location-shell {
    --pc-teal: #71BBB0;
    --pc-teal-deep: #4f9e93;
    --pc-orange: #EE9D5B;
    --pc-ink: #1D1D1B;
    --pc-muted: #7D7D7D;
    --pc-ok: #2f9e7a;
    --pc-bad: #d4654b;
    --pc-glass: rgba(255, 255, 255, 0.92);
}

.pc-location-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pc-location-toolbar .btn-use-location {
    border-radius: 999px;
    border: 1.5px solid var(--pc-teal);
    color: var(--pc-teal-deep);
    background: #fff;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pc-location-toolbar .btn-use-location:hover {
    background: rgba(113, 187, 176, 0.12);
    color: var(--pc-teal-deep);
    box-shadow: 0 8px 20px rgba(113, 187, 176, 0.22);
    transform: translateY(-1px);
}

.pc-location-hint {
    color: var(--pc-muted);
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 0;
}

.pc-map-stage {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(29, 29, 27, 0.08);
    box-shadow:
        0 18px 40px rgba(29, 29, 27, 0.08),
        0 2px 0 rgba(113, 187, 176, 0.15) inset;
    background: linear-gradient(160deg, #f4fbf9 0%, #fff8f2 100%);
    margin-bottom: 0.85rem;
}

.pc-map-stage #map {
    height: min(52vh, 440px);
    min-height: 320px;
    width: 100%;
    border-radius: 0;
    z-index: 1;
}

.pc-map-stage.is-out .leaflet-container {
    filter: saturate(0.92);
}

.pc-map-stage.is-in .leaflet-container {
    filter: none;
}

.pc-map-overlay-chip {
    position: absolute;
    top: 14px;
    inset-inline: 14px;
    z-index: 500;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.pc-coverage-chip {
    pointer-events: auto;
    max-width: min(100%, 520px);
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: var(--pc-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(29, 29, 27, 0.06);
    box-shadow: 0 12px 30px rgba(29, 29, 27, 0.12);
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.2s ease, background 0.2s ease;
}

.pc-coverage-chip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pc-coverage-chip.is-checking {
    border-color: rgba(113, 187, 176, 0.35);
}

.pc-coverage-chip.is-idle {
    border-color: rgba(113, 187, 176, 0.25);
}

.pc-coverage-chip.is-ok {
    border-color: rgba(47, 158, 122, 0.35);
    background: rgba(241, 251, 247, 0.95);
}

.pc-coverage-chip.is-bad {
    border-color: rgba(212, 101, 75, 0.35);
    background: rgba(255, 246, 243, 0.96);
}

.pc-coverage-chip__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1rem;
    background: rgba(113, 187, 176, 0.15);
    color: var(--pc-teal-deep);
}

.pc-coverage-chip.is-ok .pc-coverage-chip__icon {
    background: rgba(47, 158, 122, 0.16);
    color: var(--pc-ok);
}

.pc-coverage-chip.is-bad .pc-coverage-chip__icon {
    background: rgba(212, 101, 75, 0.14);
    color: var(--pc-bad);
}

.pc-coverage-chip__body {
    min-width: 0;
    flex: 1;
}

.pc-coverage-chip__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pc-ink);
    line-height: 1.35;
}

.pc-coverage-chip__text {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--pc-muted);
    line-height: 1.45;
}

.pc-coverage-chip__area {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(113, 187, 176, 0.16);
    color: var(--pc-teal-deep);
    font-size: 0.75rem;
    font-weight: 700;
}

.pc-coverage-chip.is-bad .pc-coverage-chip__area {
    display: none;
}

.pc-map-legend {
    position: absolute;
    bottom: 14px;
    inset-inline-start: 14px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(29, 29, 27, 0.06);
    box-shadow: 0 8px 20px rgba(29, 29, 27, 0.1);
    font-size: 0.75rem;
    color: var(--pc-ink);
    pointer-events: none;
}

.pc-map-legend__row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pc-map-legend__swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pc-map-legend__swatch.is-covered {
    background: rgba(113, 187, 176, 0.35);
    border: 2px solid #71BBB0;
}

.pc-map-legend__swatch.is-active {
    background: rgba(47, 158, 122, 0.45);
    border: 2px solid #2f9e7a;
}

.pc-map-legend__swatch.is-outside {
    background: rgba(238, 157, 91, 0.2);
    border: 2px dashed #EE9D5B;
}

.pc-map-fit-btn {
    position: absolute;
    bottom: 14px;
    inset-inline-end: 14px;
    z-index: 500;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pc-teal-deep);
    box-shadow: 0 8px 20px rgba(29, 29, 27, 0.12);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pc-map-fit-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    color: var(--pc-teal);
}

.pc-pin-wrapper {
    background: transparent !important;
    border: none !important;
}

.pc-pin {
    position: relative;
    width: 36px;
    height: 48px;
}

.pc-pin__head {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--pc-teal);
    border: 3px solid #fff;
    box-shadow: 0 6px 14px rgba(29, 29, 27, 0.25);
    margin: 0 auto;
}

.pc-pin.is-ok .pc-pin__head {
    background: var(--pc-ok);
}

.pc-pin.is-bad .pc-pin__head {
    background: var(--pc-bad);
}

.pc-pin.is-checking .pc-pin__head {
    background: var(--pc-orange);
}

.pc-pin__pulse {
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 6px;
    margin-left: -9px;
    border-radius: 50%;
    background: rgba(29, 29, 27, 0.18);
}

.pc-pin.is-bad .pc-pin__pulse {
    animation: pc-pin-pulse 1.4s ease-out infinite;
}

@keyframes pc-pin-pulse {
    0% {
        transform: scale(0.7);
        opacity: 0.7;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.pc-area-tooltip {
    background: rgba(29, 29, 27, 0.88) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.35rem 0.55rem !important;
    box-shadow: 0 8px 18px rgba(29, 29, 27, 0.2) !important;
    font-size: 0.75rem !important;
    font-weight: 600;
}

.pc-area-tooltip::before {
    border-top-color: rgba(29, 29, 27, 0.88) !important;
}

.leaflet-container {
    font-family: inherit;
}

@media (max-width: 576px) {
    .pc-map-stage #map {
        height: 58vh;
        min-height: 280px;
    }

    .pc-coverage-chip {
        padding: 0.7rem 0.8rem;
    }

    .pc-map-legend {
        font-size: 0.7rem;
        padding: 0.5rem 0.65rem;
    }
}
