/* wwwroot/css/studio-medico.css
   Stile per il portale pazienti Studio Medico
   Coerente con il layout sidebar blu/viola dell'app esistente
   Font grandi e leggibili, ottimizzato per utenti anziani
   ---------------------------------------------------------------- */

/* ── FONT & BASE ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --color-primary: #052767;
    --color-primary-2: #3a0647;
    --color-accent: #1b6ec2;
    --color-accent-hover: #145ea0;
    --color-green: #1a7a4a;
    --color-green-hover: #145e38;
    --color-bg: #f4f6fb;
    --color-card-bg: #ffffff;
    --color-border: #d8dde8;
    --color-text: #1a1f2e;
    --color-muted: #6b7490;
    --color-danger: #c0392b;
    --color-success: #1a7a4a;
    --radius: 14px;
    --shadow: 0 2px 16px rgba(5,39,103,0.10);
    --shadow-lg: 0 6px 32px rgba(5,39,103,0.14);
    --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    --font-head: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    background: var(--color-bg);
    color: var(--color-text);
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

/* ── LAYOUT CONTAINER ─────────────────────────────────────────── */
.page-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.page-header {
    margin-bottom: 1.8rem;
}

.page-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0.5rem 0 0;
}

/* ── BACK BUTTON ──────────────────────────────────────────────── */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-accent);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.3rem 0;
    border:0;
}

    .btn-back:hover {
        text-decoration: underline;
        color: var(--color-accent-hover);
    }

/* ── HOME CARDS ───────────────────────────────────────────────── */
.home-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.home-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.home-title {
    font-family: var(--font-head);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--color-muted);
    margin: 0.4rem 0 0;
}

.home-cards {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.home-card {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.6rem 1.8rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.home-card--blue {
    background: linear-gradient(135deg, #052767 0%, #1b6ec2 100%);
}

.home-card--green {
    background: linear-gradient(135deg, #1a5c3a 0%, #27ae60 100%);
}

.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(5,39,103,0.22);
    color: #fff;
    text-decoration: none;
}

.home-card__icon {
    flex-shrink: 0;
    opacity: 0.92;
}

.home-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.home-card__title {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.home-card__desc {
    font-size: 1.05rem;
    opacity: 0.88;
}

.home-card__arrow {
    font-size: 2.5rem;
    opacity: 0.6;
    line-height: 1;
}

/* ── STEP BOX ─────────────────────────────────────────────────── */
.step-box {
    background: var(--color-card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem 2rem;
    margin-bottom: 1.6rem;
    border: 1px solid var(--color-border);
}

.step-label {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 1.2rem;
}

/* ── CALENDARIO ───────────────────────────────────────────────── */
.calendario {
    max-width: 420px;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.2rem 0.8rem;
    color: var(--color-accent);
    cursor: pointer;
    transition: background 0.12s;
}

    .cal-nav-btn:hover:not(:disabled) {
        background: #e8f0fa;
    }

    .cal-nav-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

.cal-mese {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: capitalize;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-cell {
    text-align: center;
}

.cal-day-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-muted);
    padding: 0.3rem 0;
}

.cal-day {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    background: transparent;
}

.cal-day--active {
    background: #e8f0fa;
    color: var(--color-primary);
    font-weight: 700;
}

    .cal-day--active:hover {
        background: var(--color-accent);
        color: #fff;
    }

.cal-day--disabled {
    color: #ccc;
    cursor: not-allowed;
    background: transparent;
}

.cal-day--selected {
    background: var(--color-primary) !important;
    color: #fff !important;
}

/* Legenda */
.cal-legenda {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.dot--active {
    background: #e8f0fa;
    border: 1.5px solid var(--color-accent);
}

.dot--disabled {
    background: #f0f0f0;
    border: 1.5px solid #ccc;
}

.dot--selected {
    background: var(--color-primary);
}

/* ── SLOT ORARI ───────────────────────────────────────────────── */
.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.slot-btn {
    padding: 0.75rem 1.4rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-head);
    border: 2px solid var(--color-accent);
    border-radius: 10px;
    background: #fff;
    color: var(--color-accent);
    cursor: pointer;
    transition: all 0.13s;
    min-width: 90px;
}

    .slot-btn:hover {
        background: #e8f0fa;
    }

.slot-btn--selected {
    background: var(--color-accent);
    color: #fff;
}

/* ── FORM ─────────────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
/* Evidenzia il bordo dell'input in rosso se non è valido */
.form-control.invalid, .form-select.invalid, .privacy-checkbox.invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fff8f8;
}

/* Rendi il messaggio di errore sotto il campo più evidente */
.validation-message {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
}

/* Stile per il riepilogo errori sopra il pulsante */
.validation-summary-errors {
    list-style: none;
    padding: 10px;
    background-color: #fce8e8;
    border-left: 4px solid #dc3545;
    color: #a94442;
    margin-bottom: 15px;
    border-radius: 4px;
}

@media (max-width: 580px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-text);
}

.req {
    color: var(--color-danger);
}

.opz {
    color: var(--color-muted);
    font-size: 0.88em;
    font-weight: 400;
}

.form-control,
.form-select {
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    border-color: var(--color-border) !important;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--color-accent) !important;
        box-shadow: 0 0 0 0.18rem rgba(27,110,194,0.18) !important;
    }

/* ── CONSENSO PRIVACY (GDPR) ──────────────────────────────────── */
/* ── CONSENSO PRIVACY (GDPR) ──────────────────────────────────── */
.privacy-box {
    background: #f0f4fb;
    border: 1.5px solid #c5d5ee;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1.4rem 0 0.5rem;
}

.privacy-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.privacy-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.privacy-label {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.5;
    cursor: pointer;
}

.privacy-link {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: underline;
}

    .privacy-link:hover {
        color: var(--color-accent-hover);
    }

.privacy-box .validation-message {
    margin-top: 0.4rem;
    padding-left: 2.2rem;
    font-size: 0.95rem;
}

/* ── PAGINA PRIVACY ───────────────────────────────────────────── */
.privacy-subtitle {
    color: var(--color-muted);
    font-size: 1rem;
    margin: 0.2rem 0 0;
}

.privacy-doc {
    background: var(--color-card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    padding: 2rem 2.2rem;
    max-width: 780px;
}

.privacy-intro {
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 1.8rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--color-border);
}

.privacy-section {
    margin-bottom: 1.8rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid #eef0f5;
}

    .privacy-section:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
    }

.privacy-h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.privacy-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
}

.privacy-section p {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.6rem;
    line-height: 1.65;
}

.privacy-list {
    margin: 0.5rem 0 0.8rem 1.2rem;
    padding: 0;
}

    .privacy-list li {
        font-size: 1rem;
        color: var(--color-text);
        margin-bottom: 0.45rem;
        line-height: 1.6;
    }

.privacy-note {
    background: #f7f9fd;
    border-left: 3px solid var(--color-accent);
    padding: 0.7rem 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem !important;
    color: var(--color-muted) !important;
    margin-top: 0.6rem;
}

.privacy-garante {
    background: #f7f9fd;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 0.6rem;
}

    .privacy-garante a {
        color: var(--color-accent);
    }

.privacy-section a {
    color: var(--color-accent);
    text-decoration: underline;
}

.privacy-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    text-align: right;
    color: var(--color-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .privacy-doc {
        padding: 1.2rem 1rem;
    }
}

/* ── DOPPIO CONSENSO PRIVACY ──────────────────────────────────── */
.privacy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.4rem 0 0.5rem;
}

/* Secondo box: dati sanitari — bordo ambra per distinguerlo */
.privacy-box--sanitario {
    border-color: #d4970a;
    background: #fffbf0;
}

.privacy-badge {
    display: inline-block;
    background: #d4970a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

/* ── DROP ZONE ────────────────────────────────────────────────── */
.drop-zone {
    border: 2.5px dashed var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #fafbfd;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.drop-zone--over {
    border-color: var(--color-accent);
    background: #e8f0fa;
}

.drop-icon {
    color: var(--color-accent);
    margin-bottom: 0.6rem;
    opacity: 0.7;
}

.drop-text {
    color: var(--color-muted);
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.btn-upload {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s;
}

    .btn-upload:hover {
        background: var(--color-accent-hover);
    }

/* ── ALLEGATI LIST ────────────────────────────────────────────── */
.allegati-list {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0 0;
}

.allegato-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    background: #f0f4fb;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    font-size: 0.98rem;
    color: var(--color-primary);
}

.allegato-nome {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.allegato-remove {
    background: none;
    border: none;
    color: var(--color-danger);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}

/* ── FARMACI ──────────────────────────────────────────────────── */
.btn-add-farmaco {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s;
}

    .btn-add-farmaco:hover {
        background: var(--color-accent);
    }

.farmaco-row {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    background: #f7f9fd;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.8rem;
}

.farmaco-num {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-accent);
    min-width: 28px;
    padding-bottom: 0.4rem;
}

.farmaco-fields {
    flex: 1;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

    .farmaco-fields .form-group {
        flex: 1;
        min-width: 160px;
        margin-bottom: 0;
    }

.farmaco-remove {
    background: none;
    border: 1.5px solid var(--color-danger);
    color: var(--color-danger);
    border-radius: 7px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
    transition: background 0.13s;
    flex-shrink: 0;
}

    .farmaco-remove:hover {
        background: #fce8e8;
    }

/* ── BOTTONI AZIONE ───────────────────────────────────────────── */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.btn-primary-lg {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 2rem;
    font-size: 1.2rem;
    font-family: var(--font-head);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.13s, transform 0.13s;
    box-shadow: 0 3px 12px rgba(27,110,194,0.25);
}

    .btn-primary-lg:hover:not(:disabled) {
        opacity: 0.92;
        transform: translateY(-1px);
    }

    .btn-primary-lg:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.btn-secondary-lg {
    background: #fff;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 0.85rem 1.6rem;
    font-size: 1.1rem;
    font-family: var(--font-head);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s;
}

    .btn-secondary-lg:hover {
        background: var(--color-bg);
    }

/* ── CONFERMA ─────────────────────────────────────────────────── */
.conferma-box {
    background: var(--color-card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 2px solid #c3e6cb;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 540px;
    margin: 1rem auto;
}

.conferma-icon {
    width: 72px;
    height: 72px;
    background: var(--color-green);
    border-radius: 50%;
    color: #fff;
    font-size: 2.4rem;
    line-height: 72px;
    margin: 0 auto 1.2rem;
}

.conferma-titolo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-green);
    margin-bottom: 0.8rem;
}

.conferma-testo {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

/* ── UTILITY ──────────────────────────────────────────────────── */
.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.text-muted {
    color: var(--color-muted) !important;
}

/* ── VALIDAZIONE BLAZOR ───────────────────────────────────────── */
.validation-message {
    color: var(--color-danger);
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

.field-validation-error {
    color: var(--color-danger);
    font-size: 0.92rem;
}

.alert-danger {
    background: #fce8e8;
    border: 1px solid #f5c6cb;
    color: var(--color-danger);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .page-container {
        padding: 1rem 0.75rem 2rem;
    }

    .step-box {
        padding: 1.2rem 1rem;
    }

    .home-card__title {
        font-size: 1.3rem;
    }

    .home-card {
        padding: 1.2rem 1.1rem;
        gap: 1rem;
    }

    .btn-primary-lg {
        font-size: 1.05rem;
        padding: 0.75rem 1.3rem;
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .farmaco-fields {
        flex-direction: column;
    }
}

/* ── STEP HEADER ROW (titolo + tasto cambia giorno) ──────────── */
.step-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0;
}

.btn-step-back {
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-accent);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}

    .btn-step-back:hover {
        background: #e8f0fa;
        border-color: var(--color-accent);
    }

/* ── RIMUOVI OUTLINE DI FOCUS SU TITOLI E ELEMENTI NON INTERATTIVI ── */
h1, h2, h3, h4, h5, h6,
.home-title,
.home-header,
.page-container,
div[tabindex] {
    outline: none !important;
}

    h1:focus, h2:focus, h3:focus, h4:focus,
    .home-title:focus {
        outline: none !important;
        box-shadow: none !important;
    }


/* ── HOME CARD GRAY (Contatti) ────────────────────────────────── */
.home-card--gray {
    background: linear-gradient(135deg, #374151 0%, #6b7490 100%);
}

/* ── CONTATTI PAGE ────────────────────────────────────────────── */
.contatti-grid {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-width: 680px;
}

.contatti-section-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.orari-table {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.orario-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: #f7f9fd;
}

.orario-row--chiuso {
    background: #f9fafb;
    opacity: 0.6;
}

.orario-giorno {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.orario-fascia {
    font-size: 1rem;
    color: var(--color-primary);
    font-weight: 600;
}

.orario-chiuso {
    color: var(--color-muted);
}

.contatti-lista {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contatto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: #f7f9fd;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.12s;
    border: 1px solid var(--color-border);
}

    .contatto-item:hover {
        background: #e8f0fa;
        color: var(--color-text);
    }

.contatto-item--urgenza {
    background: #fff5f5;
    border-color: #fecaca;
}

.contatto-icon {
    font-size: 1.5rem;
}

.contatto-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.contatto-label {
    font-size: 0.82rem;
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contatto-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
}

.contatti-urgenze {
    border-left: 4px solid #ef4444;
}

/* ── CALENDARIO GIORNO PIENO ──────────────────────────────────── */
.cal-day--pieno {
    background: #fef3c7 !important;
    color: #92400e !important;
    cursor: not-allowed;
    position: relative;
}

.cal-day-pieno-dot {
    display: block;
    font-size: 0.4rem;
    line-height: 1;
    color: #d97706;
    margin-top: 1px;
}

.dot--pieno {
    background: #fef3c7;
    border: 1.5px solid #d97706;
}

/* ── AGENDA SLOT LIBERO CLICCABILE ───────────────────────────── */
.bo-timeline-card--clickable {
    cursor: pointer;
    border-color: #d1d5db;
    transition: background 0.12s, border-color 0.12s;
}

    .bo-timeline-card--clickable:hover {
        background: #f0f6ff !important;
        border-color: #1b6ec2 !important;
    }

    .bo-timeline-card--clickable .bo-tc-free {
        color: #1b6ec2;
        font-style: normal;
        font-weight: 600;
    }

/* ── DOWNLOAD ALLEGATI NELL'AGENDA ───────────────────────────── */
.bo-tc-allegati {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e8ecf4;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* ── MODIFICA CONTATTI RICETTE ────────────────────────────────── */
.bo-contatti-form {
    background: #f7f9fd;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-top: 0.5rem;
}

.bo-filtro-count {
    display: inline-block;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 0 0.4rem;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.bo-filtro-btn--active .bo-filtro-count {
    background: rgba(255,255,255,0.25);
}

/* Container principale: posizionato in alto o in basso come una notifica */
.pwa-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: slideIn 0.4s ease-out;
}

/* Icona dell'app */
.pwa-banner-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    background: #f0f4f8;
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Area di testo */
.pwa-banner-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .pwa-banner-text strong {
        color: #052767; /* Blu scuro coerente con il tuo tema */
        font-size: 0.95rem;
    }

    .pwa-banner-text span {
        color: #64748b;
        font-size: 0.8rem;
    }

/* Azioni (Bottoni) */
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bottone Installa */
.pwa-banner-install {
    background-color: #052767;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .pwa-banner-install:hover {
        background-color: #3a0647; /* Il viola che usi nel manifest */
    }

/* Bottone Chiudi (X) */
.pwa-banner-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

    .pwa-banner-close:hover {
        color: #ef4444;
    }

/* Animazione di entrata */
@keyframes slideIn {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Ottimizzazione Mobile */
@media (max-width: 480px) {
    .pwa-banner {
        padding: 10px;
    }

    .pwa-banner-text span {
        display: none; /* Nasconde il sottotitolo su schermi mini per risparmiare spazio */
    }
}