/* Widget verifica copertura HatLink (tema scuro) */
.cov {
    --cov-bg: #0b0b0d;
    --cov-card: #121214;
    --cov-field: #18181b;
    --cov-line: rgba(255, 255, 255, .09);
    --cov-line-2: rgba(255, 255, 255, .16);
    --cov-ink: #f5f5f7;
    --cov-sub: #9a9aa2;
    --cov-red: #e30613;
    --cov-red-2: #ff2a36;
    --cov-ok: #22c55e;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    border-radius: 28px;
    border: 1px solid var(--cov-line);
    background: radial-gradient(120% 140% at 0% 0%, rgba(227, 6, 19, .14), transparent 55%), var(--cov-card);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--cov-ink);
    font-family: var(--font-body, "Plus Jakarta Sans", system-ui, sans-serif);
    text-align: left;
    isolation: isolate;
}
.cov *, .cov *::before, .cov *::after { box-sizing: border-box; }
.cov-panel { padding: clamp(1.4rem, 3vw, 2.6rem); min-width: 0; }
.cov-kicker { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid rgba(227, 6, 19, .35); background: rgba(227, 6, 19, .08); color: #ff8a90; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cov-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--cov-red-2); box-shadow: 0 0 0 0 rgba(255, 42, 54, .6); animation: cov-ping 2s ease-out infinite; }
@keyframes cov-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 42, 54, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 42, 54, 0); } }
.cov-title { margin: .9rem 0 .5rem; font-family: var(--font-display, "Outfit", sans-serif); font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.05; letter-spacing: -.035em; color: #fff; }
.cov-lead { margin: 0 0 1.4rem; max-width: 34rem; color: var(--cov-sub); font-size: .98rem; line-height: 1.55; }
.cov-notice { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 14px; border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .08); color: #fcd34d; font-size: .9rem; }

.cov-seg { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1.2rem; border-radius: 14px; border: 1px solid var(--cov-line); background: rgba(0, 0, 0, .35); }
.cov-seg label { margin: 0; cursor: pointer; }
.cov-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cov-seg span { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: 10px; color: var(--cov-sub); font-weight: 650; font-size: .92rem; transition: background .2s, color .2s; }
.cov-seg svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cov-seg input:checked + span { background: #fff; color: #0b0b0d; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cov-seg input:focus-visible + span { outline: 2px solid var(--cov-red-2); outline-offset: 2px; }

.cov-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; position: relative; }
.cov-steps::before { content: ""; position: absolute; left: .82rem; top: 2.2rem; bottom: 2.2rem; width: 2px; background: linear-gradient(var(--cov-line-2), var(--cov-line)); border-radius: 2px; }
.cov-step { position: relative; padding-left: 2.4rem; transition: opacity .25s; }
.cov-step.is-locked { opacity: .45; }
.cov-label { display: flex; align-items: center; gap: .6rem; margin: 0 0 .4rem -2.4rem; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--cov-sub); }
.cov-num { position: relative; z-index: 1; width: 1.75rem; height: 1.75rem; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--cov-line-2); background: var(--cov-card); color: var(--cov-ink); font-size: .78rem; transition: all .25s; }
.cov-step.is-active .cov-num { border-color: var(--cov-red-2); color: #fff; box-shadow: 0 0 0 4px rgba(227, 6, 19, .18); }
.cov-step.is-done .cov-num { border-color: var(--cov-ok); background: var(--cov-ok); color: #052e14; font-size: 0; }
.cov-step.is-done .cov-num::after { content: ""; width: .55rem; height: .3rem; border-left: 2px solid #052e14; border-bottom: 2px solid #052e14; transform: rotate(-45deg) translate(1px, -1px); }
.cov-field { position: relative; }
.cov-field input { width: 100%; height: 3.25rem; padding: 0 6.2rem 0 1rem; border-radius: 14px; border: 1px solid var(--cov-line); background: var(--cov-field); color: #fff; font: 500 1rem/1 inherit; font-family: inherit; outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.cov-field input::placeholder { color: rgba(255, 255, 255, .38); }
.cov-field input:focus { border-color: rgba(255, 42, 54, .7); box-shadow: 0 0 0 4px rgba(227, 6, 19, .16); background: #1d1d21; }
.cov-field input:disabled { cursor: not-allowed; background: rgba(255, 255, 255, .02); }
.cov-step.is-done .cov-field input { border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .05); }
.cov-state { position: absolute; right: 1rem; top: 50%; width: 1.1rem; height: 1.1rem; margin-top: -.55rem; pointer-events: none; }
.cov-field.is-loading .cov-state { border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--cov-red-2); animation: cov-spin .7s linear infinite; }
@keyframes cov-spin { to { transform: rotate(360deg); } }
.cov-clear { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); padding: .35rem .65rem; border: 1px solid var(--cov-line-2); border-radius: 9px; background: rgba(255, 255, 255, .04); color: var(--cov-ink); font: 600 .78rem inherit; font-family: inherit; cursor: pointer; }
.cov-clear:hover { background: rgba(255, 255, 255, .1); }
.cov-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + .4rem); max-height: 17rem; overflow: auto; margin: 0; padding: .35rem; list-style: none; border-radius: 14px; border: 1px solid var(--cov-line-2); background: #17171a; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: cov-pop .16s ease-out; }
@keyframes cov-pop { from { opacity: 0; transform: translateY(-4px); } }
.cov-list li { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding: .65rem .8rem; border-radius: 10px; cursor: pointer; color: var(--cov-ink); font-size: .95rem; }
.cov-list li small { color: var(--cov-sub); font-size: .8rem; white-space: nowrap; }
.cov-list li mark { background: none; color: #ff6b73; font-weight: 700; padding: 0; }
.cov-list li[aria-selected="true"], .cov-list li:hover { background: rgba(227, 6, 19, .14); }
.cov-list li.is-info { cursor: default; color: var(--cov-sub); font-size: .88rem; }
.cov-list li.is-info:hover { background: none; }
.cov-list li.is-err { color: #fca5a5; }

.cov-msg { margin: 1rem 0 0; padding: .7rem .9rem; border-radius: 12px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); color: #fecaca; font-size: .9rem; }
.cov-submit { position: relative; display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; height: 3.5rem; margin-top: 1.3rem; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--cov-red), #b8000b); color: #fff; font: 700 1.05rem inherit; font-family: inherit; letter-spacing: -.01em; cursor: pointer; overflow: hidden; box-shadow: 0 14px 34px rgba(227, 6, 19, .35); transition: transform .2s, box-shadow .2s, opacity .2s, filter .2s; }
.cov-submit svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.cov-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(227, 6, 19, .45); }
.cov-submit:hover:not(:disabled) svg { transform: translateX(3px); }
.cov-submit:disabled { cursor: not-allowed; opacity: .4; box-shadow: none; filter: saturate(.6); }
.cov-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%); transform: translateX(-100%); }
.cov-submit.is-ready::after { animation: cov-shine 2.6s ease-in-out infinite; }
@keyframes cov-shine { 60%, 100% { transform: translateX(100%); } }
.cov-submit.is-busy { pointer-events: none; }
.cov-submit.is-busy .cov-submit-t::after { content: "…"; }
.cov-fine { margin: .75rem 0 0; color: rgba(255, 255, 255, .42); font-size: .78rem; text-align: center; }

.cov-map-wrap { position: relative; min-height: 26rem; border-left: 1px solid var(--cov-line); border-radius: 0 28px 28px 0; overflow: hidden; background: #0d0d10; }
.cov-map { position: absolute; inset: 0; background: #0d0d10; }
.cov-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 400; box-shadow: inset 0 0 80px rgba(0, 0, 0, .65); }
.cov-map-tag { position: absolute; z-index: 500; left: 1rem; top: 1rem; display: inline-flex; align-items: center; gap: .5rem; max-width: calc(100% - 2rem); padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--cov-line-2); background: rgba(11, 11, 13, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .84rem; font-weight: 600; color: var(--cov-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov .leaflet-container { background: #0d0d10; font-family: inherit; }
.cov .leaflet-control-attribution { background: rgba(0, 0, 0, .55) !important; color: rgba(255, 255, 255, .5) !important; font-size: .65rem; }
.cov .leaflet-control-attribution a { color: rgba(255, 255, 255, .7) !important; }
.cov .leaflet-bar a { background: #17171a; color: #fff; border-color: var(--cov-line); }
.cov .leaflet-bar a:hover { background: #232327; }
.cov-pin { position: relative; width: 22px; height: 22px; }
.cov-pin::before, .cov-pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.cov-pin::before { background: #ff2a36; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.cov-pin::after { border: 2px solid #ff2a36; animation: cov-ring 1.8s ease-out infinite; }
@keyframes cov-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

@media (max-width: 900px) {
    .cov { grid-template-columns: 1fr; border-radius: 22px; }
    .cov-map-wrap { min-height: 15rem; border-left: 0; border-top: 1px solid var(--cov-line); border-radius: 0 0 22px 22px; order: 2; }
}
@media (max-width: 480px) {
    .cov-seg { display: flex; }
    .cov-seg label { flex: 1; }
    .cov-seg span { justify-content: center; }
    .cov-field input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .cov-dot, .cov-pin::after, .cov-submit.is-ready::after, .cov-field.is-loading .cov-state { animation: none; }
}
/* mappa OSM resa scura solo sulle tessere: marker e tracciati mantengono i colori */
.cov .leaflet-tile-pane, .cove-map .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.35); }
