/* ── Fresh Zones Page ── */

.fresh-zones {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 160px);
    overflow: hidden;
    isolation: isolate;
}

/* ── Map (background) ── */
#fresh-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ── Overlay sfumato per leggibilità ── */
.fresh-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .35) 55%, rgba(255, 255, 255, .65) 100%),
        linear-gradient(180deg, rgba(1, 127, 66, .05) 0%, rgba(239, 91, 42, .05) 100%);
}

/* ── Wrap centrato ── */
.fresh-box-wrap {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 40px 20px;
}

/* ── Box centrale ── */
.fresh-box {
    width: 100%;
    max-width: 560px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(1, 127, 66, .12);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, .12),
        0 8px 24px rgba(1, 127, 66, .08);
}

.fresh-box-header .section-label {
    color: var(--ciotolandia-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    display: inline-block;
    margin-bottom: 12px;
}

.fresh-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text, #2b2b2b);
    margin-bottom: 14px;
    line-height: 1.2;
}

.fresh-subtitle {
    color: #5a5a5a;
    font-size: .98rem;
    line-height: 1.55;
    margin-bottom: 28px;
}

.fresh-subtitle strong {
    color: var(--ciotolandia-orange);
    font-weight: 600;
}

/* ── Input group ── */
.fresh-search-wrap {
    margin-bottom: 8px;
}

.fresh-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 50px;
    padding: 6px 6px 6px 48px;
    transition: border-color .2s, box-shadow .2s;
}

.fresh-input-group:focus-within {
    border-color: var(--ciotolandia-green);
    box-shadow: 0 0 0 4px rgba(1, 127, 66, .12);
}

.fresh-input-group > i.bi {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ciotolandia-orange);
    font-size: 1.1rem;
    pointer-events: none;
}

.fresh-input-group input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-size: 1.05rem;
    letter-spacing: .08em;
    padding: 12px 8px;
    height: auto;
    min-width: 0;
}

.fresh-input-group input:focus {
    box-shadow: none !important;
    border: none !important;
}

/* ── Submit button ── */
.fresh-submit {
    flex-shrink: 0;
    background: var(--ciotolandia-green);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: .95rem;
    transition: background .2s, transform .1s;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fresh-submit:hover:not(:disabled) {
    background: #015a2e;
    color: #fff;
}

.fresh-submit:active:not(:disabled) {
    transform: scale(.98);
}

.fresh-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.fresh-input-error {
    color: #c0392b;
    font-size: .85rem;
    padding: 8px 20px 0;
}

/* ── Risultato ── */
.fresh-result {
    margin-top: 24px;
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: fresh-fade-in .35s ease-out;
}

.fresh-result .fresh-result-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
}

.fresh-result .fresh-result-body {
    flex: 1;
    min-width: 0;
}

.fresh-result .fresh-result-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fresh-result .fresh-result-text {
    font-size: .92rem;
    line-height: 1.5;
    color: #444;
    margin: 0;
}

.fresh-result .fresh-result-cap {
    font-weight: 700;
    letter-spacing: .05em;
}

/* Variante: zona fresh */
.fresh-result.is-fresh {
    background: linear-gradient(135deg, rgba(1, 127, 66, .08) 0%, rgba(78, 175, 72, .12) 100%);
    border: 1px solid rgba(1, 127, 66, .22);
}

.fresh-result.is-fresh .fresh-result-icon {
    background: var(--ciotolandia-green);
}

.fresh-result.is-fresh .fresh-result-title {
    color: var(--ciotolandia-green);
}

/* Variante: ambient */
.fresh-result.is-ambient {
    background: linear-gradient(135deg, rgba(239, 91, 42, .08) 0%, rgba(240, 107, 62, .14) 100%);
    border: 1px solid rgba(239, 91, 42, .22);
}

.fresh-result.is-ambient .fresh-result-icon {
    background: var(--ciotolandia-orange);
}

.fresh-result.is-ambient .fresh-result-title {
    color: var(--ciotolandia-orange);
}

/* Variante: errore */
.fresh-result.is-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
}

.fresh-result.is-error .fresh-result-icon {
    background: #c0392b;
}

.fresh-result.is-error .fresh-result-title {
    color: #c0392b;
}

@keyframes fresh-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Leaflet: rimuovi attribution troppo invadente & abbassa controlli ── */
.fresh-zones .leaflet-control-attribution {
    background: rgba(255, 255, 255, .6);
    font-size: 10px;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .fresh-box {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .fresh-title {
        font-size: 1.5rem;
    }

    .fresh-subtitle {
        font-size: .92rem;
    }

    .fresh-input-group {
        flex-direction: column;
        padding: 10px;
        border-radius: 18px;
        gap: 10px;
    }

    .fresh-input-group > i.bi {
        position: static;
        transform: none;
        align-self: flex-start;
        margin-left: 8px;
    }

    .fresh-input-group input {
        width: 100%;
        text-align: center;
        padding: 6px 0;
    }

    .fresh-submit {
        width: 100%;
        padding: 12px;
    }

    .fresh-input-group > i.bi {
        display: none;
    }

    .fresh-result {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
