/**
 * AVR User System - Stili coerenti con il sito
 * Colori: #0071c2 (blu), #E3F2FD (celeste chiaro)
 */

/* Dashboard: nascondi header sito */
body.avr-dashboard .elementor-location-header,
body.avr-dashboard .site-header,
body.avr-dashboard header[data-elementor-type="header"] {
    display: none !important;
}

/* Layout area utente: sidebar + main, footer in fondo a tutta larghezza */
body.avr-area-utente #page,
body.avr-area-utente .site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: visible;
}

body.avr-area-utente main,
body.avr-area-utente #content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: visible;
}

/* Wrapper sidebar + main: flex row, sidebar sticky così resta visibile allo scroll */
body.avr-area-utente .avr-area-utente-wrap {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 100vh;
    align-items: flex-start;
}

/* Footer sempre in fondo, a tutta larghezza */
body.avr-area-utente footer,
body.avr-area-utente .elementor-location-footer,
body.avr-area-utente .site-footer,
body.avr-area-utente .footer-cstm {
    width: 100% !important;
    flex-shrink: 0;
    margin-top: auto !important;
}

/* Sidebar: sticky così resta fissa in vista mentre scrolla solo il main */
body.avr-area-utente .avr-area-utente-wrap .avr-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    max-height: 100vh;
    overflow-y: auto;
    background: #fff;
    border-right: 2px solid #E3F2FD;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

body.admin-bar.avr-area-utente .avr-area-utente-wrap .avr-sidebar {
    top: 32px;
    max-height: calc(100vh - 32px);
}

.avr-sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 24px 0;
}

.avr-sidebar-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
    padding: 0 24px 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.avr-sidebar-logo:hover {
    color: #0071c2;
}
.avr-sidebar-logo.avr-sidebar-logo-img {
    display: block;
    line-height: 0;
}
.avr-sidebar-logo.avr-sidebar-logo-img img {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}
.avr-sidebar-logo.avr-sidebar-logo-img:hover {
    color: inherit;
    opacity: 0.9;
}

.avr-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
}

.avr-sidebar-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.avr-sidebar-link:hover {
    background: rgba(0, 113, 194, 0.08);
    color: #0071c2;
}

.avr-sidebar-link-active {
    font-weight: 600;
    color: #0071c2;
    background: rgba(0, 113, 194, 0.1);
}

.avr-sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
}

.avr-sidebar-user {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.avr-sidebar-link-logout {
    color: #666;
    font-size: 0.9rem;
}

.avr-sidebar-link-logout:hover {
    color: #0071c2;
}

/* Main content area: occupa lo spazio restante, è quello che scrolla */
body.avr-area-utente .avr-area-main {
    flex: 1;
    padding: 40px 24px 60px;
    background: #f8f9fa;
    min-height: 100vh;
    min-width: 0;
}

.avr-area-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px 24px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #E3F2FD;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Preferiti: usa griglia "appartamenti" (non colonna singola) */
body.avr-area-utente .avr-area-content.avr-preferiti-content {
    max-width: none;
    width: 100%;
    margin: 0;
}

body.avr-area-utente .avr-preferiti-list.avr-lista-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (min-width: 1024px) {
    body.avr-area-utente .avr-preferiti-list.avr-lista-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.avr-area-content .avr-user-title {
    margin-top: 0;
}

.avr-area-cta {
    margin-bottom: 24px;
    margin: 10px;
}

.avr-area-cta .avr-user-btn {
    display: inline-block;
    width: auto;
    padding: 12px 24px;
}

/* Bottom nav (solo mobile) – stile Airbnb */
.avr-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body.avr-area-utente .avr-area-utente-wrap {
        flex-direction: column;
    }

    body.avr-area-utente .avr-area-utente-wrap .avr-sidebar {
        display: none;
    }

    body.admin-bar.avr-area-utente .avr-area-utente-wrap .avr-sidebar {
        top: auto;
        max-height: none;
    }

    .avr-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
        transition: transform 0.3s ease;
    }

    .avr-bottom-nav.avr-bottom-nav-hidden {
        transform: translateY(100%);
    }

    .avr-bottom-nav-inner {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        max-width: 100%;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    }

    .avr-bottom-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 8px;
        color: #666;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        flex: 1;
        min-width: 0;
        transition: color 0.2s;
    }

    .avr-bottom-nav-link:hover,
    .avr-bottom-nav-link:focus {
        color: #0071c2;
    }

    .avr-bottom-nav-link-active {
        color: #0071c2;
    }

    .avr-bottom-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin-bottom: 2px;
    }

    .avr-bottom-nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .avr-bottom-nav-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    body.avr-area-utente .avr-area-main {
        padding: 0 0 96px 0;
    }

    .avr-area-main.avr-area-main-chat {
        padding-bottom: 96px;
    }

    .avr-chat-form {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .avr-area-content {
        padding: 24px 16px;
    }

    /* Pagina Partner: sfondo bianco a tutta larghezza, padding solo sul content */
    .avr-area-main.avr-area-main-partners {
        padding: 0 0 96px 0;
        background: #fff;
    }
    .avr-area-content.avr-partners-content {
        max-width: none;
        margin: 0;
        padding: 20px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        width: 100%;
        box-sizing: border-box;
    }

    /* Card partner: logo prima riga centrato, testo seconda riga */
    .avr-partner-card-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .avr-partner-card-info .avr-partner-image {
        width: 100%;
        max-width: 160px;
        height: auto;
        min-height: 80px;
        aspect-ratio: 1;
        align-self: center;
    }
    .avr-partner-card-info .avr-partner-info {
        text-align: left;
    }

    /* Filtri categoria partner: label sopra, pulsanti in griglia 2 colonne */
    .avr-partner-filter {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    .avr-partner-filter-label {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    .avr-partner-filter-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
        padding: 0.65rem 0.75rem;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: center;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }
    .avr-partner-filter-btn.avr-partner-filter-active {
        box-shadow: 0 1px 3px rgba(0, 113, 194, 0.25);
    }

    /* Form genera QR: contenitori contenuti nella card; lista dropdown visibile sopra la bottom nav */
    .avr-partner-card { padding-left: 1rem; padding-right: 1rem; }
    .avr-partner-generate-form { padding-left: 0.75rem; padding-right: 0.75rem; }
    .avr-partner-booking-list {
        max-height: min(200px, 45vh);
        z-index: 200;
    }
}

/* Navbar custom dashboard (legacy, per altre pagine) */
.avr-dashboard-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 2px solid #E3F2FD;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.avr-dashboard-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    gap: 16px;
    position: relative;
}

.avr-dashboard-nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
}

.avr-dashboard-nav-logo:hover {
    color: #0071c2;
}

.avr-dashboard-nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avr-dashboard-nav-link {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.avr-dashboard-nav-link:hover {
    background: rgba(0, 113, 194, 0.08);
    color: #0071c2;
}

.avr-dashboard-nav-link-active {
    font-weight: 600;
    color: #0071c2;
}

.avr-dashboard-nav-link-profile {
    display: flex;
    align-items: center;
    gap: 6px;
}

.avr-dashboard-nav-icon {
    font-size: 1.1rem;
}

.avr-dashboard-nav-link-logout {
    color: #666;
    font-size: 0.9rem;
}

/* Hamburger mobile */
.avr-dashboard-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.avr-dashboard-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: transform 0.3s, opacity 0.3s;
}

.avr-dashboard-nav-toggle-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.avr-dashboard-nav-toggle-active span:nth-child(2) {
    opacity: 0;
}

.avr-dashboard-nav-toggle-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .avr-dashboard-nav-toggle {
        display: flex;
    }

    .avr-dashboard-nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 4px;
        display: none;
    }

    .avr-dashboard-nav-menu.avr-dashboard-nav-menu-open {
        display: flex;
    }

    .avr-dashboard-nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: 6px;
    }
}

/* Dashboard content: meno margin-top senza header sito */
body.avr-dashboard .avr-user {
    margin-top: 40px;
}

.avr-user {
    max-width: 480px;
    margin: 120px auto 40px;
    padding: 30px 24px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #E3F2FD;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.avr-user-container {
    width: 100%;
}

.avr-user-title {
    margin: 0 0 24px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.avr-user-intro {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    text-align: center;
}

.avr-user-form {
    margin-bottom: 20px;
}

.avr-user-field {
    margin-bottom: 16px;
}

.avr-user-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.avr-user-field input[type="text"],
.avr-user-field input[type="email"],
.avr-user-field input[type="tel"],
.avr-user-field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.avr-user-field input:focus {
    outline: none;
    border-color: #0071c2;
}

.avr-user-field.avr-user-remember label,
.avr-user-field.avr-user-privacy label {
    font-weight: 500;
}

.avr-user-field.avr-user-privacy a {
    color: #0071c2;
    text-decoration: underline;
}

.avr-user-field.avr-user-privacy a:hover {
    text-decoration: none;
}

.avr-user-field.avr-user-remember input,
.avr-user-field.avr-user-privacy input,
.avr-user-field.avr-user-marketing input {
    width: auto;
    margin-right: 8px;
}

.avr-user-readonly {
    display: block;
    padding: 4px 0;
    color: inherit;
}

.avr-user-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #666;
}

.avr-user-submit {
    margin: 24px 0 0 0;
}

.avr-user-btn {
    width: 100%;
    padding: 12px 20px;
    background: #0071c2;
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.avr-user-btn:hover {
    background: #005a9e;
}

.avr-user-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.95rem;
}

.avr-user-links a {
    color: #0071c2;
    text-decoration: none;
}

.avr-user-links a:hover {
    text-decoration: underline;
}

.avr-user-social-sep {
    margin: 20px 0 12px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.avr-user-social-login {
    margin-bottom: 20px;
}

.avr-user-social-login .vsl-social-login {
    max-width: 100%;
}

.avr-user-sep {
    margin: 0 10px;
    color: #999;
}

.avr-user-errors {
    margin: 0 0 20px 0;
    padding: 14px 18px;
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    list-style: none;
}

.avr-user-errors li {
    color: #721c24;
    margin-bottom: 4px;
}

.avr-user-errors li:last-child {
    margin-bottom: 0;
}

.avr-user-success {
    margin: 0 0 20px 0;
    padding: 14px 18px;
    background: #f0fff0;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    color: #155724;
}

/* Dashboard */
.avr-user-dashboard .avr-user-dashboard-welcome {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Pagina Il mio account: griglia desktop e card */
.avr-account-sections {
    display: block;
}
.avr-account-sections .avr-user-dashboard-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.avr-account-sections .avr-user-dashboard-section:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.avr-account-sections .avr-user-dashboard-section h2 {
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 2px solid #0071c2;
    letter-spacing: -0.02em;
}

/* Vista readonly dati + pulsante Modifica */
.avr-account-sections .avr-user-data-view .avr-user-dashboard-list {
    margin: 0 0 1rem 0;
    padding: 0;
    list-style: none;
}
.avr-account-sections .avr-user-data-view .avr-user-dashboard-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
}
.avr-account-sections .avr-user-data-view .avr-user-dashboard-list li:last-child {
    border-bottom: none;
}
.avr-account-sections .avr-user-actions {
    margin: 1rem 0 0 0;
}
.avr-account-sections .avr-user-edit-form .avr-user-field {
    margin-bottom: 1.25rem;
}
.avr-account-sections .avr-user-marketing-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    margin: 0;
}
.avr-account-sections .avr-user-marketing-label input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: #0071c2;
}
.avr-account-sections .avr-user-submit {
    margin-top: 1.5rem;
    margin-bottom: 0;
}
.avr-account-sections .avr-user-submit .avr-user-btn-link {
    margin-left: 1rem;
}
/* Cambia password inline nella card dati (nessuna card dedicata) */
.avr-account-sections .avr-user-dashboard-password-inline {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}
.avr-account-sections .avr-user-dashboard-password-inline .avr-user-links {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.avr-account-sections .avr-user-dashboard-password-inline .avr-user-toggle-password {
    background: none;
    border: none;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
.avr-account-sections .avr-user-logout {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.avr-account-sections .avr-user-links {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}
.avr-account-sections .avr-user-dashboard-privacy .avr-user-inline-form,
.avr-account-sections .avr-user-dashboard-privacy .avr-user-delete-form {
    margin-bottom: 1rem;
}
.avr-account-sections .avr-user-delete-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.avr-account-sections .avr-user-delete-phrase-wrap {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}
.avr-account-sections .avr-user-delete-phrase-wrap input {
    max-width: 280px;
}
.avr-account-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .avr-area-content.avr-area-content--account {
        max-width: 1200px;
    }
    .avr-account-sections {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .avr-account-sections .avr-user-dashboard-section {
        margin-bottom: 0;
    }
    .avr-account-sections .avr-user-dashboard-section--data {
        margin-bottom: 0;
    }
    .avr-account-col-right .avr-user-dashboard-section {
        margin-bottom: 0;
    }
    .avr-area-content--account .avr-user-title {
        text-align: left;
    }
}

.avr-user-dashboard-section {
    margin-bottom: 28px;
}

.avr-user-dashboard-section h2 {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    color: #333;
}

.avr-user-dashboard-list {
    margin: 0 0 16px 0;
    padding: 0;
    list-style: none;
}

.avr-user-dashboard-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.avr-user-dashboard-list li:last-child {
    border-bottom: none;
}

.avr-user-placeholder {
    color: #666;
    font-style: italic;
}

.avr-user-dashboard-privacy .avr-user-inline-form,
.avr-user-dashboard-privacy .avr-user-delete-form {
    margin-bottom: 12px;
}

.avr-user-btn-link {
    background: none;
    border: none;
    color: #0071c2;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.35em 0.5em;
    margin: -0.35em -0.5em;
    font-size: inherit;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.avr-user-btn-link:hover,
.avr-user-btn-link:focus {
    text-decoration: none;
    background: rgba(0, 113, 194, 0.08);
    color: #005a9e;
    outline: none;
}

.avr-user-btn-danger {
    color: #c00;
}

.avr-user-delete-form label {
    display: block;
    margin-bottom: 8px;
}

/* Prenotazione di test */
.avr-booking-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.avr-user-booking-form .avr-user-field input[type="date"],
.avr-user-booking-form .avr-user-field input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.avr-user-booking-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    resize: vertical;
}

.avr-user-test-card {
    margin-top: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Lista prenotazioni */
.avr-bookings-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.avr-booking-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.avr-booking-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.avr-booking-dates,
.avr-booking-amount {
    color: #666;
    font-size: 0.95rem;
}

.avr-booking-status {
    font-size: 0.85rem;
    padding: 2px 8px;
    background: #e8f4fc;
    color: #0071c2;
    border-radius: 4px;
}

/* Lista prenotazioni – filtri e sezioni */
.avr-prenotazioni-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e4d8;
}

.avr-prenotazioni-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 24px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.avr-prenotazioni-filter-btn:hover {
    border-color: #0071c2;
    color: #0071c2;
}

.avr-prenotazioni-filter-btn.active {
    border-color: #0071c2;
    background: #0071c2;
    color: #fff;
}

.avr-prenotazioni-filter-count {
    font-size: 0.85rem;
    opacity: 0.9;
}

.avr-prenotazioni-sections {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.avr-prenotazioni-section {
    margin: 0;
}

.avr-prenotazioni-section-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.avr-prenotazioni-section-cta {
    margin: 0 0 20px;
    padding: 14px 18px;
    background: #E3F2FD;
    border-left: 4px solid #E3F2FD;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #8a6914;
}

.avr-prenotazioni-section-desc {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: #666;
}

.avr-prenotazioni-section .avr-bookings-list {
    margin: 0;
}

/* Blocchi prenotazioni (confermate, da completare, ecc.) – senza filtri */
.avr-prenotazioni-block,
.avr-prenotazioni-cancelled-row {
    scroll-margin-top: 20px;
}

.avr-prenotazioni-block {
    margin-bottom: 40px;
    padding: 10px;
}

.avr-prenotazioni-block:last-child {
    margin-bottom: 0;
}

.avr-prenotazioni-block-title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #333;
}

.avr-prenotazioni-block-intro {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.avr-prenotazioni-block-empty {
    margin: 0 0 24px;
    font-size: 0.95rem;
    color: #777;
    font-style: italic;
}

/* Riga separata: prenotazioni cancellate */
.avr-prenotazioni-cancelled-row {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.avr-prenotazioni-cancelled-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
}

.avr-prenotazioni-cancelled-title + .avr-prenotazioni-cancelled-subtitle {
    margin-top: 12px;
}

.avr-prenotazioni-cancelled-subtitle {
    margin: 24px 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
}

.avr-prenotazioni-cancelled-desc {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #666;
}

.avr-bookings-cards-cancelled .avr-booking-card-inner {
    border-color: #ccc;
    opacity: 0.92;
}

.avr-bookings-cards-cancelled .avr-booking-card-inner:hover {
    opacity: 1;
}

/* Blocco "Da completare" – CTA pagamento */
.avr-prenotazioni-block-cta {
    margin-bottom: 20px;
}

.avr-prenotazioni-block-cta .avr-prenotazioni-section-cta {
    margin: 0 0 10px;
}

.avr-prenotazioni-cta-secondary {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.avr-prenotazioni-block .avr-bookings-list {
    margin: 0;
}

/* Pagina prenotazioni: niente card wrapper, usa tutto lo spazio, niente bordo celeste generale */
body.avr-area-utente .avr-area-content.avr-prenotazioni-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

/* Prenotazioni: stato vuoto (solo quando non ci sono prenotazioni) */
.avr-prenotazioni-empty {
    margin-top: 14px;
    padding: 22px 18px;
    border: 1px dashed #cfe3f6;
    border-radius: 14px;
    background: #f7fbff;
}

.avr-prenotazioni-empty-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.avr-prenotazioni-empty-desc {
    margin: 0 0 16px;
    color: #555;
    line-height: 1.55;
}

.avr-prenotazioni-empty-steps {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.avr-prenotazioni-empty-steps-title {
    margin: 0 0 10px;
    font-size: 1rem;
}

.avr-prenotazioni-empty-steps-list {
    margin: 0 0 0 1.2em;
    padding: 0;
    color: #555;
    line-height: 1.6;
}

.avr-prenotazioni-empty-actions {
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.avr-prenotazioni-empty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
}

.avr-prenotazioni-empty-cta:hover,
.avr-prenotazioni-empty-cta:focus {
    text-decoration: none;
}

.avr-prenotazioni-empty-actions-sep {
    color: #9aa;
}

/* Link ancoraggio alle sezioni (sopra il contenuto) */
.avr-prenotazioni-anchors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.avr-prenotazioni-anchor-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0071c2;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.avr-prenotazioni-anchor-link:hover {
    background: #e8f4fc;
    color: #005a9e;
}

/* Lista prenotazioni – card con foto: su desktop più card per riga */
.avr-bookings-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 769px) {
    .avr-bookings-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1100px) {
    .avr-bookings-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.avr-booking-card {
    margin: 0;
    padding: 0;
    list-style: none;
}

.avr-booking-card-inner {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    height: 100%;
}

.avr-booking-card-img {
    flex: 0 0 auto;
    width: 100%;
    height: 180px;
    min-height: 140px;
    background: #f0f0f0;
}

.avr-booking-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avr-booking-card-img a {
    display: block;
    height: 100%;
}

.avr-booking-card-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.avr-booking-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.avr-booking-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.avr-booking-card-title a {
    color: #333;
    text-decoration: none;
}

.avr-booking-card-title a:hover {
    color: #0071c2;
}

.avr-booking-card-status {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.avr-booking-status-pending,
.avr-booking-status-payment,
.avr-booking-status-pending-payment {
    background: #E3F2FD;
    color: #b8860b;
}

.avr-booking-status-pending-owner {
    background: #e8f4fd;
    color: #0066aa;
}

.avr-booking-status-confirmed,
.avr-booking-status-paid {
    background: #e6f7ed;
    color: #1e7e34;
}

.avr-booking-status-cancelled-abandoned {
    background: #fff4e5;
    color: #a65c00;
    border: 1px solid #f0c880;
}

.avr-booking-status-cancelled {
    background: #fce8e8;
    color: #c53030;
}

.avr-booking-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #666;
}

.avr-booking-card-dates {
    flex: 1 1 100%;
}

.avr-booking-card-nights {
    color: #888;
}

.avr-booking-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.avr-booking-card-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}

.avr-booking-card-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.avr-booking-card-btn-secondary {
    background: #fff;
    border: 2px solid #0071c2;
    color: #0071c2 !important;
}

.avr-booking-card-btn-secondary:hover {
    background: #0071c2;
    color: #fff !important;
}

/* Card senza immagine */
.avr-booking-card-inner:not(:has(.avr-booking-card-img)) .avr-booking-card-body {
    padding: 24px;
}

@media (max-width: 640px) {
    .avr-booking-card-inner {
        flex-direction: column;
    }

    .avr-booking-card-img {
        flex: 0 0 auto;
        height: 180px;
    }

    .avr-booking-card-body {
        padding: 16px;
    }

    .avr-booking-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .avr-booking-card-btn {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .avr-booking-row {
        grid-template-columns: 1fr;
    }

    .avr-booking-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.avr-user-resend-verification {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.avr-user-resend-verification.avr-user-resend-visible {
    background: rgba(227, 242, 253, 0.08);
    margin: 20px -20px -20px;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid rgba(227, 242, 253, 0.5);
}

.avr-user-resend-title {
    font-size: 0.95em;
    margin-bottom: 12px;
    color: #555;
}

.avr-user-form-inline .avr-user-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.avr-user-form-inline .avr-user-field input[type="email"] {
    flex: 1;
    min-width: 180px;
}

.avr-user-btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .avr-user {
        margin: 20px 16px;
        padding: 24px 16px;
    }

    body.avr-dashboard .avr-user {
        margin-top: 24px;
    }
}

/* Avai â€“ Lista e singolo appartamenti */
.avr-avai-filters .avr-booking-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.avr-avai-filters .avr-user-field-submit {
    align-self: flex-end;
}

.avr-avai-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.avr-avai-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.avr-avai-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0071c2;
}

.avr-avai-card-image {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}

.avr-avai-card-accommodation {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.avr-avai-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.avr-avai-card-link:hover {
    color: inherit;
}

.avr-avai-card-cta {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0071c2;
}

.avr-avai-card-link:hover .avr-avai-card-cta {
    text-decoration: underline;
}

.avr-avai-card-body {
    padding: 20px;
}

.avr-avai-card-title {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #333;
}

.avr-avai-card-price {
    margin: 0 0 16px;
    font-size: 1rem;
}

.avr-avai-card-price strong {
    color: #0071c2;
}

.avr-avai-card-label {
    font-size: 0.9em;
    color: #666;
    margin-left: 4px;
}

.avr-avai-unavailable {
    color: #999;
    font-style: italic;
}

.avr-avai-back {
    margin-bottom: 20px;
}

.avr-avai-back a {
    color: #0071c2;
    text-decoration: none;
}

.avr-avai-back a:hover {
    text-decoration: underline;
}

.avr-avai-gallery {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.avr-avai-gallery-img {
    max-width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.avr-avai-description {
    margin-bottom: 32px;
    line-height: 1.6;
}

.avr-avai-booking-box {
    border: 2px solid #E3F2FD;
    border-radius: 8px;
    padding: 24px;
    background: #fffef8;
}

.avr-avai-booking-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.avr-avai-price-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8e4d8;
}

.avr-avai-total {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.avr-avai-total strong {
    color: #0071c2;
}

.avr-avai-advance {
    margin-bottom: 16px;
    font-size: 0.95em;
    color: #666;
}

.avr-avai-cta {
    display: inline-block;
    margin-top: 8px;
}

/* Pagina Partner e sconti: fuori dalla card gigante, più card in riga */
.avr-area-content.avr-partners-content {
    max-width: none;
    border: none;
    box-shadow: none;
    padding: 20px
}

.avr-partner-list-section { margin-bottom: 2rem; }
.avr-partner-section-title { font-size: 1.25rem; margin-bottom: 1rem; color: #0071c2; }
/* Filtro categoria partner */
.avr-partner-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}
.avr-partner-filter-label { font-size: 0.95rem; font-weight: 600; color: #333; margin-right: 0.25rem; }
.avr-partner-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}
.avr-partner-filter-btn:hover { border-color: #0071c2; color: #0071c2; }
.avr-partner-filter-btn.avr-partner-filter-active {
    background: #0071c2;
    border-color: #0071c2;
    color: #fff;
}
.avr-partner-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    align-items: start;
}
@media (min-width: 769px) {
    .avr-partner-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}
.avr-partner-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; background: #f9f9f9; border-radius: 8px; border-left: 4px solid #E3F2FD; }
.avr-partner-card {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    border-left: 4px solid #0071c2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.avr-partner-card-info { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; flex: 0 0 auto; }
.avr-partner-card-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.avr-partner-toggle-codes.avr-user-btn-link {
    padding: 0.4em 0.6em;
    margin: -0.4em -0.6em;
}
.avr-partner-toggle-codes.avr-user-btn-link:hover,
.avr-partner-toggle-codes.avr-user-btn-link:focus {
    background: rgba(0, 113, 194, 0.1);
    color: #005a9e;
}
.avr-partner-generate-form { margin-top: 1rem; padding: 1rem; background: #f9f9f9; border-radius: 8px; min-width: 0; }
.avr-partner-form-intro { margin: 0 0 1rem; font-size: 0.95em; color: #555; }
.avr-partner-form-fields { min-width: 0; }
.avr-partner-form-fields .avr-user-field { margin-bottom: 1rem; min-width: 0; }
.avr-field-hint { display: block; margin-top: 0.35rem; font-size: 0.85em; color: #666; }
.avr-partner-form-fields .avr-partner-form-submit { margin-top: 1rem; }
.avr-partner-image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    border-radius: 10px;
    object-fit: contain;
    background: #f5f5f5;
}
.avr-partner-info { flex: 1; min-width: 0; }
.avr-partner-name { font-weight: 600; font-size: 1.1rem; display: block; margin-bottom: 0.25rem; }
.avr-partner-category { font-size: 0.9em; color: #666; display: block; margin-bottom: 0.5rem; }
.avr-partner-desc-wrap { margin: 0.5rem 0 0; font-size: 0.95em; color: #555; }
.avr-partner-desc-short,
.avr-partner-desc-full { margin: 0; }
.avr-partner-desc-full { display: none; }
.avr-partner-desc-wrap.avr-partner-desc-expanded .avr-partner-desc-short { display: none; }
.avr-partner-desc-wrap.avr-partner-desc-expanded .avr-partner-desc-full { display: block; }
.avr-partner-read-more {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.9em;
    color: #0071c2;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}
.avr-partner-read-more:hover { color: #005a9e; }
.avr-partner-desc-wrap.avr-partner-desc-no-toggle .avr-partner-read-more { display: none; }
.avr-partner-code-dates { margin: 0.25rem 0 0; font-size: 0.85em; color: #666; }
.avr-partner-code-result { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #eee; }
.avr-partner-qr-box { display: inline-block; margin: 0.5rem 0; }
.avr-partner-qr-box.avr-partner-qr-small { margin-right: 1rem; }
.avr-partner-code-text { margin: 0.5rem 0; font-size: 0.95em; }
.avr-partner-download-qr { display: inline-block; margin-top: 0.5rem; color: #0071c2; text-decoration: underline; }
.avr-partner-codes-list.avr-loading { min-height: 40px; color: #666; }
.avr-partner-code-item { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.avr-partner-no-codes { margin: 0; color: #666; font-size: 0.95em; }
.avr-partner-code-validated {
    margin: 0.35rem 0 0;
    font-size: 0.9em;
    color: #0a5;
    font-weight: 600;
}
.avr-partner-download-pdf-inline {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: #0071c2;
    text-decoration: underline;
}
.avr-partner-download-pdf-inline:hover { color: #005a9e; }
.avr-partner-download-pdf { margin-left: 0.5rem; }
/* Dropdown prenotazione custom (responsive, niente overflow) */
.avr-partner-booking-dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.avr-partner-booking-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    font-family: inherit;
}
.avr-partner-booking-trigger:hover { border-color: #999; }
.avr-partner-booking-trigger:focus {
    outline: 2px solid #0071c2;
    outline-offset: 2px;
}
.avr-partner-booking-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.avr-partner-booking-trigger-icon {
    flex-shrink: 0;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
}
.avr-partner-booking-dropdown.avr-partner-booking-open .avr-partner-booking-trigger-icon {
    border-top: none;
    border-bottom: 6px solid #555;
}
.avr-partner-booking-list {
    position: absolute;
    z-index: 100;
    top: 100%;
    left: 0;
    right: 0;
    margin: 2px 0 0;
    padding: 0;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    box-sizing: border-box;
}
.avr-partner-booking-list[aria-hidden="true"] { display: none; }
.avr-partner-booking-option {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
    color: #333;
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    font-family: inherit;
}
.avr-partner-booking-option:last-child { border-bottom: none; }
.avr-partner-booking-option:hover,
.avr-partner-booking-option:focus {
    background: #f0f7fc;
    outline: none;
}
.avr-partner-booking-option.avr-partner-booking-option-selected {
    background: #E3F2FD;
    font-weight: 600;
}
.avr-partner-no-bookings { margin: 0; color: #666; }
.avr-partner-no-active-bookings {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: #E3F2FD;
    border-left: 4px solid #E3F2FD;
    border-radius: 4px;
}
.avr-partner-no-active-bookings p { margin: 0; color: #333; }
.avr-partner-btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

/* Pagine partner (login + validazione + recupero password): con header singolo in flow, poco padding sopra il contenuto */
body.avr-partner-login-page .avr-user.avr-partner-login,
body.avr-partner-validate-page .avr-user.avr-partner-validate,
body.avr-partner-recupero-page .avr-user.avr-partner-recupero {
    padding-top: 2rem;
    min-height: 50vh;
    box-sizing: border-box;
}
body.avr-partner-login-page .avr-user-container,
body.avr-partner-validate-page .avr-user-container,
body.avr-partner-recupero-page .avr-user-container {
    max-width: 480px;
    margin: 0 auto;
}

/* Nome e logo partner nella landing validazione */
.avr-partner-landing-brand {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e8e4d8;
}
.avr-partner-landing-brand img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.5rem;
}
.avr-partner-landing-brand .avr-partner-landing-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

/* Landing validazione QR: loading, risultato, cronologia */
.avr-partner-validate-loading { text-align: center; padding: 2rem 0; }
.avr-partner-validate-loading[aria-hidden="true"] { display: none; }
.avr-partner-validate-loading-text { margin: 0 0 1rem; color: #555; }
.avr-partner-validate-spinner {
    width: 40px; height: 40px; margin: 0 auto;
    border: 3px solid #e8e4d8; border-top-color: #0071c2;
    border-radius: 50%; animation: avr-spin 0.8s linear infinite;
}
@keyframes avr-spin { to { transform: rotate(360deg); } }
.avr-partner-validate-result { padding: 1.5rem 0; }
.avr-partner-validate-result[aria-hidden="true"] { display: none; }
.avr-partner-validate-result-box { margin: 0 0 1.5rem; padding: 1.75rem 2rem; border-radius: 12px; border: 2px solid; }
.avr-partner-validate-result-box[aria-hidden="true"] { display: none; }
.avr-partner-validate-result-box.avr-validate-success { background: #e8f5e9; border-color: #2e7d32; }
.avr-partner-validate-result-box.avr-validate-error { background: #ffebee; border-color: #c62828; }
.avr-partner-validate-result-box .avr-partner-validate-message { margin: 0 0 0.75rem; font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.avr-partner-validate-result-box.avr-validate-success .avr-partner-validate-message { color: #1b5e20; }
.avr-partner-validate-result-box.avr-validate-error .avr-partner-validate-message { color: #b71c1c; }
.avr-partner-validate-details { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.08); }
.avr-partner-validate-detail-line { margin: 0.4rem 0; font-size: 1rem; }
.avr-partner-validate-detail-label { font-weight: 600; color: #333; }
.avr-partner-validate-detail-value { color: #555; }
.avr-partner-validate-message.avr-success { color: #1b5e20; font-weight: 700; }
.avr-partner-validate-message.avr-error { color: #b71c1c; }
.avr-partner-validate-actions { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.avr-user-btn-secondary { background: #555; color: #fff; }
.avr-user-btn-secondary:hover { background: #333; }
.avr-partner-logout { color: #0071c2; text-decoration: underline; }
.avr-partner-validate-history { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e8e4d8; }
.avr-partner-validate-history-title { font-size: 1.1rem; margin-bottom: 1rem; color: #333; }
.avr-partner-validate-history-list { min-height: 60px; }
.avr-partner-validate-history-loading { margin: 0; color: #666; font-size: 0.95em; }
.avr-partner-validate-history-item { padding: 0.75rem; margin-bottom: 0.5rem; background: #f9f9f9; border-radius: 6px; border-left: 4px solid #E3F2FD; font-size: 0.95em; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.avr-partner-validate-history-item-text { flex: 1; min-width: 0; }
.avr-partner-validate-history-item-link { background: none; border: none; color: #0071c2; text-decoration: underline; cursor: pointer; font-size: 0.9em; padding: 0.25rem 0; flex-shrink: 0; }
.avr-partner-validate-history-item-link:hover { color: #004a82; }
.avr-partner-validate-history-empty { margin: 0; color: #666; font-size: 0.95em; }
.avr-partner-validate-history-load-more { margin-top: 1rem; margin-bottom: 0; }

.avr-user-field-checkbox { margin-bottom: 1rem; }
.avr-user-field-checkbox label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.avr-user-field-checkbox input { margin: 0; }

/* --- Chat Assistente AI (area utente) --- */
/* Pagina chat: niente card, usa tutta la larghezza del main */
/* Pagina chat: niente modale, full-bleed */
body.avr-area-utente .avr-area-main.avr-area-main-chat {
    padding: 0;
    background: #f7f7f8;
    width: 100%;
}
.avr-area-content.avr-chat-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.avr-chat-page .avr-user-title { display: none; }
.avr-chat-layout {
    display: flex;
    flex-direction: row;
    gap: 0;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    min-height: 360px;
    margin-top: 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}
.avr-chat-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    min-height: 0;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}
.avr-chat-sidebar-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    flex: 1;
    padding: 12px 0;
}
.avr-chat-sidebar-header { padding: 0 12px 12px; border-bottom: 1px solid #e5e5e5; }
.avr-chat-btn-new {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #0071c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
}
.avr-chat-btn-new:hover { background: #005a9e; color: #fff; }
/* Prenotazione di riferimento in evidenza */
.avr-chat-booking-select-wrap {
    padding: 12px;
    margin: 0 8px 8px;
    border: 2px solid #0071c2;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f8ff 100%);
    box-shadow: 0 1px 3px rgba(0, 113, 194, 0.15);
}
.avr-chat-booking-label {
    display: block;
    font-size: 0.9rem;
    color: #004a7a;
    margin-bottom: 8px;
    font-weight: 600;
}
.avr-chat-booking-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid #0071c2;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}
.avr-chat-booking-select:focus {
    border-color: #005a9e;
    outline: 2px solid rgba(0, 113, 194, 0.4);
    outline-offset: 2px;
}
.avr-chat-list-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    flex: 1;
    min-height: 80px;
    color: #666;
    font-size: 0.95rem;
}
.avr-chat-list-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-top-color: #0071c2;
    border-radius: 50%;
    animation: avr-spin 0.7s linear infinite;
}
.avr-chat-list-loading-text { margin: 0; }
.avr-chat-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.avr-chat-list-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
}
.avr-chat-list-item:hover { background: #eee; }
.avr-chat-list-item-active {
    background: #e8f0f8;
    border-left-color: #0071c2;
    font-weight: 500;
}
.avr-chat-list-empty {
    margin: 0;
    padding: 12px 16px;
    color: #666;
    font-size: 0.9rem;
    display: none;
}
.avr-chat-main-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
    overflow: hidden;
}
.avr-chat-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 56px;
    padding: 14px 16px 14px 12px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.avr-chat-btn-menu {
    display: none;
    position: absolute;
    left: 10px;
    /* top: 50%; */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
.avr-chat-btn-menu:hover { background: #f0f0f0; }
.avr-chat-btn-menu-icon {
    width: 22px;
    height: 18px;
    position: relative;
    display: block;
}
.avr-chat-btn-menu-icon::before,
.avr-chat-btn-menu-icon::after,
.avr-chat-btn-menu-icon { background: #333; border-radius: 1px; }
.avr-chat-btn-menu-icon::before,
.avr-chat-btn-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
}
.avr-chat-btn-menu-icon { height: 2px; top: 50%; margin-top: -1px; }
.avr-chat-btn-menu-icon::before { top: -6px; }
.avr-chat-btn-menu-icon::after { top: 6px; }
.avr-chat-header-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    padding: 0 56px;
}
@media (min-width: 769px) {
    .avr-chat-header-title { padding: 0; }
}
.avr-chat-main {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.avr-chat-placeholder {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    overflow-y: auto;
}
.avr-chat-placeholder-text {
    margin: 0;
    font-size: 1.25rem;
    color: #666;
}
.avr-chat-conversation {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.avr-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.avr-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
}
.avr-chat-msg-user {
    align-self: flex-end;
    background: #0071c2;
    color: #fff;
}
.avr-chat-msg-assistant {
    align-self: flex-start;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #e0e0e0;
}
.avr-chat-msg-time {
    display: block;
    font-size: 0.75rem;
    color: rgba(0,0,0,0.5);
    margin-top: 4px;
}
.avr-chat-msg-user .avr-chat-msg-time { color: rgba(255,255,255,0.8); }
.avr-chat-msg-failed { opacity: 0.9; font-size: 0.9em; }
.avr-chat-msg-content a,
.avr-chat-msg-link {
    color: #005a9e;
    text-decoration: underline;
}
.avr-chat-msg-content a:hover,
.avr-chat-msg-link:hover {
    color: #003d6b;
    text-decoration: underline;
}
.avr-chat-msg-user .avr-chat-msg-content a,
.avr-chat-msg-user .avr-chat-msg-link {
    color: rgba(255,255,255,0.95);
    text-decoration: underline;
}
.avr-chat-msg-user .avr-chat-msg-content a:hover,
.avr-chat-msg-user .avr-chat-msg-link:hover {
    color: #fff;
}
.avr-chat-form {
    flex-shrink: 0;
    padding: 12px 16px 16px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}
.avr-chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 8px 12px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.avr-chat-input-wrap:focus-within {
    border-color: #c5c5c5;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.avr-chat-form textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 4px 10px 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    line-height: 1.4;
}
.avr-chat-form textarea::placeholder {
    color: #8e8e93;
}
.avr-chat-form textarea:focus {
    outline: none;
}
.avr-chat-btn-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-self: center;
    flex-shrink: 0;
    transition: background 0.2s, opacity 0.2s;
}
.avr-chat-btn-send:hover:not(:disabled) { background: #000; color: #fff; }
.avr-chat-btn-send:disabled { opacity: 0.5; cursor: not-allowed; }
.avr-chat-btn-send .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.avr-chat-btn-send-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.avr-chat-btn-send-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.avr-chat-drawer-backdrop {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.avr-chat-layout.avr-chat-drawer-open .avr-chat-drawer-backdrop {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    body.avr-chat-drawer-open { overflow: hidden; }
    .avr-chat-layout {
        height: calc(100vh - 95px);
        max-height: calc(100vh - 95px);
        min-height: 100%;
    }
    .avr-chat-btn-menu { display: flex; }
    .avr-chat-main-wrap { flex: 1; min-width: 0; }
    .avr-chat-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        min-width: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 20;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    .avr-chat-layout.avr-chat-drawer-open .avr-chat-sidebar {
        transform: translateX(0);
    }
    .avr-chat-drawer-backdrop {
        display: block;
        pointer-events: none;
    }
    .avr-chat-layout.avr-chat-drawer-open .avr-chat-drawer-backdrop {
        pointer-events: auto;
    }
}
