/* Coverage map presentation */

#coverage-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.coverage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.coverage-legend span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .coverage-legend span {
    color: rgba(226, 232, 240, 0.55);
}

.zone-panel + .zone-panel {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding-top: 1.25rem;
}

[data-theme="dark"] .zone-panel + .zone-panel {
    border-color: rgba(148, 163, 184, 0.2);
}

.zone-panel .zone-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.zone-panel button.zone-toggle {
    background: rgba(15, 23, 42, 0.05);
    border: none;
    color: var(--brand-accent);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.zone-panel button.zone-toggle:hover,
.zone-panel button.zone-toggle:focus {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

[data-theme="dark"] .zone-panel button.zone-toggle {
    background: rgba(248, 191, 48, 0.12);
    color: #facc15;
}

[data-theme="dark"] .zone-panel button.zone-toggle:hover,
[data-theme="dark"] .zone-panel button.zone-toggle:focus {
    background: rgba(248, 191, 48, 0.2);
}

.zone-panel small {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.8);
}

[data-theme="dark"] .zone-panel small {
    color: rgba(226, 232, 240, 0.56);
}

.zone-panel .description {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.zone-panel .coverage-meta {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

/* Focused state styles */
.zone-panel.focused {
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .zone-panel.focused {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.3);
}

.zone-panel:not(.focused) {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.zone-panel:not(.focused):hover {
    opacity: 0.8;
}

.zone-toggle.focused {
    background: rgba(20, 184, 166, 0.15);
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.zone-toggle.focused:hover,
.zone-toggle.focused:focus {
    background: rgba(20, 184, 166, 0.25);
    color: #0f766e;
}

[data-theme="dark"] .zone-toggle.focused {
    background: rgba(20, 184, 166, 0.2);
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.4);
}

[data-theme="dark"] .zone-toggle.focused:hover,
[data-theme="dark"] .zone-toggle.focused:focus {
    background: rgba(20, 184, 166, 0.3);
    color: #2dd4bf;
}

.service-area-chip.focused {
    background: rgba(20, 184, 166, 0.15);
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

[data-theme="dark"] .service-area-chip.focused {
    background: rgba(20, 184, 166, 0.2);
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.service-area-chip:not(.focused) {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.service-area-chip:not(.focused):hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Focus mode indicator */
#coverage-map.focus-mode {
    position: relative;
}

#coverage-map.focus-mode::before {
    content: "Modalità Focus Attiva";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(20, 184, 166, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

[data-theme="dark"] #coverage-map.focus-mode::before {
    background: rgba(20, 184, 166, 0.95);
    color: #0b1016;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
