/* Stili aggiunti per registrazione, prenotazione, calendario e admin (si appoggiano a style.css) */
.flashes { margin-top: 20px; }
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 10px; font-weight: bold; text-align: center; }
.flash-success { background: #d4edda; color: #1e6b34; }
.flash-error { background: #f8d7da; color: #8a1f2b; }

.nav-form { display: inline; margin: 0; }
.linklike { background: none; border: none; color: white; font: inherit; font-weight: bold; cursor: pointer; padding: 5px 0; }
.linklike:hover { color: #D4AF37; }

.container.narrow { max-width: 480px; }
.stacked-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.stacked-form label, .inline-form label { display: flex; flex-direction: column; gap: 4px; font-weight: bold; font-size: .95em; }
.stacked-form input, .stacked-form select, .stacked-form textarea, .inline-form input {
    padding: 10px; border: 1px solid #bbb; border-radius: 5px; font: inherit; background: #fff; color: #333;
}
.inline-form { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-end; text-align: left; }

.quote-box { background: #ECECEC; border-radius: 8px; padding: 12px 16px; }
.quote-box:empty { display: none; }
.quote-row { display: flex; justify-content: space-between; padding: 4px 0; }
.quote-total { border-top: 1px solid #bbb; margin-top: 6px; padding-top: 8px; font-weight: bold; font-size: 1.15em; }
.quote-error { color: #8a1f2b; font-weight: bold; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; margin-bottom: 30px; }
.data-table th, .data-table td { border: 1px solid #ddd; padding: 10px; vertical-align: top; }
.data-table th { background: #5D6D7E; color: #fff; }
.actions form { display: inline-block; margin: 2px; }
.badge { padding: 3px 9px; border-radius: 12px; font-size: .85em; font-weight: bold; text-transform: capitalize; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d4edda; color: #1e6b34; }
.badge-declined, .badge-cancelled { background: #f8d7da; color: #8a1f2b; }
.btn-small { border: none; border-radius: 4px; padding: 6px 10px; cursor: pointer; color: #fff; font-weight: bold; }
.btn-ok { background: #27ae60; }
.btn-danger { background: #A22E37; }

.calendars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 20px; align-items: start; }
/* selettori prefissati per battere le regole generiche di style.css (.availability-section table/th/td/tr:nth-child) */
.availability-section table.cal { width: 100%; max-width: 300px; table-layout: fixed; border-collapse: separate; border-spacing: 3px; margin: 0 auto; text-align: center; }
.availability-section table.cal caption { font-weight: bold; margin-bottom: 6px; color: #191970; }
.availability-section table.cal th, .availability-section table.cal td { width: 14.28%; height: 34px; padding: 0; border: none; background: none; text-align: center; vertical-align: middle; border-radius: 4px; font-size: .9em; }
.availability-section table.cal th { color: #5D6D7E; font-size: .75em; }
.availability-section table.cal tr:nth-child(even) { background: none; }
.availability-section table.cal td.free { background: #d4edda; color: #1e6b34; }
.availability-section table.cal td.booked { background: #f8d7da; color: #8a1f2b; text-decoration: line-through; }
.availability-section table.cal td.past { color: #aaa; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* campo trappola anti-bot */
.stay-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; background: #fff;
    border: 2px solid #D4AF37; border-radius: 10px; padding: 14px; margin-bottom: 20px; text-align: center; }
.stay-summary span { display: block; font-size: .8em; color: #5D6D7E; }
.stay-summary .button { grid-column: 1 / -1; justify-self: center; margin: 4px 0 0; }
.verify-box { background: #fff3cd; color: #6b5203; border-radius: 8px; padding: 14px 16px; }
/* pagine legali, footer, caselle di spunta, mappa */
.container.legal { max-width: 820px; text-align: left; }
.legal h2 { font-size: 1.3em; margin-top: 30px; }
.legal li { margin-bottom: 6px; }
.legal p, .legal ul { text-align: left; line-height: 1.6; }
.foot-legal { font-size: .85em; opacity: .9; }
.foot-legal a { color: inherit; }
.stacked-form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: normal; }
.stacked-form label.check input { margin-top: 4px; }
.cancel-note { font-size: .9em; color: #5D6D7E; margin: 0; }
.osm-map { height: 400px; max-width: 800px; margin: 0 auto; border-radius: 8px; z-index: 0; }
.map-fallback { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; background: #ECECEC; border-radius: 8px; }
.map-links { text-align: center; margin-top: 14px; }
.map-links .button { margin: 4px; color: #fff; } /* .contact-section a renderebbe il testo blu su blu */
.home-map { margin-top: 30px; }
.ical-box { background: #fff; border: 2px solid #D4AF37; border-radius: 10px; padding: 16px 20px; margin: 10px 0 30px; text-align: left; }
.ical-box h3 { margin-top: 0; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; padding: 10px; border: 1px solid #bbb; border-radius: 5px; font-family: monospace; font-size: .9em; }
.copy-row .button { margin: 0; white-space: nowrap; }
/* admin: schede e gestione utenti */
.admin-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tabs a { padding: 8px 18px; border-radius: 20px; background: #ECECEC; color: #333; text-decoration: none; font-weight: bold; }
.admin-tabs a.active { background: #D4AF37; color: #fff; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-toolbar .button { margin: 0; }
.search-form { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search-form input { flex: 1; min-width: 0; padding: 10px; border: 1px solid #bbb; border-radius: 5px; font: inherit; }
.actions a.btn-small { display: inline-block; text-decoration: none; margin: 2px; }
.badge-admin { background: #191970; color: #fff; }
.user-bookings { text-align: left; padding-left: 20px; }
.user-bookings li { margin-bottom: 6px; }
#pw-gen { align-self: flex-start; margin: -6px 0 0; padding: 6px 12px; font-size: .9em; }
[hidden] { display: none !important; } /* .button ha display:inline-block, che altrimenti vincerebbe su hidden */
/* selezione date sul calendario */
.availability-section table.cal td.free, .availability-section table.cal td.booked { cursor: pointer; }
.availability-section table.cal td.free:hover, .availability-section table.cal td:focus-visible { outline: 2px solid #D4AF37; outline-offset: -2px; }
.availability-section table.cal td.sel { background: #D4AF37; color: #fff; font-weight: bold; text-decoration: none; }
.availability-section table.cal td.sel-start, .availability-section table.cal td.sel-end { background: #b8952a; }
.calendar-legend .day.sel { background: #D4AF37; color: #fff; }
.stay-panel { max-width: 480px; margin: 30px auto 0; padding: 20px; border: 2px solid #D4AF37; border-radius: 10px; background: #fff; text-align: left; }
.stay-hint { font-weight: bold; text-align: center; margin-top: 0; }
.stay-controls { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.stay-controls label { display: flex; flex-direction: column; gap: 4px; font-weight: bold; }
.stay-controls select { padding: 8px; border: 1px solid #bbb; border-radius: 5px; font: inherit; }
#stay-book-wrap { text-align: center; margin-top: 16px; }
.calendar-legend { margin: 10px 0; }
.calendar-legend .day { display: inline-block; padding: 4px 12px; border-radius: 4px; margin: 0 4px; }
.calendar-legend .day.free { background: #d4edda; color: #1e6b34; }
.calendar-legend .day.booked { background: #f8d7da; color: #8a1f2b; text-decoration: line-through; }

/* selettore lingua */
header .container { position: relative; }
.langs { position: absolute; top: 0; right: 20px; display: flex; gap: 6px; }
.langs a { color: #fff; text-decoration: none; font-size: .8em; font-weight: bold; padding: 2px 6px; border-radius: 4px; opacity: .75; }
.langs a.active, .langs a:hover { background: #D4AF37; opacity: 1; }
.actions { white-space: nowrap; }
