/* ==========================================================================
   UPLOAD.CSS — pagina /partecipa
   ========================================================================== */
.upload-hero { padding: 3.5rem 0 1.5rem; }
.upload-hero .title-hero { margin-bottom: .8rem; }
.upload-body { padding-bottom: 4rem; }

.upload-form { display: grid; gap: 1.5rem; }

/* Un riquadro per passo */
.step { margin: 0; padding: 1.8rem; border: 0; border-radius: var(--radius-lg); background: var(--col-bg-surface); }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: 1.2rem; font: 500 1.35rem var(--font-serif); }
.step legend + * { clear: both; }
.step .form-group:last-child { margin-bottom: 0; }

.field-hint { margin: .8rem 0 1.2rem; font-size: .88rem; line-height: 1.5; color: var(--col-text-muted); }
.field-hint.is-ok { color: #4F7A66; }

/* Selettore foto */
.dropzone {
    display: grid; place-items: center; min-height: 190px; margin: 0; overflow: hidden; cursor: pointer;
    border: 2px dashed rgba(140, 125, 112, .4); border-radius: var(--radius-md); background: var(--col-bg-base);
    transition: border-color var(--transition-smooth);
}
.dropzone:hover, .sr-only:focus-visible + .dropzone { border-color: var(--col-primary); }
.dropzone__text { color: var(--col-text-muted); font-weight: 600; }
.dropzone img { width: 100%; max-height: 360px; object-fit: contain; }
.dropzone.has-photo .dropzone__text { display: none; }

/* Mappa */
#upload-map { height: 340px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid var(--col-line); }
#geocoder-container { margin-bottom: .8rem; }
#geocoder-container .mapboxgl-ctrl-geocoder { font-family: var(--font-sans); }

/* Consenso e invio */
.check { display: flex; gap: .8rem; align-items: flex-start; margin: .5rem 0 0; font-weight: 400; font-size: .92rem; line-height: 1.6; }
.check input { flex: none; width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--col-primary); }
#submit-btn { width: 100%; padding: 1.1rem; font-size: 1.05rem; }
#submit-btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* Messaggi di esito */
.notice { margin-bottom: 1.5rem; padding: 1.1rem 1.4rem; border-radius: var(--radius-md); font-weight: 600; line-height: 1.5; }
.notice--ok { background: #E8F3EF; color: #3A5A4A; }
.notice--error { background: #FBE9E4; color: #9A3F2B; }
.notice[hidden] { display: none; }

/* Utility di accessibilità */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 600px) { .step { padding: 1.3rem; } #upload-map { height: 300px; } }
