/* ============================================================
   Adotta.me — Design System
   Re-skinned to the real Adotta.me identity (warm purple/blue).
   Bootstrap 5.3 (CDN) + Boxicons (CDN) + Baloo 2 / Nunito (Google Fonts).
   ============================================================ */

/* Bootstrap 5.3 ships no min-width utility; define the one we rely on so
   `text-truncate` flex children can actually shrink (else they overflow and
   clip without an ellipsis — see the messages inbox rows). */
.min-w-0 { min-width: 0 !important; }

:root {
    /* --- Adotta.me brand palette (warm, friendly — purple/blue) --- */
    --ado-viola: #8367f0;          /* primary purple accent */
    --ado-viola-strong: #903af9;   /* deeper purple */
    --ado-blue: #6fafe2;           /* friendly blue */
    --ado-ink: #272b41;            /* body text / headings */
    /* "muted" is only DARKER ink, never a light grey: never put a pale grey
       (e.g. the old #9299b8) as text on white/light backgrounds — keep it
       near-black for contrast. */
    --ado-muted: #4a4f66;          /* secondary text — near-black, not pale grey */
    --ado-border: #e3e6ef;         /* soft border */
    --ado-soft: #f5f7fc;           /* soft section background */

    /* legacy aliases kept so older rules still resolve */
    --ado-primary: var(--ado-viola);
    --ado-primary-dark: var(--ado-viola-strong);
    --ado-accent: #f5548e;
    --ado-body: var(--ado-ink);
    --ado-bg-soft: var(--ado-soft);

    /* --- Silicon tokens used by ported CSS, mapped to the brand --- */
    --si-primary: var(--ado-viola);
    --si-primary-rgb: 131, 103, 240;
    --si-gray-600: var(--ado-muted);
    --si-gray-900: var(--ado-ink);
    --si-body-color: var(--ado-ink);
    --si-emphasis-color: var(--ado-ink);
    --si-border-color: var(--ado-border);

    /* --- Bootstrap overrides so default components match the brand --- */
    --bs-primary: #8367f0;
    --bs-primary-rgb: 131, 103, 240;
    --bs-link-color: var(--ado-viola);
    --bs-link-color-rgb: 131, 103, 240;
    --bs-link-hover-color: var(--ado-viola-strong);
    --bs-body-color: var(--ado-ink);
    --bs-body-font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-heading-font-family: 'Baloo 2', system-ui, sans-serif;
    --bs-emphasis-color: var(--ado-ink);

    /* --- Shadow system (soft, neutral) --- */
    --neo-shadow-xs: 0 1px 2px rgba(39, 43, 65, 0.03), 0 1px 3px rgba(0, 0, 0, 0.04);
    --neo-shadow-sm: 0 2px 4px rgba(39, 43, 65, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
    --neo-shadow-md: 0 4px 8px rgba(39, 43, 65, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    --neo-shadow-lg: 0 8px 16px rgba(39, 43, 65, 0.08), 0 8px 32px rgba(0, 0, 0, 0.05);
    --neo-shadow-xl: rgba(39,43,65,.02) 0 2px 1px, rgba(39,43,65,.02) 0 4px 2px, rgba(39,43,65,.03) 0 8px 4px, rgba(39,43,65,.04) 0 16px 8px, rgba(39,43,65,.03) 0 32px 16px;

    --neo-bg-soft: var(--ado-soft);
}

body {
    font-family: var(--bs-body-font-family);
    color: var(--ado-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    color: var(--ado-ink);
    letter-spacing: 0;
    font-weight: 700;
}

.viola {
    color: var(--ado-viola);
}

.text-muted {
    color: var(--ado-muted) !important;
}

/* ============================================================
   BRAND GRADIENT BUTTONS (ported from legacy)
   ============================================================ */

.btn-gradient-one {
    background: linear-gradient(to right, #6fafe2, #903af9);
    border: none;
    color: #fff;
    box-shadow: 0 3px 12px rgba(144, 58, 249, 0.28);
}

.btn-gradient-one:hover,
.btn-gradient-one:focus {
    background: linear-gradient(to right, #903af9, #6fafe2);
    color: #fff;
    box-shadow: 0 5px 18px rgba(144, 58, 249, 0.38);
    transform: translateY(-1px);
}

.btn-gradient-two {
    background: linear-gradient(to right top, #2db261, #49c157, #67d04a, #86de36, #a8eb12);
    border: none;
    color: #fff;
    text-shadow: 2px 2px 3px #3d6e19;
    box-shadow: 0 3px 12px rgba(45, 178, 97, 0.28);
}

.btn-gradient-two:hover,
.btn-gradient-two:focus {
    background: linear-gradient(to right bottom, #2db261, #49c157, #67d04a, #86de36, #a8eb12);
    color: #fff;
    box-shadow: 0 5px 18px rgba(45, 178, 97, 0.38);
    transform: translateY(-1px);
}

/* ============================================================
   HEADER
   ============================================================ */

.neo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0;
    background: none;
    transition: transform 0.3s ease;
}

.neo-header.is-hidden {
    transform: translateY(-100%);
}

.neo-header__surface {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 78px;
    padding: 0.875rem 1.5rem;
    border: none;
    border-bottom: 1px solid var(--ado-border);
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(39, 43, 65, 0.06);
}

.neo-header__logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.neo-header__brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
    color: var(--ado-ink);
    text-decoration: none;
}

.neo-header__brand:hover {
    color: var(--ado-ink);
}

.neo-header__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ado-primary) 0%, var(--ado-primary-dark) 100%);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(131, 103, 240, 0.22);
}

.neo-header__logo--compact {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.3rem;
}

.neo-header__brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.neo-header__title {
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ado-ink);
    line-height: 1.1;
}

.neo-header__subtitle {
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    color: #7B847F;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.neo-header__search {
    flex: 1;
    max-width: 520px;
    margin-left: auto;
    position: relative;
}

.neo-header .neo-search-form {
    position: relative;
}

.neo-header .neo-search-form .input-group,
.neo-search-form .input-group {
    align-items: stretch;
    border: 1px solid var(--ado-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--ado-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.neo-search-form .form-select,
.neo-search-form .form-control {
    min-height: 50px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.neo-search-form .form-select {
    max-width: 11rem;
    border-right: 1px solid var(--ado-border);
    font-weight: 700;
    color: var(--ado-ink);
}

.neo-search-form .form-control {
    padding-left: 1rem;
}

.neo-search-form .form-control:focus,
.neo-search-form .form-select:focus {
    box-shadow: none;
}

.neo-search-form .btn,
.neo-mobile-menu__search .btn {
    min-width: 56px;
    padding-inline: 1.1rem;
    border-radius: 0;
    margin: 4px;
    border-radius: 999px;
}

.neo-header__nav {
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.neo-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #3B423F;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.neo-header__link:hover,
.neo-header__link:focus {
    background: var(--ado-soft);
    border-color: var(--ado-border);
    color: var(--ado-viola);
    transform: translateY(-1px);
}

.neo-header__link.is-active {
    background: rgba(131, 103, 240, 0.08);
    border-color: rgba(131, 103, 240, 0.2);
    color: var(--ado-viola);
}

.neo-header__dropdown .dropdown-toggle::after {
    margin-left: 0.1rem;
}

.neo-header__dropdown-menu {
    border: 1px solid var(--ado-border);
    border-radius: 16px;
    box-shadow: var(--neo-shadow-lg);
    padding: 0.4rem;
}

.neo-header__dropdown-menu .dropdown-item {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.neo-header__dropdown-menu .dropdown-item:hover,
.neo-header__dropdown-menu .dropdown-item:focus {
    background: rgba(131, 103, 240, 0.1);
    color: var(--ado-viola);
}

.neo-header__dropdown-menu .dropdown-item i {
    color: var(--ado-viola);
}

.neo-header__link i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.neo-header__actions {
    margin-left: 0.25rem;
}

.neo-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.neo-header__account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--ado-border);
    background: #fff;
    color: var(--ado-ink);
    font-size: 1.5rem;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.neo-header__account {
    color: var(--ado-viola);
}

.neo-header__account:hover {
    color: var(--ado-viola-strong);
    border-color: rgba(131, 103, 240, 0.35);
    background: rgba(131, 103, 240, 0.06);
    transform: translateY(-1px);
}

/* --- Logged-in user pill (avatar + name + role + chevron) --- */
.neo-header__user .dropdown-toggle::after { display: none; }

.neo-header__userbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.7rem 0.3rem 0.35rem;
    border: 1px solid var(--ado-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ado-ink);
    text-decoration: none;
    line-height: 1;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.neo-header__userbtn:hover,
.neo-header__userbtn:focus-visible,
.neo-header__user.show .neo-header__userbtn {
    border-color: rgba(131, 103, 240, 0.35);
    background: rgba(131, 103, 240, 0.05);
    box-shadow: 0 6px 16px rgba(131, 103, 240, 0.14);
    transform: translateY(-1px);
}

.neo-header__avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8367f0, #5b8def);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.neo-header__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.neo-header__avatar-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f5548e;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(245, 84, 142, 0.4);
}

.neo-header__usermeta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}

.neo-header__username {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ado-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.neo-header__userrole {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ado-viola);
    opacity: 0.85;
    white-space: nowrap;
}

.neo-header__userchev {
    font-size: 1.15rem;
    color: #9aa0ab;
    transition: transform 0.18s ease;
}

.neo-header__user.show .neo-header__userchev {
    transform: rotate(180deg);
}

.neo-header__item-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f5548e;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.neo-header__toggle {
    margin-left: auto;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--ado-border);
    border-radius: 16px;
    background: rgba(244, 248, 246, 0.92);
    color: var(--ado-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 12px 24px rgba(31, 42, 40, 0.08);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.neo-header__toggle:hover,
.neo-header__toggle:focus {
    background: #fff;
    border-color: rgba(131, 103, 240, 0.3);
    color: var(--ado-viola);
    transform: translateY(-1px);
}

.neo-header-spacer {
    height: 110px; /* fallback, JS overrides with exact measurement */
}

/* ============================================================
   BARRA IMPERSONIFICAZIONE (admin switch_user)
   Sopra l'header fisso (1030), sotto l'offcanvas Bootstrap (1045)
   così su mobile il menu la copre e resta chiudibile.
   ============================================================ */
.ado-impersonate-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1035;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    background: #272b41;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
}
.ado-impersonate-bar__txt {
    overflow: hidden;
    text-overflow: ellipsis;
}
.ado-impersonate-bar__exit {
    flex-shrink: 0;
    background: #fff;
    color: #272b41;
    border-radius: 999px;
    padding: 2px 14px;
    font-weight: 700;
    text-decoration: none;
}
.ado-impersonate-bar__exit:hover { background: #e9e9f2; color: #272b41; }
/* Spingi header + contenuto sotto la barra da 40px quando si impersona. */
body.is-impersonating .neo-header { top: 40px; }
body.is-impersonating #main-content { padding-top: 40px; }

/* ============================================================
   MOBILE MENU (offcanvas)
   ============================================================ */

.neo-mobile-menu {
    width: min(100%, 24rem);
    border-radius: 28px 0 0 28px;
    border-left: 1px solid var(--ado-border);
    background: linear-gradient(180deg, #ffffff 0%, var(--ado-soft) 100%);
    box-shadow: -18px 0 42px rgba(39, 43, 65, 0.12);
}

.neo-mobile-menu__logo-img {
    height: 36px;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
}

.neo-mobile-menu__header {
    padding: 1.25rem 1.25rem 0.5rem;
    align-items: flex-start;
}

.neo-mobile-menu__brand {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding-right: 1rem;
}

.neo-mobile-menu__brand .offcanvas-title {
    color: var(--ado-ink);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.neo-mobile-menu__hint {
    max-width: 15rem;
    color: #7B847F;
    font-size: 0.9rem;
    line-height: 1.5;
}

.neo-mobile-menu .btn-close {
    margin: 0;
    padding: 0.75rem;
    border-radius: 14px;
    background-color: rgba(244, 248, 246, 0.95);
    box-shadow: inset 0 0 0 1px var(--ado-border);
}

.neo-mobile-menu__search {
    margin-bottom: 1.25rem;
}

.neo-mobile-menu__search .input-group {
    align-items: stretch;
    border: 1px solid var(--ado-border);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 16px 32px rgba(31, 42, 40, 0.05);
}

.neo-mobile-menu__search .form-control {
    min-height: 54px;
    border: none;
    box-shadow: none;
}

.neo-mobile-menu__nav {
    display: grid;
    gap: 0.75rem;
}

.neo-mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--ado-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ado-ink);
    text-decoration: none;
    box-shadow: 0 16px 28px rgba(31, 42, 40, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.neo-mobile-menu__link:hover,
.neo-mobile-menu__link:focus {
    color: var(--ado-viola);
    transform: translateY(-1px);
    border-color: rgba(131, 103, 240, 0.28);
    box-shadow: 0 20px 32px rgba(39, 43, 65, 0.08);
}

.neo-mobile-menu__link.is-active {
    border-color: rgba(131, 103, 240, 0.32);
    background: rgba(131, 103, 240, 0.08);
    color: var(--ado-viola);
}

.neo-mobile-menu__link--cta {
    background: linear-gradient(to right, #6fafe2, #903af9);
    color: #fff;
    border-color: transparent;
}

.neo-mobile-menu__link--green {
    background: linear-gradient(to right top, #2db261, #49c157, #67d04a, #86de36, #a8eb12);
    text-shadow: 1px 1px 2px #3d6e19;
}

.neo-mobile-menu__link--cta .neo-mobile-menu__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.neo-mobile-menu__link--cta:hover,
.neo-mobile-menu__link--cta:focus {
    color: #fff;
}

.neo-mobile-menu__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(131, 103, 240, 0.1);
    color: var(--ado-viola);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.neo-mobile-menu__text {
    flex: 1;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.neo-mobile-menu__chevron {
    color: var(--ado-muted);
    font-size: 1.125rem;
}

@media (max-width: 1199.98px) {
    .neo-header__search {
        max-width: none;
    }
}

@media (max-width: 991.98px) {
    .neo-header__surface {
        min-height: 72px;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .neo-header__surface {
        gap: 0.75rem;
        min-height: 68px;
        padding: 0.65rem 0.75rem;
    }

    .neo-header__logo {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 1.3rem;
    }

    .neo-header__title {
        font-size: 1rem;
    }

    .neo-header__toggle {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 1.35rem;
    }

    .neo-mobile-menu {
        width: 100%;
        border-radius: 0;
    }
}

/* ============================================================
   SEARCH PILL — mobile floating search
   ============================================================ */

.search-pill {
    position: fixed;
    bottom: 24px;
    right: 16px;
    z-index: 1040;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Su /ricerca convive col FAB "Filtri": due floating button sulla pagina che
   È la ricerca. Nascondiamo il pill globale lì (stesso approccio del form). */
body:has(.ricerca-mobile-fab) .search-pill { display: none !important; }

.search-pill.is-scrolling-down {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.search-pill__btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #6fafe2, #903af9);
    box-shadow: 0 10px 24px rgba(144, 58, 249, 0.32), 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-pill__btn:hover {
    transform: scale(1.06);
    box-shadow: 0 14px 28px rgba(144, 58, 249, 0.4), 0 3px 8px rgba(0, 0, 0, 0.08);
}

.search-pill__btn:active {
    transform: scale(0.98);
}

.search-pill__panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem;
    border-top: 1px solid var(--ado-border);
    box-shadow: 0 -12px 36px rgba(31, 42, 40, 0.12);
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
}

.search-pill__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.search-pill__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin: 0;
}

.search-pill__close {
    border: none;
    background: none;
    padding: 0.5rem;
    color: var(--si-gray-600);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.search-pill__close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--si-gray-900);
}

/* Specie segmented control — 🐾 / 🐶 / 🐱 */
.search-pill__specie {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--ado-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.85rem;
    background: var(--ado-soft);
}

.search-pill__seg {
    flex: 1 1 0;
    text-align: center;
    padding: 0.65rem 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ado-ink);
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-pill__seg + .btn-check + .search-pill__seg {
    border-left: 1.5px solid var(--ado-border);
}

.btn-check:checked + .search-pill__seg {
    background: linear-gradient(135deg, #6fafe2, #903af9);
    color: #fff;
}

.search-pill__submit {
    margin-top: 0.85rem;
    padding-block: 0.7rem;
    font-weight: 700;
}

/* The luogo suggestions flow inside the bottom sheet instead of floating. */
.search-pill__panel .comune-ac__results {
    position: static;
    margin-top: 0.4rem;
    box-shadow: none;
}

/* ============================================================
   HERO
   ============================================================ */

.ado-hero {
    position: relative;
    background: linear-gradient(120deg, #5fa0e0 0%, #903af9 100%);
    background: url('/images/bkg.png') center/cover no-repeat,
                linear-gradient(120deg, #5fa0e0 0%, #903af9 100%);
    color: #fff;
    /* No overflow:hidden here: it would clip the luogo-autocomplete dropdown
       at the hero's bottom edge (it vanishes "under" the mission section). */
    padding: 4rem 0 4rem;
}

.ado-hero__inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ado-hero__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 12px rgba(39, 43, 65, 0.18);
}

.ado-hero__card {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: 0 18px 48px rgba(39, 43, 65, 0.22);
}

.ado-hero__card .form-select,
.ado-hero__card .form-control {
    min-height: 54px;
    font-weight: 600;
    border-radius: 14px;
}

.ado-hero__submit {
    min-height: 54px;
    font-weight: 700;
    border-radius: 14px;
}

@media (min-width: 768px) {
    .ado-hero {
        padding: 6rem 0 5.5rem;
    }
    .ado-hero__title {
        font-size: 3.25rem;
    }
}

@media (max-width: 575.98px) {
    .ado-hero__title {
        font-size: 2rem;
    }
}

/* ============================================================
   MISSIONE
   ============================================================ */

.ado-mission {
    background: #fff;
    padding: 3.5rem 0;
}

.ado-mission__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.ado-mission__title strong {
    font-weight: 800;
}

.ado-mission__lead {
    color: var(--ado-ink);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.ado-mission__cta {
    font-weight: 700;
    padding-inline: 2rem;
}

.ado-mission__img {
    width: clamp(11rem, 32vw, 16rem);
    height: auto;
}

@media (max-width: 767.98px) {
    .ado-mission__copy {
        text-align: center;
    }
}

/* ============================================================
   IN EVIDENZA — head
   ============================================================ */

.ado-evidenza__head {
    text-align: center;
    margin-bottom: 2rem;
}

.ado-evidenza__head h2 {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.875rem;
    margin-bottom: 0.35rem;
}

.ado-evidenza__sub {
    color: var(--ado-muted);
    font-size: 1.0625rem;
    margin: 0;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.neo-section {
    padding: 3rem 0;
}

.neo-section-soft {
    padding: 3rem 0;
    background: var(--ado-bg-soft);
    border-top: 1px solid var(--ado-border);
    border-bottom: 1px solid var(--ado-border);
}

@media (min-width: 768px) {
    .neo-section,
    .neo-section-soft {
        padding: 4rem 0;
    }
}

.neo-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.neo-section-header h2 {
    margin: 0;
    font-weight: 800;
    font-size: 1.375rem;
}

.neo-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(131, 103, 240, 0.12) 0%, rgba(144, 58, 249, 0.18) 100%);
    color: var(--ado-viola);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============================================================
   BUTTONS — brand
   ============================================================ */

.btn {
    min-height: 48px;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.btn-lg {
    min-height: 54px;
    padding: 0.85rem 1.75rem;
}

.btn-primary {
    --bs-btn-bg: var(--ado-viola);
    --bs-btn-border-color: var(--ado-viola);
    --bs-btn-hover-bg: var(--ado-viola-strong);
    --bs-btn-hover-border-color: var(--ado-viola-strong);
    --bs-btn-active-bg: var(--ado-viola-strong);
    --bs-btn-active-border-color: var(--ado-viola-strong);
    --bs-btn-disabled-bg: var(--ado-viola);
    --bs-btn-disabled-border-color: var(--ado-viola);
    background: linear-gradient(to right, #6fafe2, #903af9);
    border: none;
    box-shadow: 0 3px 10px rgba(144, 58, 249, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(to right, #903af9, #6fafe2);
    box-shadow: 0 5px 18px rgba(144, 58, 249, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(144, 58, 249, 0.3);
}

.btn-outline-primary {
    --bs-btn-color: var(--ado-viola);
    --bs-btn-border-color: var(--ado-viola);
    --bs-btn-hover-bg: var(--ado-viola);
    --bs-btn-hover-border-color: var(--ado-viola);
    --bs-btn-active-bg: var(--ado-viola-strong);
    border-width: 1.5px;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    border: 1px solid var(--ado-border);
    border-radius: 16px;
    box-shadow: var(--neo-shadow-sm);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-body {
    padding: 1.25rem;
}

a.card,
.card.lift {
    cursor: pointer;
}

a.card:hover,
.card.lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--neo-shadow-lg);
}

/* Animal cards */
.ado-card {
    position: relative;
    color: var(--ado-ink);
    background: #fff;
    border: 1px solid var(--ado-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(39, 43, 65, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ado-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(131, 103, 240, 0.18);
}

.ado-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #eef0fb 0%, #e6ecfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ado-card__placeholder {
    font-size: 3rem;
    color: rgba(131, 103, 240, 0.4);
}

/* Foto morta (CDN 403/404): l'onerror dell'<img> marca il wrapper is-broken —
   via la foto/gallery, dentro il placeholder zampa (reso ma nascosto). */
.ado-card__media .ado-card__placeholder--fallback {
    display: none;
}
.ado-card__media.is-broken .ado-card__placeholder--fallback {
    display: block;
}
.ado-card__media.is-broken .ado-card__gallery,
.ado-card__media.is-broken > .ado-card__img {
    display: none;
}

.ado-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.ado-card__name {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ado-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.ado-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--ado-soft);
    border: 1px solid var(--ado-border);
    color: var(--ado-ink);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

.ado-chip i {
    color: var(--ado-viola);
    font-size: 0.95rem;
    vertical-align: -1px;
}

/* "Aspetta da N mesi" — warm visibility nudge for long-listed animals */
.ado-chip--attesa {
    background: rgba(232, 62, 140, 0.08);
    border-color: rgba(232, 62, 140, 0.35);
}

.ado-chip--attesa i {
    color: #e83e8c;
}

.ado-card__loc {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ado-ink);
    margin-bottom: 0.85rem;
}

.ado-card__loc i {
    color: var(--ado-viola);
    vertical-align: -1px;
}

.ado-card__dot {
    color: var(--ado-muted);
    margin: 0 0.15rem;
}

.ado-card__time {
    color: var(--ado-muted);
    font-weight: 600;
}

/* Publisher footer — focal point */
.ado-card__publisher {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ado-border);
}

.ado-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ado-border);
}

.ado-card__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ado-viola) 0%, var(--ado-viola-strong) 100%);
}

.ado-card__pubname {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ado-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 0 1 auto;
}

.ado-card__verified {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ado-viola-strong);
    background: rgba(131, 103, 240, 0.12);
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}

.ado-card__verified i {
    font-size: 0.95rem;
}

/* ============================================================
   FORM INPUTS
   ============================================================ */

.form-control,
.form-select {
    min-height: 48px;
    font-size: 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--ado-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ado-viola);
    box-shadow: 0 0 0 4px rgba(131, 103, 240, 0.12);
}

/* ============================================================
   BADGES / LINKS / ALERTS / LISTS
   ============================================================ */

.badge.bg-primary {
    background: linear-gradient(45deg, #f5548e, #903af9) !important;
}

a {
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.alert {
    border-radius: 14px;
    border: none;
    box-shadow: var(--neo-shadow-sm);
}

.list-group {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--neo-shadow-sm);
    border: 1px solid var(--ado-border);
}

.list-group-item {
    min-height: 48px;
    padding: 1rem 1.25rem;
    border-color: var(--ado-border);
}

/* ============================================================
   FOOTER
   ============================================================ */

.neo-footer {
    margin-top: 4rem;
    background: #ffffff;
    border-top: 1px solid var(--ado-border);
    color: var(--ado-muted);
    padding: 3rem 0 0;
    font-size: 0.9375rem;
}

.neo-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.neo-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.neo-footer__logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.neo-footer__claim {
    color: var(--ado-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 18rem;
    margin: 0;
}

.neo-footer__heading {
    color: var(--ado-ink);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.neo-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.neo-footer__links li {
    margin-bottom: 0.4rem;
}

.neo-footer__links a {
    color: var(--ado-muted);
    text-decoration: none;
    transition: color 0.15s ease;
    font-size: 0.9rem;
}

.neo-footer__links a:hover {
    color: var(--ado-viola);
}

.neo-footer__bottom {
    border-top: 1px solid var(--ado-border);
    padding: 1.25rem 0;
    text-align: center;
    color: var(--ado-muted);
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .neo-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem;
    }
    .neo-footer__brand-col {
        grid-column: 1 / -1;
    }
}

/* ============================================================
   MOBILE RESPONSIVE + ACCESSIBILITY
   ============================================================ */

@media (max-width: 767.98px) {
    .container, .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
}

:focus-visible {
    outline: 3px solid var(--ado-viola);
    outline-offset: 2px;
}

/* Stepper percorso adozione (Inviata → Accettata → Completata).
   flex-start + margin-top sulla linea: col label sotto il dot, align center
   centrerebbe la linea sull'intera colonna (dot+label) facendola cadere più
   in basso del centro del dot. */
.ado-stepper { display: flex; align-items: flex-start; gap: .25rem; margin: 0 0 1.4rem; }
.ado-stepper__step { display: flex; flex-direction: column; align-items: center; gap: .35rem; flex: 0 0 auto; }
.ado-stepper__dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #eceef3; color: #a7adbd; font-size: 1.15rem; border: 2px solid #eceef3; transition: all .2s ease; }
.ado-stepper__label { font-size: .78rem; color: #a7adbd; font-weight: 700; }
.ado-stepper__line { flex: 1 1 auto; height: 3px; border-radius: 3px; background: #eceef3; min-width: 20px; margin-top: calc((36px - 3px) / 2); }
.ado-stepper__step.is-done .ado-stepper__dot { background: #eafaf1; color: #1aa06d; border-color: #bfead3; }
.ado-stepper__step.is-done .ado-stepper__label { color: #272b41; }
.ado-stepper__step.is-current .ado-stepper__dot { background: linear-gradient(135deg, #8367f0, #5b8def); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(131,103,240,.32); }
.ado-stepper__step.is-current .ado-stepper__label { color: #5b4bb0; }
.ado-stepper__line.is-done { background: #bfead3; }
.ado-stepper--compact { margin-bottom: .3rem; }
.ado-stepper--compact .ado-stepper__dot { width: 26px; height: 26px; font-size: .9rem; }
.ado-stepper--compact .ado-stepper__label { font-size: .68rem; }
.ado-stepper--compact .ado-stepper__line { margin-top: calc((26px - 3px) / 2); }

/* Riga richiesta NON letta (era referenziata ma mai definita): accento a sinistra. */
.ado-ric--nuova { border-left: 4px solid #f5548e !important; background: #fff6fa; }

/* Dialog di conferma brand (sostituisce il confirm() nativo del browser). */
.ado-confirm { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 1rem; }
.ado-confirm__backdrop { position: absolute; inset: 0; background: rgba(39, 43, 65, .55); backdrop-filter: blur(2px); }
.ado-confirm__card {
    position: relative; background: #fff; border-radius: 1.25rem; padding: 1.75rem;
    max-width: 440px; width: 100%; box-shadow: 0 18px 48px rgba(39, 43, 65, .25);
    animation: ado-confirm-in .18s ease-out;
}
@keyframes ado-confirm-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ado-confirm__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: #efeafc; color: #8367f0; margin-bottom: .9rem; }
.ado-confirm--danger .ado-confirm__icon { background: #fdecf2; color: #d63163; }
.ado-confirm__title { font-weight: 700; color: #272b41; font-size: 1.05rem; margin-bottom: .35rem; }
.ado-confirm__detail { color: #272b41; opacity: .8; font-size: .95rem; margin-bottom: 1.1rem; }
.ado-confirm__field { margin: 0 0 1.1rem; text-align: left; }
.ado-confirm__actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }
.ado-confirm__ok--danger { background: #d63163; color: #fff; }
.ado-confirm__ok--danger:hover { background: #b82753; color: #fff; }
.ado-confirm-open { overflow: hidden; }

/* Toggle mostra/nascondi password (registrazione, login): icona dentro il campo. */
.ado-pw { position: relative; }
.ado-pw__btn {
    position: absolute; top: 0; right: 0; height: 100%; width: 2.9rem;
    display: grid; place-items: center; border: 0; background: transparent;
    color: #6b6f82; font-size: 1.25rem; cursor: pointer;
}
.ado-pw__btn:hover { color: var(--ado-viola); }
.ado-pw input { padding-right: 2.9rem; }

html {
    scroll-behavior: smooth;
    /* Full-bleed bands (e.g. the mobile savebar) use viewport-width margins;
       clip any resulting horizontal overshoot. `clip` (unlike `hidden`) is not a
       scroll container, so it never breaks position: sticky. */
    overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ============================================================
   PERCHÉ SCEGLIERE — feature cards
   ============================================================ */

.ado-feature {
    height: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid var(--ado-border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--neo-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ado-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(131, 103, 240, 0.18);
}

.ado-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    background: linear-gradient(135deg, #6fafe2 0%, #903af9 100%);
    box-shadow: 0 10px 24px rgba(144, 58, 249, 0.3);
}

.ado-feature__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--ado-ink);
}

.ado-feature__text {
    color: var(--ado-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   ULTIME RECENSIONI — review cards
   ============================================================ */

.ado-review {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ado-border);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--neo-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ado-review:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(131, 103, 240, 0.18);
}

.ado-review__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ado-review__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ado-border);
}

.ado-review__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ado-viola) 0%, var(--ado-viola-strong) 100%);
}

.ado-review__who {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.ado-review__name {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ado-ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ado-review__name:hover {
    color: var(--ado-viola);
}

.ado-review__verified {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    align-self: flex-start;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ado-viola-strong);
    background: rgba(131, 103, 240, 0.12);
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.ado-review__verified i {
    font-size: 0.95rem;
}

.ado-review__stars {
    color: #ffc107;
    font-size: 1.15rem;
    line-height: 1;
    margin-bottom: 0.85rem;
}

.ado-review__stars i {
    vertical-align: middle;
}

.ado-review__text {
    color: var(--ado-ink);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ado-review__foot {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ado-muted);
}

/* ============================================================
   CONTATORE ADOZIONI — celebratory band
   ============================================================ */

.ado-counter {
    background: url('/images/bkg.png') center/cover no-repeat,
                linear-gradient(120deg, #5fa0e0 0%, #903af9 100%);
    padding: 4rem 0;
}

.ado-counter__box {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 24px 60px rgba(39, 43, 65, 0.28);
}

.ado-counter__number {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    line-height: 1;
    color: var(--ado-viola-strong);
    font-size: clamp(2.75rem, 9vw, 4.5rem);
}

.ado-counter__label {
    margin: 0.6rem 0 0;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ado-ink);
}

/* ============================================================
   RICERCA / SEARCH RESULTS PAGE
   ============================================================ */

.ricerca-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ricerca-topbar__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    color: var(--ado-viola);
    margin-bottom: 0.25rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.ricerca-topbar__count {
    color: var(--ado-muted);
    font-weight: 600;
}

.ricerca-topbar__count strong {
    color: var(--ado-ink);
}

/* Sort — segmented pill bar */
.sort-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 0.15rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sort-bar::-webkit-scrollbar {
    display: none;
}

.sort-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ado-ink);
    background: #fff;
    border: 1.5px solid var(--ado-border);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sort-pill:hover {
    border-color: var(--ado-viola);
    color: var(--ado-viola);
}

.sort-pill.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--ado-viola) 0%, var(--ado-viola-strong) 100%);
    box-shadow: 0 6px 16px rgba(131, 103, 240, 0.3);
}

/* Sidebar */
.ricerca-sidebar {
    background: #fff;
    border: 1.5px solid var(--ado-border);
    border-radius: 18px;
    padding: 1.25rem;
    position: sticky;
    top: calc(var(--neo-header-h, 76px) + 1rem);
}

.ricerca-sidebar__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ricerca-sidebar__title i {
    color: var(--ado-viola);
}

.ricerca-filtri__group {
    border: none;
    padding: 0;
    margin: 0 0 1.1rem;
    border-bottom: 1px solid var(--ado-border);
    padding-bottom: 1rem;
}

.ricerca-filtri__group:last-of-type {
    border-bottom: none;
}

.ricerca-filtri__legend {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--ado-muted);
    margin-bottom: 0.55rem;
}

.ricerca-filtri__hint {
    font-size: 0.9rem;
    color: #272b41;
    opacity: 0.85;
    margin-top: 0.45rem;
}

.ricerca-filtri .form-check-input:checked {
    background-color: var(--ado-viola);
    border-color: var(--ado-viola);
}

.ricerca-filtri .form-check-input:focus {
    border-color: var(--ado-viola);
    box-shadow: 0 0 0 0.2rem rgba(131, 103, 240, 0.18);
}

/* Tap target comodi: ogni riga filtro alta ≥44px con label cliccabile a tutta
   larghezza e checkbox/radio un filo più grandi (era input 16px, righe strette). */
.ricerca-filtri .form-check {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0;
    margin-bottom: 0;
}
.ricerca-filtri .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin: 0;
    flex: 0 0 auto;
}
.ricerca-filtri .form-check-label {
    flex: 1 1 auto;
    padding: 0.4rem 0;
    cursor: pointer;
}

.ricerca-filtri__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

/* Counter-CTA: while the live "Mostra N annunci" count is refreshing, dim the
   button so the number reads as "updating" instead of flipping abruptly. */
.ricerca-filtri__actions [data-filtri-target="submit"] {
    transition: opacity 0.15s ease;
}
.ricerca-filtri__actions [data-filtri-target="submit"].is-counting {
    opacity: 0.6;
}

.ricerca-filtri__reset {
    color: var(--ado-muted);
    font-weight: 600;
    text-decoration: none;
}

/* Chips */
.ricerca-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ricerca-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(131, 103, 240, 0.1);
    color: var(--ado-viola-strong);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}

.ricerca-chip__x {
    color: var(--ado-viola-strong);
    text-decoration: none;
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 700;
}

.ricerca-chip__x:hover {
    color: var(--ado-viola);
}

.ricerca-chips__clear {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ado-muted);
    text-decoration: underline;
}

/* Card extras (search page) */
.ado-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 0.4s ease;
}

.ado-card:hover .ado-card__img {
    transform: scale(1.06);
}

.ado-card__staffetta {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ado-viola-strong);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Boosted-listing chip: same spot as the staffetta one (they never coexist
   visually: evidenza wins the row, staffetta slides below it). */
.ado-card__evidenza {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    background: linear-gradient(135deg, #8367f0, #903af9);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(131, 103, 240, 0.4);
}
.ado-card__evidenza + .ado-card__staffetta { top: 2.5rem; }

/* In-adoption (riservato) chip: amber, top-left; a reserved animal stays in the
   catalog until the adoption is confirmed. Pushes a co-occurring staffetta down. */
.ado-card__riservato {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    background: #fff4d6;
    color: #8a5b00;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.ado-card__riservato + .ado-card__staffetta { top: 2.5rem; }

.ado-card__heart {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ado-viola);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: var(--neo-shadow-sm);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: color 0.2s ease, transform 0.2s ease;
}

.ado-card__heart:hover {
    color: #f5548e;
    transform: scale(1.1);
}

/* Saved (favorited) state — filled purple/pink heart. */
.ado-card__heart.is-active {
    color: #f5548e;
    background: rgba(255, 255, 255, 0.96);
}

.ado-card__heart.is-active:hover {
    transform: scale(1.1);
}

/* Header "Preferiti" count badge. */
.neo-header__count {
    background: linear-gradient(135deg, #8367f0, #903af9);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    min-width: 1.1rem;
    text-align: center;
}

.neo-header__link--preferiti {
    position: relative;
    gap: 0.35rem;
}

/* Preferiti page accents. */
.text-gradient-heart {
    color: #f5548e;
    vertical-align: -2px;
}

.preferiti-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(131, 103, 240, 0.08);
    border: 1px solid rgba(131, 103, 240, 0.2);
    color: #4b3fa8;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.preferiti-cta a {
    color: var(--ado-viola);
    font-weight: 700;
}

.ricerca-verified {
    color: var(--ado-blue);
    vertical-align: -1px;
}

/* Empty state */
.ricerca-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    border: 1.5px dashed var(--ado-border);
    border-radius: 18px;
}

.ricerca-empty i {
    font-size: 3rem;
    color: rgba(131, 103, 240, 0.45);
}

.ricerca-empty__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    color: var(--ado-ink);
    margin: 0.75rem 0 0.35rem;
}

.ricerca-empty__text {
    color: var(--ado-muted);
    max-width: 26rem;
    margin: 0 auto 1.25rem;
}

/* Pagination */
.ricerca-pagination {
    margin-top: 2.5rem;
}

.ricerca-pagination .pagination {
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ricerca-pagination .page-link {
    color: var(--ado-viola);
    border-radius: 999px;
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1.5px solid var(--ado-border);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

/* The pills are separated by a gap, so every one is a full round pill.
   Override Bootstrap's first/last-child rule that squares the inner corners
   (prev looked flat-right, next flat-left — the rounding on the "wrong" side). */
.ricerca-pagination .page-item:first-child .page-link,
.ricerca-pagination .page-item:last-child .page-link {
    border-radius: 999px;
}

.ricerca-pagination .page-link:hover {
    border-color: var(--ado-viola);
    color: var(--ado-viola-strong);
    background: rgba(131, 103, 240, 0.08);
}

.ricerca-pagination .page-item.active .page-link {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--ado-viola) 0%, var(--ado-viola-strong) 100%);
    box-shadow: 0 6px 16px rgba(131, 103, 240, 0.3);
}

.ricerca-pagination .page-item.disabled .page-link {
    color: var(--ado-muted);
    background: transparent;
    border-color: var(--ado-border);
    opacity: 0.6;
}

/* Specie toggle pills */
.specie-toggles {
    display: flex;
    gap: 0.6rem;
}

.specie-toggle {
    flex: 1 1 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.7rem 0.4rem;
    border: 1.5px solid var(--ado-border);
    border-radius: 14px;
    background: #fff;
    color: var(--ado-ink);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.specie-toggle i {
    font-size: 1.4rem;
    color: var(--ado-viola);
    transition: color 0.2s ease;
}

.specie-toggle:hover {
    border-color: var(--ado-viola);
}

.specie-toggle.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--ado-viola) 0%, var(--ado-viola-strong) 100%);
    box-shadow: 0 6px 16px rgba(131, 103, 240, 0.3);
}

.specie-toggle.is-active i {
    color: #fff;
}

/* Comune autocomplete */
.comune-ac {
    position: relative;
}

.comune-ac__field {
    position: relative;
}

.comune-ac__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ado-viola);
    font-size: 1.2rem;
    pointer-events: none;
}

.comune-ac__input {
    padding-left: 2.4rem;
}

.comune-ac__results {
    position: absolute;
    /* Sopra la action bar sticky di /aggiungi-annuncio (z-index 30, dopo nel
       DOM): a pari indice copriva le voci centrali della lista. */
    z-index: 40;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--ado-border);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(39, 43, 65, 0.14);
    overflow: hidden;
    max-height: 18rem;
    overflow-y: auto;
}

.comune-ac__sigla {
    color: var(--ado-muted);
    font-weight: 500;
}

.comune-ac__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ado-ink);
    cursor: pointer;
}

.comune-ac__item i {
    color: var(--ado-viola);
    font-size: 1.05rem;
}

.comune-ac__item strong {
    color: var(--ado-viola-strong);
}

.comune-ac__item:hover,
.comune-ac__item.is-active {
    background: rgba(131, 103, 240, 0.1);
}

.comune-ac__empty {
    padding: 0.75rem 0.85rem;
    color: var(--ado-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Two-line luogo item: name + "GE · Genova" / "Provincia" sub-label */
.comune-ac__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.comune-ac__sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: #272b41;
    opacity: 0.7;
}

/* Inside the header pill / mobile-menu search the .input-group clips its
   children (overflow hidden for the rounded pill), so the results dropdown
   anchors to the form instead of the .comune-ac wrapper. */
.neo-search-form,
.neo-mobile-menu__search {
    position: relative;
}

.neo-search-form .comune-ac,
.neo-mobile-menu__search .comune-ac {
    position: static;
    /* Same flex trick as Bootstrap's .input-group > .form-control: without
       width:1% the wrapper forces the search button to wrap to a new row. */
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.neo-search-form .input-group,
.neo-mobile-menu__search .input-group {
    flex-wrap: nowrap;
    /* Bootstrap makes .input-group position:relative, so it — not the form —
       becomes the results dropdown's containing block and clips it with the
       pill's overflow:hidden. Static lets the dropdown anchor to the relative
       .neo-search-form / .neo-mobile-menu__search and escape the clip. */
    position: static;
}

.neo-search-form .comune-ac__field,
.neo-mobile-menu__search .comune-ac__field {
    position: static;
    height: 100%;
}

.neo-search-form .comune-ac__field .form-control,
.neo-mobile-menu__search .comune-ac__field .form-control {
    height: 100%;
    width: 100%;
}

.neo-search-form .comune-ac__results,
.neo-mobile-menu__search .comune-ac__results {
    z-index: 1050;
}

/* ============================================================
   LANDING — internal linking SEO ("ricerche correlate")
   ============================================================ */
.landing-links {
    margin-top: 3rem;
}

.landing-links__block + .landing-links__block {
    margin-top: 2rem;
}

.landing-links__title {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin-bottom: 0.75rem;
}

.landing-links__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.landing-links__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(131, 103, 240, 0.08);
    color: var(--ado-viola-strong);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.landing-links__link:hover {
    background: rgba(131, 103, 240, 0.16);
}

.landing-links__count {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.7;
}

/* ============================================================
   RICERCA — "Vicino a…" expansion
   ============================================================ */
.ricerca-espansione {
    margin-top: 2.5rem;
    padding: 1.75rem 1.5rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(111, 175, 226, 0.08), rgba(144, 58, 249, 0.07));
    border: 1.5px dashed rgba(131, 103, 240, 0.35);
}

.ricerca-espansione__head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.ricerca-espansione__icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6fafe2, #903af9);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(144, 58, 249, 0.28);
}

.ricerca-espansione__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin-bottom: 0.1rem;
}

.ricerca-espansione__sub {
    font-size: 0.95rem;
    color: #272b41;
    opacity: 0.85;
}

.ricerca-espansione__cta {
    font-weight: 700;
}

/* ============================================================
   ASSOCIAZIONI — directory cards
   ============================================================ */
.asso-filtri {
    margin-bottom: 1.75rem;
}

.asso-card {
    position: relative;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff;
    border: 1.5px solid var(--ado-border);
    border-radius: 18px;
    padding: 1.1rem;
    height: 100%;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.asso-card:hover {
    box-shadow: 0 14px 30px rgba(131, 103, 240, 0.16);
    transform: translateY(-2px);
}

.asso-card__avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.asso-card__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6fafe2, #903af9);
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    font-family: 'Baloo 2', cursive;
}

.asso-card__name {
    font-family: 'Baloo 2', cursive;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin-bottom: 0.15rem;
}

.asso-card__verified {
    color: var(--ado-viola);
    vertical-align: -2px;
}

.asso-card__stars {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #272b41;
    margin-bottom: 0.3rem;
}

.asso-card__stars i {
    color: #f5a623;
}

.asso-card__meta {
    font-size: 0.9rem;
    color: #272b41;
    opacity: 0.85;
}

.asso-card__meta i {
    color: var(--ado-viola);
    vertical-align: -1px;
}

/* ============================================================
   RICERCA — "Avvisami quando arriva" + pagine alert
   ============================================================ */
.alert-ricerca {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 22px;
    background: #fff;
    border: 1.5px solid rgba(131, 103, 240, 0.4);
    box-shadow: 0 14px 30px rgba(131, 103, 240, 0.12);
}

.alert-ricerca__head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.alert-ricerca__icon,
.alert-pagina__icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6fafe2, #903af9);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(144, 58, 249, 0.28);
}

.alert-ricerca__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin-bottom: 0.1rem;
}

.alert-ricerca__text {
    font-size: 0.95rem;
    color: #272b41;
    opacity: 0.85;
}

.alert-ricerca__actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.alert-ricerca__alt {
    font-size: 0.9rem;
    color: var(--ado-viola);
    text-decoration: underline;
    padding: 0.25rem 0;
}

.alert-ricerca__email {
    width: 100%;
    max-width: 30rem;
}

.alert-ricerca__error {
    font-size: 0.9rem;
}

.alert-ricerca__done {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--ado-ink);
    font-size: 1rem;
}

.alert-ricerca__done i {
    color: #2eb872;
    font-size: 1.4rem;
}

.alert-ricerca__privacy {
    font-size: 0.9rem;
    color: #272b41;
    opacity: 0.7;
}

/* Public confirm/manage pages */
.alert-pagina {
    background: #fff;
    border: 1.5px solid var(--ado-border);
    border-radius: 22px;
    padding: 2.25rem 1.75rem;
    box-shadow: 0 16px 34px rgba(39, 43, 65, 0.08);
}

.alert-pagina__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ado-ink);
    margin: 0.9rem 0 0.5rem;
}

.alert-pagina__text {
    font-size: 1rem;
    color: #272b41;
}

.alert-pagina__dati {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1.2rem;
    margin: 1.5rem 0 0;
}

.alert-pagina__dati dt {
    font-weight: 700;
    color: var(--ado-viola);
    font-size: 0.95rem;
}

.alert-pagina__dati dd {
    margin: 0;
    color: #272b41;
    font-size: 0.95rem;
}

/* Mobile FAB + offcanvas */
.ricerca-mobile-fab {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.25rem;
    z-index: 1040;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, var(--ado-blue), var(--ado-viola-strong));
    box-shadow: 0 8px 22px rgba(131, 103, 240, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ricerca-offcanvas {
    width: 100% !important;
    max-width: 420px;
}

.ricerca-offcanvas .offcanvas-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ado-viola);
}

.ricerca-offcanvas .ricerca-filtri__actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 0.75rem;
    margin-bottom: -1rem;
    padding-bottom: 1rem;
}

/* ============================================================
   ANNUNCIO — pagina dettaglio (Step 7)
   ============================================================ */

.ado-detail {
    padding-top: 1.25rem;
}

/* Breadcrumb */
.ado-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--ado-muted);
    margin-bottom: 1.25rem;
}
.ado-breadcrumb a {
    color: var(--ado-muted);
    text-decoration: none;
}
.ado-breadcrumb a:hover {
    color: var(--ado-viola);
}
.ado-breadcrumb i {
    font-size: 1rem;
    opacity: 0.6;
}
.ado-breadcrumb [aria-current] {
    color: var(--ado-ink);
    font-weight: 600;
    max-width: 16rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Heading */
.ado-detail__head {
    margin-bottom: 1.25rem;
}
.ado-stato {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to right, #f5548e, #903af9);
    margin-bottom: 0.6rem;
}
.ado-stato.is-disponibile { background: linear-gradient(to right, #2db261, #67d04a); }
.ado-stato.is-valutazione { background: linear-gradient(to right, #f7a01d, #f5548e); }
.ado-stato.is-riservato   { background: linear-gradient(to right, #f7a01d, #903af9); }
.ado-stato.is-adottato    { background: linear-gradient(to right, #6fafe2, #903af9); }
.ado-stato.is-sospeso,
.ado-stato.is-ritirato    { background: linear-gradient(to right, #9299b8, #5b6178); }

.ado-detail__title {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: var(--ado-ink);
    margin: 0 0 0.5rem;
    line-height: 1.1;
}
.ado-detail__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    color: var(--ado-muted);
    font-size: 0.9rem;
}
.ado-detail__sub span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.ado-detail__sub i {
    font-size: 1.05rem;
    color: var(--ado-viola);
}
.ado-detail__staffetta {
    color: var(--ado-viola-strong) !important;
    font-weight: 700;
}

.ado-detail__salvato,
.ado-detail__attesa {
    color: #e83e8c !important;
    font-weight: 700;
}

/* Gallery */
.ado-gallery {
    margin-bottom: 1.5rem;
    outline: none;
}
.ado-gallery__stage {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--ado-soft);
    aspect-ratio: 4 / 3;
    box-shadow: 0 14px 40px rgba(39, 43, 65, 0.12);
    /* Horizontal drag is ours (swipe fra le foto), vertical scroll stays the page's. */
    touch-action: pan-y;
}
.ado-gallery__main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
    will-change: transform;
}
/* While the finger is down the photo must track it 1:1, with no easing. */
.ado-gallery__main.is-dragging {
    transition: none;
}
@media (prefers-reduced-motion: reduce) {
    .ado-gallery__main {
        transition: none;
    }
}
.ado-gallery__stage--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ado-gallery__stage--empty i {
    font-size: 5rem;
    color: var(--ado-border);
}
/* Foto principale morta (CDN 403/404): via l'<img>, dentro l'icona di specie.
   La classe is-broken è messa/tolta dagli onerror/onload dell'<img> main. */
.ado-gallery__fallback {
    display: none;
}
.ado-gallery.is-broken .ado-gallery__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--ado-border);
}
.ado-gallery.is-broken .ado-gallery__main {
    visibility: hidden;
}
/* Thumbnail morta: inutile mostrarla (selezionerebbe una foto rotta). */
.ado-gallery__thumb.is-broken {
    display: none;
}
.ado-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ado-ink);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(39, 43, 65, 0.18);
    transition: background 0.15s ease, transform 0.15s ease;
}
.ado-gallery__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}
.ado-gallery__nav--prev { left: 0.8rem; }
.ado-gallery__nav--next { right: 0.8rem; }
.ado-gallery__count {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    background: rgba(39, 43, 65, 0.65);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.ado-gallery__thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}
.ado-gallery__thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: var(--ado-soft);
    transition: border-color 0.15s ease;
}
.ado-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ado-gallery__thumb.is-active {
    border-color: var(--ado-viola);
}

/* Quick facts */
.ado-facts {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem 1rem;
    background: var(--ado-soft);
    border-radius: 16px;
}
.ado-facts li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.35rem 0.25rem;
}
.ado-facts i {
    font-size: 1.3rem;
    color: var(--ado-viola);
}
.ado-facts span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ado-muted);
}
.ado-facts strong {
    color: var(--ado-ink);
    font-size: 0.95rem;
}

/* Generic content block */
.ado-block {
    margin-bottom: 1.75rem;
}
.ado-block__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.3rem;
    color: var(--ado-ink);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.ado-block__title i {
    color: var(--ado-viola);
}
.ado-block__text {
    color: var(--ado-ink);
    line-height: 1.7;
    font-size: 1rem;
}

/* Accordion (salute/carattere) */
.ado-accordion {
    margin-bottom: 1.75rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(39, 43, 65, 0.07);
}
.ado-accordion .accordion-item {
    border: 1px solid var(--ado-border);
    border-bottom: none;
}
.ado-accordion .accordion-item:last-child {
    border-bottom: 1px solid var(--ado-border);
}
.ado-accordion .accordion-button {
    font-family: 'Baloo 2', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ado-ink);
    gap: 0.5rem;
}
.ado-accordion .accordion-button:not(.collapsed) {
    color: var(--ado-viola);
    background: var(--ado-soft);
    box-shadow: none;
}
.ado-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(131, 103, 240, 0.2);
}
.ado-accordion .accordion-button i {
    font-size: 1.25rem;
    color: var(--ado-viola);
}

.ado-health {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}
.ado-health li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--ado-ink);
}
.ado-health li i {
    font-size: 1.2rem;
}
.ado-health li.is-yes i { color: #2db261; }
.ado-health li.is-no { color: var(--ado-muted); font-weight: 500; }
.ado-health li.is-no i { color: var(--ado-border); }
/* "Non specificato": neutro, non un divieto — il dato semplicemente manca. */
.ado-health li.is-unknown { color: var(--ado-muted); font-weight: 500; }
.ado-health li.is-unknown i { color: var(--ado-border); }
.ado-health li.is-info i { color: var(--ado-viola); }
.ado-health small { color: var(--ado-muted); font-weight: 500; }

.ado-traits {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}
.ado-trait {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--ado-soft);
    border-radius: 12px;
}
.ado-trait > i {
    font-size: 1.2rem;
    color: var(--ado-viola);
}
.ado-trait__label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--ado-ink);
}
.ado-trait__val {
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.ado-trait--si .ado-trait__val { color: #2db261; }
.ado-trait--no .ado-trait__val { color: #f5548e; }
.ado-trait--non_so .ado-trait__val { color: var(--ado-muted); }

.ado-energy {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.ado-energy__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--ado-ink);
}
.ado-energy__label i { color: var(--ado-viola); }
.ado-energy__dots i {
    font-size: 0.9rem;
    color: var(--ado-border);
    margin-right: 0.15rem;
}
.ado-energy__dots i.is-on { color: var(--ado-viola); }

/* Sidebar */
.ado-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.ado-publisher {
    background: #fff;
    border: 1px solid var(--ado-border);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(39, 43, 65, 0.08);
}
.ado-publisher__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.ado-publisher__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.ado-publisher__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ado-blue), var(--ado-viola-strong));
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    font-weight: 700;
}
.ado-publisher__id {
    display: flex;
    flex-direction: column;
}
.ado-publisher__name {
    font-weight: 700;
    color: var(--ado-ink);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.ado-publisher__name i {
    color: var(--ado-viola);
    font-size: 1.1rem;
}
.ado-publisher__role {
    font-size: 0.9rem;
    color: var(--ado-muted);
}
.ado-publisher__since {
    font-size: 0.9rem;
    color: var(--ado-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 1rem;
}
.ado-cta {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
}
.ado-cta-hint {
    font-size: 0.9rem;
    color: var(--ado-muted);
    text-align: center;
    margin: 0.6rem 0 0;
}
.ado-cta-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: var(--ado-soft);
    color: var(--ado-ink);
    font-weight: 600;
    font-size: 0.9rem;
}
.ado-cta-note i { color: var(--ado-viola); font-size: 1.2rem; }
.ado-segnala {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    color: var(--ado-muted);
    font-size: 0.9rem;
    text-decoration: none;
}
.ado-segnala:hover { color: #f5548e; }

.ado-safety {
    display: flex;
    gap: 0.6rem;
    padding: 1rem;
    background: var(--ado-soft);
    border-radius: 16px;
}
.ado-safety i {
    font-size: 1.6rem;
    color: var(--ado-viola);
    flex: 0 0 auto;
}
.ado-safety p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ado-muted);
    line-height: 1.5;
}

/* Related */
.ado-related {
    margin-top: 2.5rem;
}
.ado-related--wide {
    border-top: 1px solid var(--ado-border);
    padding-top: 2rem;
}
.ado-related__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.4rem;
    color: var(--ado-ink);
    margin-bottom: 1.25rem;
}
.ado-related__more {
    margin: 1.25rem 0 0;
}
.ado-related__more a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ado-viola);
    text-decoration: none;
}
.ado-related__more a:hover {
    color: var(--ado-viola-strong);
    text-decoration: underline;
}
.ado-related__more a i {
    transition: transform .15s ease;
}
.ado-related__more a:hover i {
    transform: translateX(3px);
}

/* Mobile sticky CTA */
.ado-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: #fff;
    border-top: 1px solid var(--ado-border);
    box-shadow: 0 -6px 20px rgba(39, 43, 65, 0.1);
}
.ado-sticky-cta__pub {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.ado-sticky-cta__pub strong {
    color: var(--ado-ink);
    font-size: 0.95rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ado-sticky-cta .btn {
    flex: 0 0 auto;
}

/* keep content clear of the sticky bar on mobile */
@media (max-width: 991.98px) {
    .ado-detail { padding-bottom: 5rem; }
    .ado-sidebar { position: static; }

    /* Lift the global search-pill FAB above the sticky CTA so the two
       fixed-bottom elements don't collide on the detail page. */
    body:has(.ado-sticky-cta) .search-pill {
        bottom: calc(71px + 1rem);
    }
}

/* --- Toast dei preferiti ---
   Il link ai preferiti vive dentro l'hamburger: senza questo, chi salva un
   annuncio da mobile non ha modo di sapere dove l'ha salvato. Compare solo al
   salvataggio, si toglie da solo, e non copre le CTA fisse in basso. */
.ado-fav-toast {
    position: fixed;
    z-index: 1040; /* sopra la sticky CTA (1030) */
    /* Ancorato a sinistra, non centrato: a destra vive il FAB di ricerca
       (.search-pill, 56px a right:16px) e un toast centrato ci finiva sotto.
       La max-width tiene comunque il testo lontano dal FAB. */
    left: 1rem;
    width: fit-content;
    max-width: min(calc(100vw - 5.5rem), 420px);
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    transform: translateY(1rem);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem 0.7rem 0.9rem;
    border-radius: 14px;
    background: var(--ado-ink);
    color: #fff;
    box-shadow: 0 10px 30px rgba(39, 43, 65, 0.28);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ado-fav-toast.is-in {
    opacity: 1;
    transform: translateY(0);
}
.ado-fav-toast__ico {
    flex: 0 0 auto;
    color: var(--ado-accent);
    font-size: 1.1rem;
}
.ado-fav-toast__txt {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-right: auto;
    font-size: 0.9rem;
    line-height: 1.3;
}
.ado-fav-toast__txt small {
    font-size: 0.78rem;
    opacity: 0.75;
}
.ado-fav-toast__cta {
    flex: 0 0 auto;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.ado-fav-toast__cta:hover,
.ado-fav-toast__cta:focus {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
}
/* Stessa logica del search-pill: non collidere con la CTA fissa del dettaglio. */
body:has(.ado-sticky-cta) .ado-fav-toast {
    bottom: calc(71px + 1rem);
}
@media (min-width: 992px) {
    body:has(.ado-sticky-cta) .ado-fav-toast {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .ado-fav-toast {
        transition: opacity 0.2s ease;
        transform: translateY(0);
    }
}

.ado-modal__soon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ado-viola);
    font-weight: 600;
    margin: 0;
}
.ado-modal__soon i { font-size: 1.2rem; }

/* ---- Detail CTA: secondary chat link + channels + auth gate ---- */
.ado-cta-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--ado-viola-strong);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.ado-cta-chat:hover {
    background: var(--ado-soft);
    text-decoration: underline;
}

.ado-channels {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}
.ado-channels li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    background: var(--ado-soft);
    border-radius: 12px;
    color: var(--ado-ink);
    font-size: 0.92rem;
    line-height: 1.45;
}
.ado-channels li i {
    color: var(--ado-viola);
    font-size: 1.2rem;
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.ado-authgate .modal-header {
    border-bottom: none;
    padding-bottom: 0.25rem;
}
.ado-authgate .modal-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ado-ink);
    font-family: 'Baloo 2', cursive;
}
.ado-authgate .modal-title i { color: var(--ado-viola); }
.ado-authgate__lead {
    color: var(--ado-ink);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.ado-authgate__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}
.ado-authgate__primary {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
}
.ado-authgate__secondary {
    color: var(--ado-ink);
    font-size: 0.92rem;
    text-decoration: none;
}
.ado-authgate__secondary strong { color: var(--ado-viola-strong); }
.ado-authgate__secondary:hover strong { text-decoration: underline; }

/* ---- Card mini-gallery (up to 3 photos, Instagram-style dots) ---- */
.ado-card__gallery {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* No z-index on purpose: it must NOT create a stacking context, otherwise the
       nav arrows/dots get trapped below the stretched-link (z-index 1) and clicks
       fall through to the detail link. Arrows/dots use z-index 2 to sit above it. */
}
/* let vertical scroll through, capture horizontal for the drag */
.ado-card__media { touch-action: pan-y; }

/* Draggable photo track */
.ado-card__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}
.ado-card__track.is-dragging {
    transition: none; /* follow the pointer 1:1 while dragging */
}
.ado-card__slide {
    flex: 0 0 100%;
    height: 100%;
}
/* Inside the track the image is a normal flex child, not absolutely-filled. */
.ado-card__track .ado-card__img {
    position: static;
    inset: auto;
    transform: none;
    -webkit-user-drag: none;
    user-select: none;
}
.ado-card:hover .ado-card__track .ado-card__img {
    transform: none; /* the track moves, not the image — avoid the zoom fighting drag */
}
/* nav arrows: desktop hover only; mobile uses swipe + dots */
.ado-card__gnav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ado-ink);
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(39, 43, 65, 0.18);
    opacity: 0;
    pointer-events: none; /* invisible arrows must not steal clicks from the detail link */
    transition: opacity 0.18s ease, background 0.15s ease;
}
.ado-card__gnav--prev { left: 0.5rem; }
.ado-card__gnav--next { right: 0.5rem; }
.ado-card:hover .ado-card__gnav { opacity: 1; pointer-events: auto; }
.ado-card__gnav:hover { background: #fff; }
@media (hover: none) {
    /* touch devices: rely on swipe, keep the media clean */
    .ado-card__gnav { display: none; }
}

.ado-card__dots {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    pointer-events: none; /* only the dots themselves are interactive */
}
/* Scopato dentro .ado-card__dots: senza il genitore questa regola colpiva anche
   il separatore testuale "·" (stessa classe, definita prima nel file e quindi
   perdente nella cascata), che si vedeva come un pallino bianco con ombra. */
.ado-card__dots .ado-card__dot {
    pointer-events: auto;
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 3px rgba(39, 43, 65, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.ado-card__dots .ado-card__dot.is-active {
    background: #fff;
    transform: scale(1.35);
}

/* --- Content / trust pages (chi siamo, condizioni, privacy, contatti) --- */
.ado-page { background: var(--ado-soft, #f6f5ff); }
.ado-page__hero { padding: 3rem 0 2rem; text-align: center; }
.ado-page__hero h1 { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: #272b41; }
.ado-page__hero p { color: #272b41; opacity: .85; max-width: 640px; margin: .5rem auto 0; font-size: 1.05rem; }
.ado-prose { background: #fff; border-radius: 1.25rem; box-shadow: 0 6px 20px rgba(40,43,65,.06); padding: 2rem; }
.ado-prose h2 { font-family: 'Baloo 2', sans-serif; font-weight: 700; color: #272b41; font-size: 1.35rem; margin-top: 1.6rem; }
.ado-prose h2:first-child { margin-top: 0; }
.ado-prose p, .ado-prose li { color: #272b41; line-height: 1.7; }
.ado-prose__upd { color: #6b6f82; font-size: 0.95rem; }

/* --- Notifiche (bell feed + page) --- */
.ado-notif-list.ado-card { overflow: hidden; }
.ado-notif {
    display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem;
    text-decoration: none; color: #272b41; border-bottom: 1px solid #f0eef9; position: relative;
}
.ado-notif:last-child { border-bottom: 0; }
.ado-notif:hover { background: #f7f6fc; }
.ado-notif--unread { background: #f3f0ff; }
.ado-notif--unread:hover { background: #ece7ff; }
.ado-notif--compact { padding: .65rem .85rem; }
.ado-notif__icon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
}
.ado-notif__body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ado-notif__text { font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.ado-notif__time { color: var(--ado-muted); font-size: 0.9rem; }
/* Lato destro: dot "non letta" + chip CTA che esplicita l'azione al tap. */
.ado-notif__right { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; }
.ado-notif__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; }
.ado-notif__cta {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .1rem; white-space: nowrap;
    font-weight: 700; font-size: .82rem; color: #5b4bb0; background: #efeafc;
    border-radius: 999px; padding: .3rem .55rem .3rem .7rem;
}
.ado-notif__cta .bx { font-size: 1rem; }
.ado-notif--unread .ado-notif__cta { background: #8367f0; color: #fff; }
.ado-notif--compact .ado-notif__cta { font-size: .78rem; padding: .25rem .5rem .25rem .6rem; }
.ado-notif__empty { text-align: center; color: var(--ado-muted); padding: 2.5rem 1rem; }
.ado-notif__empty i { font-size: 2.5rem; color: #b7aee8; }
.ado-notif__empty p { margin: .4rem 0 0; }

/* Bell in header */
.neo-header__bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: #272b41; background: transparent; border: 0; cursor: pointer; }
/* Mobile bell sits right before the burger and absorbs the flex spacer. */
.neo-header__bell--mobile { margin-left: auto; width: 48px; height: 48px; }
.neo-header__bell--mobile + .neo-header__toggle { margin-left: 0; }

/* Avatar mobile: accesso rapido alla propria area dalla top-bar (parità desktop).
   Target touch ~46px; segue il campanello, precede l'hamburger. */
.neo-header__avatar--mobile { width: 46px; height: 46px; font-size: 1rem; text-decoration: none; }
/* Login mobile (anonimo): spinge sé stesso e l'hamburger a destra. */
.neo-header__account--mobile { margin-left: auto; width: 46px; height: 46px; }
/* L'avatar/login ora si frappone tra campanello e hamburger: annulla il
   margin-left:auto del toggle così il gruppo resta compatto a destra. */
.neo-header__avatar--mobile + .neo-header__toggle,
.neo-header__account--mobile + .neo-header__toggle { margin-left: 0; }
.neo-header__bell:hover { background: rgba(131,103,240,.1); }
.neo-header__bell i { font-size: 1.5rem; }
.neo-header__bell-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ff6b6b; color: #fff; font-size: 0.9rem; font-weight: 800; display: grid; place-items: center; }
.neo-header__notif-dropdown { width: 360px; max-width: 92vw; max-height: 70vh; overflow-y: auto; padding: 0; }
.neo-header__notif-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid #f0eef9; font-family: 'Baloo 2', sans-serif; font-weight: 700; }
.neo-header__notif-foot { padding: .6rem 1rem; text-align: center; border-top: 1px solid #f0eef9; }
.neo-header__stelle {
    display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .75rem; border-radius: 999px;
    background: #efeafc; color: #5b4bb0; font-weight: 800; font-size: .95rem; text-decoration: none; white-space: nowrap;
}
.neo-header__stelle:hover { background: #e1ddf5; color: #5b4bb0; }

/* --- Star-gift piggy bank on the listing detail --- */
.ado-regalo {
    background: linear-gradient(135deg, #f6f3ff, #efeafc);
    border: 1px solid #e1ddf5;
    border-radius: 1.1rem;
    padding: 1rem 1.1rem;
    margin: 1rem 0;
}
.ado-regalo__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.ado-regalo__title { font-family: 'Baloo 2', sans-serif; font-weight: 700; color: #272b41; }
.ado-regalo__ricevute { font-size: .9rem; font-weight: 700; color: #5b4bb0; white-space: nowrap; }
.ado-regalo__bar { height: 10px; border-radius: 999px; margin: .6rem 0 .35rem; background: #fff; }
.ado-regalo__bar .progress-bar { background: linear-gradient(90deg, #8367f0, #903af9); border-radius: 999px; transition: width .4s ease; }
.ado-regalo__hint { font-size: .9rem; color: #272b41; opacity: .8; }
.ado-regalo__festa { margin-top: .6rem; background: #eafaf1; color: #157347; font-weight: 700; border-radius: .8rem; padding: .55rem .8rem; }
.ado-regalo__owner { margin-top: .6rem; font-size: .92rem; color: #272b41; opacity: .85; }
.ado-regalo__owner a { color: #5b4bb0; font-weight: 700; }
.ado-regalo__bottoni { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.ado-regalo__saldo { margin-left: auto; font-size: .9rem; font-weight: 600; color: #272b41; opacity: .8; white-space: nowrap; }
.ado-regalo__errore { margin-top: .5rem; font-size: .92rem; font-weight: 600; color: #b02a37; }
.ado-regalo__errore a { color: #5b4bb0; }

/* Share-reward toast */
.ado-share { position: relative; }
.ado-share__toast {
    position: absolute; top: -1.9rem; right: 0;
    background: #272b41; color: #fff; font-size: .9rem; font-weight: 700;
    padding: .25rem .7rem; border-radius: 999px; white-space: nowrap;
    animation: ado-toast-pop .25s ease;
}
@keyframes ado-toast-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- AdSense container: clearly labelled, padded away from clickable cards --- */
.ado-adsense { margin: 1.5rem 0; padding: .75rem 0; }
.ado-adsense__label { font-size: .9rem; font-weight: 600; color: #272b41; opacity: .55; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }

/* --- Share row + lazy map on listing detail --- */
.ado-share { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.ado-share__label { font-weight: 700; color: #272b41; font-size: 0.95rem; }
.ado-share__btn {
    width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: var(--c, #8367f0); text-decoration: none;
}
.ado-share__btn:hover { filter: brightness(1.07); color: #fff; }
.ado-map { margin-top: 1rem; border-radius: 1rem; overflow: hidden; box-shadow: 0 6px 20px rgba(40,43,65,.06); }
.ado-map iframe { display: block; width: 100%; height: 220px; border: 0; }

/* ===== Chat: master-detail + thread ===== */
/* Two-pane layout: conversation list (master) + thread (detail). On desktop both
   show side by side and selecting a conversation swaps the detail without a page
   reload (quick switch). On mobile they become panels: the list, then the thread
   full-screen with a "back" bar. */
/* Desktop: one fixed-height "app" panel. The page itself doesn't scroll behind
   the chat — only the list and the thread body scroll, each with a thin, quiet
   scrollbar. List and detail share the same height (no more misaligned panes). */
/* Desktop: un unico pannello "app" (lista a sx + thread a dx con divisore),
   stile Messenger — niente più due card separate con gap. */
.ado-chat { display: flex; gap: 0; align-items: stretch; height: calc(100dvh - 210px); min-height: 460px;
    border: 1px solid #ece9fb; border-radius: 1.1rem; overflow: hidden; background: #fff; box-shadow: 0 6px 20px rgba(40,43,65,.06); }
.ado-chat__list { flex: 0 0 340px; display: flex; flex-direction: column; gap: .15rem; height: 100%; overflow-y: auto; padding: .5rem; border-right: 1px solid #ece9fb; }
.ado-chat__item { box-shadow: none !important; border-radius: .8rem !important; }
.ado-chat__item:hover { background: #f7f6fc; }
.ado-chat__detail { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; }
/* Il thread dentro il pannello è a filo: niente card arrotondata/ombra. */
.ado-chat__detail .ado-thread { border-radius: 0; box-shadow: none; }
.ado-chat__pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; }
/* Wraps the fetched fragment (thread card + optional "richiesta formale" block)
   so the card can flex to fill the pane while the extra block stays below it. */
.ado-chat__threadwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ado-chat__item.is-active { outline: 0; background: #efeafc; }
.ado-chat__placeholder { margin: auto; text-align: center; color: #272b41; opacity: .65; padding: 2rem; }

/* Thin, discreet scrollbars for the two internal scroll areas. */
.ado-chat__list, .ado-thread__body { scrollbar-width: thin; scrollbar-color: #d9d2f5 transparent; }
.ado-chat__list::-webkit-scrollbar, .ado-thread__body::-webkit-scrollbar { width: 6px; }
.ado-chat__list::-webkit-scrollbar-thumb, .ado-thread__body::-webkit-scrollbar-thumb { background: #d9d2f5; border-radius: 6px; }
.ado-chat__list::-webkit-scrollbar-track, .ado-thread__body::-webkit-scrollbar-track { background: transparent; }

/* "No-flash" switch: while a new thread loads, the current one stays visible but
   dimmed with a small spinner — never blanked to a "Carico…" placeholder. */
.ado-chat.is-loading .ado-chat__pane { pointer-events: none; }
.ado-chat.is-loading .ado-chat__pane > * { opacity: .45; transition: opacity .12s ease; }
.ado-chat.is-loading .ado-chat__pane::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 3px solid #d9d2f5; border-top-color: #8367f0; border-radius: 50%; animation: ado-spin .7s linear infinite;
}
@keyframes ado-spin { to { transform: rotate(360deg); } }
.ado-chat__detailbar { display: none; align-items: center; gap: .4rem; margin-bottom: .6rem; }

.ado-thread { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ado-thread__head { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-bottom: 1px solid #efeafc; }
.ado-thread__annuncio { display: flex; align-items: center; gap: .7rem; padding: .65rem 1rem; background: #f6f4fe; border-bottom: 1px solid #efeafc; text-decoration: none; transition: background .15s ease; }
.ado-thread__annuncio:hover { background: #efeafc; }
.ado-thread__annuncio img, .ado-thread__annuncio-ph { width: 52px; height: 52px; border-radius: .7rem; object-fit: cover; flex-shrink: 0; }
.ado-thread__annuncio-ph { display: inline-flex; align-items: center; justify-content: center; background: #efeafc; color: #b9aef0; font-size: 1.4rem; }
.ado-thread__annuncio-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.ado-thread__annuncio-label { font-size: .9rem; font-weight: 700; color: #5b4bb0; text-transform: uppercase; letter-spacing: .02em; }
.ado-thread__annuncio-title { font-weight: 700; color: #272b41; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ado-thread__annuncio-meta { font-size: .9rem; color: #272b41; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ado-thread__annuncio-go { flex-shrink: 0; font-size: .9rem; font-weight: 700; color: #5b4bb0; white-space: nowrap; display: inline-flex; align-items: center; gap: .1rem; }
.ado-thread__body { flex: 1 1 auto; overflow-y: auto; padding: 1rem; background: #faf9ff; display: flex; flex-direction: column; gap: .5rem; }
.ado-thread__foot { border-top: 1px solid #efeafc; padding: .7rem; }
/* Pulsante invio: cerchio esatto (il padding di .btn lo rendeva ovale). */
.ado-thread__send { width: 44px !important; height: 44px !important; min-height: 0; padding: 0 !important; border-radius: 50% !important; line-height: 1; }
.ado-thread__send .bx { font-size: 1.25rem; }
.ado-msg { display: flex; }
.ado-msg--mine { justify-content: flex-end; }
.ado-msg--theirs { justify-content: flex-start; }
.ado-msg__bubble { max-width: 75%; padding: .55rem .85rem; border-radius: 1.1rem; box-shadow: 0 1px 2px rgba(39,43,65,.06); }
.ado-msg--mine .ado-msg__bubble { background: linear-gradient(135deg, #8367f0, #5b8def); color: #fff; border-bottom-right-radius: .3rem; }
.ado-msg--theirs .ado-msg__bubble { background: #fff; color: #272b41; border-bottom-left-radius: .3rem; }
.ado-msg__text { margin: 0; font-size: .98rem; line-height: 1.35; word-break: break-word; }
.ado-msg__time { display: block; text-align: right; font-size: 0.9rem; opacity: .7; margin-top: .15rem; }
.ado-thread__empty { margin: auto; text-align: center; color: #272b41; opacity: .7; }

/* Raggruppamento messaggi consecutivi dello stesso mittente (stile Messenger):
   gap ridotto, timestamp solo sull'ultimo del gruppo, tail solo in fondo.
   `:has` → funziona anche coi messaggi aggiunti via polling/invio. */
.ado-msg--mine + .ado-msg--mine,
.ado-msg--theirs + .ado-msg--theirs { margin-top: -0.35rem; }
.ado-msg--mine:has(+ .ado-msg--mine) .ado-msg__time,
.ado-msg--theirs:has(+ .ado-msg--theirs) .ado-msg__time { display: none; }
.ado-msg--mine:has(+ .ado-msg--mine) .ado-msg__bubble { border-bottom-right-radius: 1.1rem; }
.ado-msg--theirs:has(+ .ado-msg--theirs) .ado-msg__bubble { border-bottom-left-radius: 1.1rem; }
/* Desktop: bolle più strette (righe lunghe = fatica a leggere). */
@media (min-width: 992px) { .ado-msg__bubble { max-width: 62%; } }

/* Back nella top-bar del thread (solo full-screen mobile). */
.ado-thread__back { display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: -.35rem .15rem -.35rem -.4rem; border-radius: 50%;
    color: #5b4bb0; font-size: 1.5rem; text-decoration: none; flex-shrink: 0; }
.ado-thread__back:hover { background: #efeafc; }

@media (max-width: 991.98px) {
    /* Mobile: la pagina messaggi mostra SOLO la lista (a tutta larghezza); aprire
       una conversazione porta alla pagina thread full-screen (stile Messenger).
       Il vecchio master-detail a scorrimento è disattivato su mobile. */
    .ado-chat { height: auto; min-height: 0; display: block; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; }
    .ado-chat__list { flex-basis: auto; width: 100%; height: auto; padding: 0; border-right: 0; gap: .5rem; }
    .ado-chat__detail { display: none; }

    /* Thread FULL-SCREEN (body.is-chat-full = pagina thread standalone): via header
       sito e bottom nav, il thread riempie lo schermo con top-bar + composer fisso. */
    body.is-chat-full .neo-header,
    body.is-chat-full .neo-header-spacer,
    body.is-chat-full .ado-bnav { display: none !important; }
    body.is-chat-full { padding-bottom: 0 !important; overflow: hidden; }
    body.is-chat-full .ado-acct { padding: 0 !important; background: #faf9ff; min-height: 0; }
    body.is-chat-full .ado-thread-topback { display: none; }
    body.is-chat-full .ado-thread {
        position: fixed; left: 0; right: 0; top: 0; height: 100dvh;
        border-radius: 0; box-shadow: none; z-index: 1050; background: #fff;
    }
    body.is-chat-full .ado-thread__back { display: inline-flex; }
    body.is-chat-full .ado-thread__foot { padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }

    /* Tastiera aperta (input in focus → .is-typing): collassa il CONTESTO sopra i
       messaggi (strip annuncio, barra richiesta) — animato per non "saltare" le
       bolle — e nasconde le note sotto il composer (istantaneo). Top-bar, messaggi
       e composer restano. Più righe di conversazione visibili, stile Messenger. */
    body.is-chat-full .ado-thread__annuncio,
    body.is-chat-full .ado-thread__richiesta {
        max-height: 200px; overflow: hidden;
        transition: max-height .2s ease, opacity .15s ease, padding .2s ease, border-width .2s ease;
    }
    body.is-chat-full .ado-thread.is-typing .ado-thread__annuncio,
    body.is-chat-full .ado-thread.is-typing .ado-thread__richiesta {
        /* !important: la barra richiesta ha padding inline. */
        max-height: 0; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important; border-bottom-width: 0 !important;
    }
    /* !important: le note usano .d-flex di Bootstrap (display:flex !important). */
    body.is-chat-full .ado-thread.is-typing .ado-thread__footnotes { display: none !important; }
}

/* ===== Sticky "save this search" bar (/ricerca) ===== */
.ricerca-savebar {
    position: sticky;
    /* --sb-h is the header's real height (set by savebar_controller); the small
       gap keeps the pill clear of the header instead of tucking under it. */
    top: calc(var(--sb-h, 78px) + 0.6rem);
    z-index: 6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #ece9fb;
    border-radius: 999px;
    padding: 0.45rem 0.55rem 0.45rem 1rem;
    box-shadow: 0 6px 18px rgba(40, 43, 65, 0.08);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Mobile: the bar becomes a full-width, square (un-rounded) band docked flush
   under the header, speaking the same surface language (white, hairline bottom
   border, soft downward shadow). It slides up/down IN LOCKSTEP with the header
   (savebar_controller mirrors the header's is-hidden), so the two appear
   together on scroll-up. --sb-h is the docked offset = header height. */
@media (max-width: 1023.98px) {
    .ricerca-savebar {
        --sb-h: 78px;
        top: var(--sb-h);
        margin-inline: calc(50% - 50vw);      /* full-bleed to the viewport edges */
        padding: 0.55rem 1rem;
        border: 0;
        border-bottom: 1px solid var(--ado-border);
        border-radius: 0;
        box-shadow: 0 4px 14px rgba(39, 43, 65, 0.05);
    }
    .ricerca-savebar.is-hidden {
        /* up by its own height + the header height => fully tucked away above */
        transform: translateY(calc(-100% - var(--sb-h)));
        pointer-events: none;
    }
}
@media (max-width: 991.98px) {
    .ricerca-savebar { --sb-h: 72px; }
}
@media (max-width: 575.98px) {
    .ricerca-savebar { --sb-h: 68px; }
}
/* Desktop: not a floating rounded pill but a squared chip docked flush to the
   top edge (right under the header) and pinned to the RIGHT of the results,
   sized to its content — same rectangular language as the mobile band. */
@media (min-width: 1024px) {
    .ricerca-savebar {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;                 /* dock to the right */
        margin-right: 0;
        top: var(--sb-h, 78px);            /* flush to the top edge, no gap */
        border-radius: 0;
        border-top: 0;
        box-shadow: 0 4px 14px rgba(39, 43, 65, 0.06);
    }
    .ricerca-savebar__anon,
    .ricerca-savebar__done { width: auto; }
    .ricerca-savebar__pop { min-width: 300px; }
}
/* "Avviso già attivo": a passive notice, not a sticky CTA. Keep it in normal
   flow so it scrolls away with the page instead of floating under the header. */
.ricerca-savebar.is-static {
    position: static;
    transform: none;
}
.ricerca-savebar form { margin: 0; }
.ricerca-savebar__hint { color: #272b41; font-size: 0.95rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.ricerca-savebar__hint i { color: #8367f0; }
.ricerca-savebar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #8367f0, #5b8def);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}
.ricerca-savebar__btn:hover { filter: brightness(1.05); color: #fff; }
.ricerca-savebar__btn--ghost { background: #efeafc; color: #5b4bb0; }
.ricerca-savebar > form,
.ricerca-savebar__manage { margin-left: auto; }
.ricerca-savebar__manage { color: #5b4bb0; font-weight: 700; text-decoration: none; }
.ricerca-savebar__saved { color: #157347; font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }
.ricerca-savebar__anon { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.ricerca-savebar__anon-intro { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.ricerca-savebar__anon-intro .ricerca-savebar__hint { margin-right: auto; }
.ricerca-savebar__email { display: flex; gap: 0.5rem; width: 100%; }
.ricerca-savebar__email input { flex: 1 1 auto; min-width: 0; min-height: 44px; border: 1px solid #ece9fb; border-radius: 999px; padding: 0.5rem 1rem; }
.ricerca-savebar__done { color: #157347; font-weight: 700; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; width: 100%; }
.ricerca-savebar__dismiss {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #6c7086;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}
.ricerca-savebar__dismiss:hover { color: #272b41; }

/* Push-first flow (anonymous): a discreet trigger fires the browser push
   prompt, then a small popover optionally adds an email. Functional baseline
   only — final visual design handled separately. */
.ricerca-savebar__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ece9fb;
    border-radius: 999px;
    background: #fff;
    color: #5b4bb0;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}
.ricerca-savebar__trigger:hover { background: #f6f3ff; }
.ricerca-savebar__trigger i { color: #8367f0; }
.ricerca-savebar__pop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}
.ricerca-savebar__pop-x {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    border: 0;
    background: transparent;
    color: #6c7086;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}
.ricerca-savebar__pop-x:hover { color: #272b41; }
.ricerca-savebar__pop-msg { margin: 0; color: #157347; font-weight: 700; font-size: 0.95rem; }
.ricerca-savebar__pop-label { color: #272b41; font-weight: 600; font-size: 0.95rem; }
.ricerca-savebar__emailrow { display: flex; gap: 0.5rem; }
.ricerca-savebar__emailrow input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #ece9fb;
    border-radius: 999px;
    padding: 0.5rem 1rem;
}
.ricerca-savebar__pop-close {
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: #6c7086;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    /* Wide, easy tap targets on phones (the band stays square/full-bleed from
       the rules above — do not re-round it here). */
    .ricerca-savebar__anon > form,
    .ricerca-savebar__trigger { width: 100%; }
    .ricerca-savebar__trigger { justify-content: center; }
}
