/* Booking UI - prenota page + profile page styles */

/* ================================================================
   BOOKING FLOW (prenota page)
   ================================================================ */

/* Booking hero (compact: avatar + titolo) */
.md-booking-hero { padding: 2rem 0; }
.md-booking-hero__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.md-booking-hero__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.md-booking-hero__text { flex: 1; min-width: 0; }
/* Override esplicito: la hero ha sfondo scuro (md-hero--gradient → var(--md-ink)),
   ma h1/h2/h3 hanno color: var(--md-ink) di default in medaid-site.css e quel
   selettore vince sul colore ereditato dalla hero. Senza override, il titolo
   risulta dark su dark e diventa illeggibile. */
.md-booking-hero__title,
h1.md-booking-hero__title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.6rem); color: #fff; }
.md-booking-hero__specialties {
    margin: 0.25rem 0 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Booking section overlap */
.md-booking-section { margin-top: -1rem; position: relative; z-index: 10; padding-top: 1rem; }

/* Steps indicator */
.md-booking-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.md-booking-step {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: var(--md-soft);
    color: var(--md-muted);
    transition: all 0.2s;
}
.md-booking-step.active { background: var(--md-primary); color: #fff; }

/* Booking card base */
.md-booking-card { padding: 1.5rem; }
.md-booking-card__title { margin-top: 0; }
.md-booking-card__title--sub { margin-top: 1.5rem; }
.md-booking-card__footer { margin-top: 1.5rem; }
.md-booking-card--success { padding: 2rem; text-align: center; }

/* Empty / loading states */
.md-booking-empty { color: var(--md-muted); }
.md-booking-empty--center { text-align: center; padding: 2rem; }
.md-booking-loading { text-align: center; padding: 2rem; color: var(--md-muted); }
.md-booking-loading__msg { margin-top: 1rem; font-size: 0.9rem; }

/* Services list */
.md-booking-services { display: grid; gap: 0.75rem; }
.md-booking-service-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    border: 2px solid var(--md-line);
    border-radius: 8px;
    background: var(--md-surface);
    color: var(--md-ink);
    font-family: var(--md-sans);
    transition: border-color 0.2s, background 0.2s;
}
.md-booking-service-btn:hover, .md-booking-service-btn.active { border-color: var(--md-primary) !important; }
.md-booking-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.md-booking-service-info { min-width: 0; }
.md-booking-service-meta {
    color: var(--md-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}
.md-booking-service-price {
    font-weight: 600;
    color: var(--md-primary);
}

/* Locations */
.md-booking-locations { display: grid; gap: 0.5rem; }
.md-booking-location-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    border: 2px solid var(--md-line);
    border-radius: 8px;
    background: var(--md-surface);
    color: var(--md-ink);
    font-family: var(--md-sans);
    transition: border-color 0.2s;
}
.md-booking-location-btn:hover, .md-booking-location-btn.active { border-color: var(--md-primary) !important; }
.md-booking-location-meta { color: var(--md-muted); font-size: 0.85rem; }

/* Generic list (es. professionisti) */
.md-booking-list { display: grid; gap: 0.75rem; }

/* Slots / dates / times */
.md-booking-slots {}
.md-booking-dates {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}
.md-booking-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
}
.md-booking-date-btn { min-width: 60px; padding: 0.5rem; border: 2px solid var(--md-line); border-radius: 8px; background: var(--md-surface); color: var(--md-ink); cursor: pointer; text-align: center; flex-shrink: 0; transition: border-color 0.2s; }
.md-booking-date-btn:hover, .md-booking-date-btn.active { border-color: var(--md-primary) !important; }
.md-booking-date-day, .md-booking-date-month { font-size: 0.75rem; color: var(--md-muted); }
.md-booking-time-btn { padding: 0.5rem 0.75rem; border: 2px solid var(--md-line); border-radius: 6px; background: var(--md-surface); color: var(--md-ink); cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.md-booking-time-btn:hover { border-color: var(--md-primary) !important; }
.md-booking-time-btn.active { border-color: var(--md-primary); background: var(--md-primary); color: #fff; }
#booking-times button:hover { border-color: var(--md-primary) !important; }

/* Patient form */
.md-booking-form { display: grid; gap: 1rem; }
.md-booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.md-booking-form .md-form-group { margin-bottom: 0; }
.md-booking-form .md-form-group label { font-size: 0.78rem; }
.md-booking-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
.md-input--upper { text-transform: uppercase; }
.md-booking-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Success step */
.md-booking-success__icon { font-size: 3rem; margin-bottom: 1rem; }
.md-booking-success__msg { color: var(--md-muted); margin-bottom: 1.5rem; }
.md-booking-success__payment { margin-bottom: 1.5rem; }

.md-badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 4px; background: var(--md-primary); color: #fff; font-size: 0.8rem; font-weight: 500; }
.md-badge--outline { background: transparent; border: 1px solid var(--md-primary); color: var(--md-primary); }
.md-badge--pill { border-radius: var(--md-radius-full, 9999px); padding: 0.2rem 0.75rem; font-size: 0.78rem; }
.md-badge--accent { background: var(--md-accent); }
.md-badge--muted { background: var(--md-bg-alt, #EEF2F7); color: var(--md-text-secondary, #64748B); border: 1px solid var(--md-border, #E2E8F0); }

/* Summary */
.md-booking-summary { background: var(--md-bg-alt, #f8f9fa); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.md-summary-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--md-border, #eee); font-size: 0.9rem; }
.md-summary-row:last-child { border-bottom: none; }
.md-summary-row span { color: var(--md-text-secondary); }
.md-summary-row strong { color: var(--md-text); }

/* Toast */
.md-booking-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.8rem 1.5rem; border-radius: 8px; color: #fff; font-size: 0.9rem; z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s; }
.md-booking-toast--visible { opacity: 1; transform: translateY(0); }
.md-booking-toast--info { background: var(--md-primary); }
.md-booking-toast--error { background: var(--md-error); }
.md-booking-toast--success { background: var(--md-success); }

/* Versione iframe (/prenota/?embed=1): solo il box, sfondo del sito ospite. */
body.medaid-booking-embed { background: transparent; min-height: 0; }
.medaid-booking-embed .md-booking-main { padding: 0.5rem 0; }
.medaid-booking-embed .md-booking-section { margin-top: 0; padding: 0; overflow: visible; }
.medaid-booking-embed .md-booking-steps { margin-bottom: 1.25rem; }
.medaid-booking-embed .md-booking-toast { position: static; margin: 0 0 1rem; box-shadow: none; }
.md-booking-embed__credit { margin: 1rem 0 0; text-align: center; font-size: 0.75rem; color: var(--md-text-secondary, #6b7280); }
.md-booking-embed__credit a { color: inherit; text-decoration: underline; }
/* Senza consenso gli script di terze parti restano bloccati: nel box non si chiede. */
.medaid-booking-embed #cmplz-cookiebanner-container,
.medaid-booking-embed .cmplz-cookiebanner,
.medaid-booking-embed #cmplz-manage-consent { display: none !important; }

/* Spinner */
.md-booking-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: md-spin 0.6s linear infinite; vertical-align: middle; margin-right: 0.4rem; }
@keyframes md-spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.md-booking-skeleton { display: flex; gap: 0.5rem; overflow: hidden; }
.md-booking-skeleton-item { width: 60px; height: 70px; border-radius: 8px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: md-skeleton-pulse 1.5s ease-in-out infinite; flex-shrink: 0; }
.md-booking-skeleton-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.md-booking-skeleton-time { height: 38px; border-radius: 6px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: md-skeleton-pulse 1.5s ease-in-out infinite; }
@keyframes md-skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }


/* ================================================================
   PROFILE PAGE - professionista.php
   ================================================================ */

/* --- Two-column layout --- */
.md-prof-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    max-width: var(--md-container, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}
.md-prof-main { min-width: 0; }
.md-prof-sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Hero --- */
.md-prof-hero {
    background: var(--md-ink);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3rem 0 5rem;
    color: #fff;
    position: relative;
    min-height: 160px;
}
.md-prof-hero-card {
    background: #fff;
    border-radius: var(--md-radius-lg, 16px);
    box-shadow: var(--md-shadow-lg);
    padding: 2rem;
    margin-top: -3.5rem;
    position: relative;
    z-index: 10;
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
}
.md-prof-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.md-prof-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--md-shadow-md);
}
.md-prof-avatar--placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--md-bg-alt, #EEF2F7);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: var(--md-shadow-md);
}
.md-prof-avatar--placeholder svg { width: 64px; height: 64px; }
.md-prof-verified {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    color: var(--md-accent);
}
.md-prof-verified svg { width: 20px; height: 20px; }
.md-prof-hero-info { flex: 1; min-width: 0; }
.md-prof-hero-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--md-text, #1E293B);
    margin: 0 0 0.4rem;
    line-height: 1.2;
}
.md-prof-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.md-prof-location-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--md-text-secondary, #64748B);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.md-prof-location-line svg { width: 16px; height: 16px; flex-shrink: 0; }
.md-prof-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--md-border, #E2E8F0);
    font-size: 0.88rem;
}
.md-prof-trust-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--md-text-secondary, #64748B);
}
.md-prof-trust-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.md-prof-trust-item strong { color: var(--md-text, #1E293B); }
.md-prof-trust-item--available { color: var(--md-accent); font-weight: 600; }
a.md-prof-trust-item--link {
    text-decoration: none;
    transition: color 0.15s ease;
}
a.md-prof-trust-item--link:hover,
a.md-prof-trust-item--link:focus {
    color: var(--md-primary, #264A87);
}
a.md-prof-trust-item--link:hover strong,
a.md-prof-trust-item--link:focus strong {
    color: var(--md-primary, #264A87);
}

/* --- Section base --- */
.md-prof-section {
    padding: 2rem 0;
}
.md-prof-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--md-text, #1E293B);
    margin-bottom: 1.25rem;
}
.md-prof-section + .md-prof-section {
    border-top: 1px solid var(--md-border, #E2E8F0);
}

/* --- Bio --- */
.md-prof-bio-short {
    font-size: 1.02rem;
    color: var(--md-text, #1E293B);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.md-prof-bio-long {
    color: var(--md-text, #1E293B);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.md-prof-bio-long.is-expanded { max-height: 2000px; }
.md-prof-bio-toggle {
    background: none;
    border: none;
    color: var(--md-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--md-transition-fast, 0.15s ease);
}
.md-prof-bio-toggle:hover { color: var(--md-primary-deep); }
.md-prof-bio-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}
.md-prof-bio-toggle.is-expanded svg { transform: rotate(180deg); }
.md-prof-langs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--md-text-secondary, #64748B);
}
.md-prof-langs > svg { width: 16px; height: 16px; flex-shrink: 0; }
.md-prof-lang-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--md-bg-alt, #EEF2F7);
    padding: 0.2rem 0.6rem;
    border-radius: var(--md-radius-full, 9999px);
    font-size: 0.82rem;
    color: var(--md-text, #1E293B);
    font-weight: 500;
}

/* --- Services grid --- */
.md-prof-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.md-prof-service-card {
    background: #fff;
    border: 1px solid var(--md-border, #E2E8F0);
    border-radius: var(--md-radius-md, 12px);
    padding: 1rem 1.25rem;
    transition: border-color var(--md-transition-fast, 0.15s ease), box-shadow var(--md-transition-fast, 0.15s ease);
}
.md-prof-service-card:hover {
    border-color: var(--md-primary);
    box-shadow: var(--md-shadow-sm);
}
.md-prof-service-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--md-text, #1E293B);
    margin-bottom: 0.3rem;
}
.md-prof-service-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--md-text-secondary, #64748B);
}
.md-prof-service-meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.md-prof-service-price {
    font-weight: 700;
    color: var(--md-primary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}
.md-prof-services-toggle {
    margin-top: 1rem;
    background: none;
    border: 2px solid var(--md-primary);
    color: var(--md-primary);
    border-radius: var(--md-radius-sm, 8px);
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--md-transition-fast, 0.15s ease);
}
.md-prof-services-toggle:hover {
    background: var(--md-primary);
    color: #fff;
}

/* --- Location cards --- */
.md-prof-location-card {
    background: #fff;
    border: 1px solid var(--md-border, #E2E8F0);
    border-radius: var(--md-radius-md, 12px);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--md-shadow-sm);
}
.md-prof-location-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-text, #1E293B);
    margin: 0 0 0.6rem;
}
.md-prof-loc-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--md-text-secondary, #64748B);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}
.md-prof-loc-detail svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.md-prof-loc-detail a { color: var(--md-primary); font-weight: 500; }
.md-prof-loc-map {
    margin-top: 0.75rem;
    border-radius: var(--md-radius-sm, 8px);
    overflow: hidden;
    height: 180px;
    position: relative;
}
.md-prof-loc-map iframe { width: 100%; height: 100%; border: 0; }
.md-prof-loc-map-overlay {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: #fff;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--md-primary);
    box-shadow: var(--md-shadow-sm);
    text-decoration: none;
    z-index: 2;
    transition: background var(--md-transition-fast, 0.15s ease);
}
.md-prof-loc-map-overlay:hover {
    background: var(--md-primary);
    color: #fff;
}

/* --- Hours visual grid --- */
.md-prof-hours-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.md-prof-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--md-border, #E2E8F0);
}
.md-prof-hours-row:last-child { border-bottom: none; }
.md-prof-hours-day {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--md-text, #1E293B);
    min-width: 100px;
}
.md-prof-hours-row.is-today .md-prof-hours-day {
    color: var(--md-primary);
}
.md-prof-hours-slots {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.md-prof-hours-slot {
    background: var(--md-accent-light, #A3F0C2);
    color: var(--md-accent-dark, #27AE60);
    padding: 0.2rem 0.65rem;
    border-radius: var(--md-radius-full, 9999px);
    font-size: 0.8rem;
    font-weight: 500;
}
.md-prof-hours-closed {
    color: var(--md-text-light, #94A3B8);
    font-size: 0.85rem;
    font-style: italic;
}

/* --- Gallery --- */
.md-prof-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.md-prof-gallery-item {
    border-radius: var(--md-radius-sm, 8px);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    position: relative;
}
.md-prof-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.md-prof-gallery-item:hover img { transform: scale(1.05); }
.md-prof-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}
.md-prof-gallery-item:hover::after { background: rgba(0,0,0,0.08); }

/* Gallery placeholder cards */
.md-prof-gallery-placeholder {
    border-radius: var(--md-radius-sm, 8px);
    aspect-ratio: 4/3;
    background: var(--md-bg-alt, #EEF2F7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--md-text-light, #94A3B8);
}
.md-prof-gallery-placeholder svg { width: 36px; height: 36px; opacity: 0.5; }

/* Lightbox */
.md-prof-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.md-prof-lightbox.is-open { display: flex; }
.md-prof-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--md-radius-md, 12px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.md-prof-lightbox-close,
.md-prof-lightbox-prev,
.md-prof-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(8px);
}
.md-prof-lightbox-close:hover,
.md-prof-lightbox-prev:hover,
.md-prof-lightbox-next:hover { background: rgba(255,255,255,0.3); }
.md-prof-lightbox-close { top: 1.5rem; right: 1.5rem; }
.md-prof-lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.md-prof-lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.md-prof-lightbox-close svg,
.md-prof-lightbox-prev svg,
.md-prof-lightbox-next svg { width: 22px; height: 22px; }

/* --- Insurances --- */
.md-prof-insurance-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.md-prof-insurance-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--md-bg-alt, #EEF2F7);
    border: 1px solid var(--md-border, #E2E8F0);
    padding: 0.35rem 0.85rem;
    border-radius: var(--md-radius-full, 9999px);
    font-size: 0.85rem;
    color: var(--md-text, #1E293B);
    font-weight: 500;
    transition: border-color var(--md-transition-fast, 0.15s ease);
}
.md-prof-insurance-chip:hover { border-color: var(--md-primary); }
.md-prof-insurance-chip svg { width: 14px; height: 14px; color: var(--md-primary); }

/* --- FAQ Accordion --- */
.md-prof-accordion {}
.md-prof-accordion-item {
    border-bottom: 1px solid var(--md-border, #E2E8F0);
}
.md-prof-accordion-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-text, #1E293B);
    gap: 1rem;
    transition: color var(--md-transition-fast, 0.15s ease);
}
.md-prof-accordion-btn:hover { color: var(--md-primary); }
.md-prof-accordion-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--md-text-light, #94A3B8);
}
.md-prof-accordion-item.is-open .md-prof-accordion-chevron { transform: rotate(180deg); }
.md-prof-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
}
.md-prof-accordion-item.is-open .md-prof-accordion-body {
    max-height: 500px;
    padding: 0 0 1rem;
}
.md-prof-accordion-body p {
    color: var(--md-text-secondary, #64748B);
    line-height: 1.7;
    font-size: 0.92rem;
}

/* --- Sidebar card --- */
.md-prof-sidebar-card {
    background: #fff;
    border: 1px solid var(--md-border, #E2E8F0);
    border-radius: var(--md-radius-md, 12px);
    padding: 1.5rem;
    box-shadow: var(--md-shadow-md);
    margin-top: 35px;
}
.md-prof-sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--md-text, #1E293B);
}
.md-prof-sidebar-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1.5rem;
    background: var(--md-primary);
    color: #fff;
    border: none;
    border-radius: var(--md-radius-sm, 8px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--md-transition-fast, 0.15s ease), transform var(--md-transition-fast, 0.15s ease);
}
.md-prof-sidebar-cta:hover {
    background: var(--md-primary-deep);
    color: #fff;
    transform: translateY(-1px);
}
.md-prof-sidebar-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--md-text-secondary, #64748B);
    margin-top: 0.75rem;
    line-height: 1.5;
}
.md-prof-sidebar-detail svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--md-primary); }
.md-prof-sidebar-divider {
    border: none;
    border-top: 1px solid var(--md-border, #E2E8F0);
    margin: 1rem 0;
}
.md-prof-sidebar-available {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--md-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}
.md-prof-sidebar-available svg { width: 16px; height: 16px; }

/* --- Sidebar gallery --- */
.md-prof-gallery-card { padding: 1.25rem; }
.md-prof-gallery-card h3 { display: flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; margin: 0 0 0.75rem; }
.md-prof-gallery-card h3 svg { width: 18px; height: 18px; }
.md-prof-gallery-sidebar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
.md-prof-gallery-sidebar-item {
    border-radius: var(--md-radius-sm, 8px);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    position: relative;
}
.md-prof-gallery-sidebar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.md-prof-gallery-sidebar-item:hover img { transform: scale(1.05); }
.md-prof-gallery-sidebar-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}
.md-prof-gallery-sidebar-item:hover::after { background: rgba(0,0,0,0.08); }

/* --- Empty state --- */
.md-prof-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--md-bg-alt, #EEF2F7);
    border-radius: var(--md-radius-md, 12px);
    border: 1px dashed var(--md-border, #E2E8F0);
}
.md-prof-empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--md-text-light, #94A3B8);
    margin-bottom: 1rem;
    opacity: 0.6;
}
.md-prof-empty-state p {
    color: var(--md-text-secondary, #64748B);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 400px;
}

/* --- Mobile sticky CTA bar --- */
.md-prof-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--md-border, #E2E8F0);
    padding: 0.75rem 1.25rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.md-prof-sticky-cta.is-visible { transform: translateY(0); }
.md-prof-sticky-cta-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: var(--md-container-sm, 800px);
    margin: 0 auto;
}
.md-prof-sticky-cta-text {
    flex: 1;
    min-width: 0;
}
.md-prof-sticky-cta-text strong {
    display: block;
    font-size: 0.85rem;
    color: var(--md-text, #1E293B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.md-prof-sticky-cta-text span {
    font-size: 0.78rem;
    color: var(--md-text-secondary, #64748B);
}
.md-prof-sticky-cta .md-prof-sidebar-cta {
    flex-shrink: 0;
    width: auto;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

/* --- CTA Banner --- */
.md-prof-cta-banner {
    background: var(--md-ink);
    border-radius: var(--md-radius-lg, 16px);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    margin: 2rem 0;
}
.md-prof-cta-banner h2 { color: #fff; font-size: 1.5rem; margin-bottom: 0.5rem; }
.md-prof-cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; font-size: 1.05rem; }
.md-prof-cta-banner .md-btn--white {
    background: var(--md-accent);
    color: #fff;
    border: none;
    border-radius: var(--md-radius-pill, 999px);
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform var(--md-transition-fast, 0.15s ease), box-shadow var(--md-transition-fast, 0.15s ease), background var(--md-transition-fast, 0.15s ease);
}
.md-prof-cta-banner .md-btn--white:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    background: var(--md-accent-deep);
    color: #fff;
}

/* --- Trova professionisti card improvements --- */
.md-prof-card {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}
.md-prof-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.md-prof-card > div:last-child > .md-btn {
    margin-top: auto;
}
.md-prof-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--md-bg-alt, #EEF2F7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.md-prof-card-avatar-placeholder svg { width: 40px; height: 40px; color: var(--md-text-light, #94A3B8); }
.md-prof-card-available {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--md-accent);
    font-weight: 600;
    margin-top: 0.35rem;
}
.md-prof-card-available svg { width: 12px; height: 12px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    .md-prof-layout {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem;
    }
    .md-prof-gallery-sidebar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .md-prof-layout {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    .md-prof-sidebar {
        position: static;
        order: -1;
    }
    .md-prof-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        margin-top: -2.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .md-prof-hero-info h1 { font-size: 1.4rem; }
    .md-prof-specialties { justify-content: center; }
    .md-prof-location-line { justify-content: center; }
    .md-prof-trust { justify-content: center; }
    .md-prof-avatar, .md-prof-avatar--placeholder { width: 110px; height: 110px; }
    .md-prof-services-grid { grid-template-columns: 1fr; }
    .md-prof-sticky-cta { display: block; }
    .md-prof-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .md-prof-cta-banner { margin-left: 0; margin-right: 0; border-radius: var(--md-radius-md, 12px); padding: 2rem 1.25rem; }

    /* Booking flow - allineato al breakpoint del resto del sito */
    .md-booking-form-grid { grid-template-columns: 1fr !important; }
    .md-booking-steps { flex-wrap: wrap; gap: 0.4rem; justify-content: flex-start; }
    .md-booking-step { font-size: 0.75rem; padding: 0.3rem 0.6rem; }
    #booking-dates { scroll-snap-type: x mandatory; }
    #booking-dates > * { scroll-snap-align: start; }
    #booking-times { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important; }
    .md-booking-skeleton-times { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
    .md-booking-toast { left: 1rem; right: 1rem; bottom: 1rem; text-align: center; }
    .md-prof-hero { padding: 2rem 0 4rem; }
}

@media (max-width: 480px) {
    .md-prof-gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .md-footer--prof { display: none; }
}

/* Anticipo alla prenotazione: il resto si salda in studio */
.md-booking-service-deposit { display: block; color: var(--md-primary, #264A87); font-weight: 500; }
.md-booking-deposit-note { margin: 0.75rem 0 1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--md-primary, #264A87); background: var(--md-bg-alt, #f8f9fa); border-radius: 6px; font-size: 0.9rem; line-height: 1.45; color: var(--md-text); text-align: left; }
.md-booking-summary .md-booking-deposit-note { margin-bottom: 0; }
