/* /area/ ページ固有スタイル（出張エリアMAP含む） */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -5px rgba(27, 59, 43, 0.08);
}

.map-pulse-dot {
    animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 93, 57, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(217, 93, 57, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 93, 57, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .map-pulse-dot {
        animation: none;
    }
}

/* ---------- Area Map (Leaflet) ---------- */

.area-map-shell {
    min-height: 20rem;
    height: 22rem;
    isolation: isolate;
}

@media (min-width: 640px) {
    .area-map-shell {
        height: 28rem;
    }
}

.area-map {
    width: 100%;
    height: 100%;
    background: var(--brand-tint, #EEF3EF);
    z-index: 0;
}

.area-map.is-failed {
    display: none;
}

.area-map-fallback {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(160deg, #EEF3EF 0%, #F6F7F4 100%);
}

.area-map-fallback.hidden,
.area-map-fallback[hidden] {
    display: none !important;
}

/* OSM系タイルをブランドの紙緑トーンへ寄せる */
.area-map .leaflet-tile-pane {
    filter: saturate(0.72) brightness(1.03) sepia(0.12) hue-rotate(55deg) contrast(0.96);
}

.area-map .leaflet-control-attribution {
    background: rgba(246, 247, 244, 0.92) !important;
    color: var(--brand-muted, #5C635F);
    font-size: 10px;
    border-top-left-radius: 8px;
    padding: 2px 8px !important;
    box-shadow: none;
    max-width: 70%;
}

.area-map .leaflet-control-attribution a {
    color: var(--brand-leaf, #2D553E);
}

.area-map .leaflet-control-zoom {
    border: 1px solid var(--brand-border, #DCE3DD) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 8px 20px -8px rgba(17, 35, 26, 0.25) !important;
}

.area-map .leaflet-control-zoom a {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    color: var(--brand-fuka, #1B3B2B) !important;
    background: #fff !important;
    border-bottom-color: var(--brand-border, #DCE3DD) !important;
    font-size: 16px !important;
}

.area-map .leaflet-control-zoom a:hover {
    background: var(--brand-tint, #EEF3EF) !important;
    color: var(--brand-accent, #D95D39) !important;
}

.area-map-tooltip {
    background: var(--brand-dark, #11231A) !important;
    color: #F5E3B3 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 18px -6px rgba(17, 35, 26, 0.35) !important;
}

.area-map-tooltip.leaflet-tooltip-top::before {
    border-top-color: var(--brand-dark, #11231A) !important;
}

/* HQ marker */
.area-hq-marker {
    background: transparent !important;
    border: none !important;
}

.area-hq-marker__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.area-hq-marker__dot {
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    background: var(--brand-accent, #D95D39);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 10px 22px -8px rgba(217, 93, 57, 0.55);
    border: 2px solid #fff;
}

.area-hq-marker__label {
    background: var(--brand-dark, #11231A);
    color: #F5E3B3;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 6px 14px -6px rgba(17, 35, 26, 0.4);
}

/* City chips */
.area-city-label {
    background: transparent !important;
    border: none !important;
}

.area-city-label__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-charcoal, #202422);
    border: 1px solid var(--brand-border, #DCE3DD);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px -6px rgba(17, 35, 26, 0.2);
    backdrop-filter: blur(4px);
}

.area-city-label__chip i {
    color: var(--brand-leaf, #2D553E);
    font-size: 10px;
}

/* Legend overlay */
.area-map-legend {
    position: absolute;
    left: 10px;
    bottom: 28px;
    z-index: 500;
    width: min(13.5rem, calc(100% - 5.5rem));
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--brand-border, #DCE3DD);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 14px 28px -16px rgba(17, 35, 26, 0.35);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.area-map-legend__title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--brand-leaf, #2D553E);
    padding: 0 4px 4px;
}

.area-map-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px;
    padding: 6px 7px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.area-map-legend__item:hover {
    background: var(--brand-tint, #EEF3EF);
}

.area-map-legend__item:focus-visible {
    outline: 2px solid var(--brand-accent, #D95D39);
    outline-offset: 1px;
}

.area-map-legend__item.is-active {
    background: var(--brand-tint, #EEF3EF);
    border-color: var(--brand-border, #DCE3DD);
}

.area-map-legend__swatch {
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    flex-shrink: 0;
    border: 2px solid currentColor;
}

.area-map-legend__swatch--all {
    background: linear-gradient(135deg, #1B3B2B 0%, #4A7A5D 45%, #D95D39 100%);
    border-color: #1B3B2B;
}

.area-map-legend__swatch--a {
    background: rgba(27, 59, 43, 0.35);
    color: #1B3B2B;
}

.area-map-legend__swatch--b {
    background: rgba(74, 122, 93, 0.35);
    color: #4A7A5D;
}

.area-map-legend__swatch--c {
    background: rgba(217, 93, 57, 0.28);
    color: #D95D39;
}

.area-map-legend__swatch--d {
    background: transparent;
    color: #8A918C;
    border-style: dashed;
}

.area-map-legend__text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.area-map-legend__text strong {
    font-size: 11px;
    color: var(--brand-fuka, #1B3B2B);
    font-weight: 700;
    line-height: 1.2;
}

.area-map-legend__text small {
    font-size: 10px;
    color: var(--brand-muted, #5C635F);
    line-height: 1.3;
}

@media (max-width: 480px) {
    .area-map-legend {
        left: 8px;
        right: auto;
        bottom: 26px;
        width: min(11.75rem, calc(100% - 4.5rem));
        padding: 8px;
    }

    .area-city-label__chip {
        font-size: 10px;
        padding: 2px 6px;
    }

    .area-hq-marker__label {
        font-size: 9px;
    }
}
