/* Contatti esperto (prodotto e store): card E-mail / WhatsApp / Telefono + barra mobile */

.tdo-cc {
    --cc-ink: #1b2130;
    --cc-muted: #6b7280;
    --cc-line: #e8ebf0;
    --cc-blue: #0b5cff;
    --cc-ico-bg: #f1f3f7;
    color: var(--cc-ink);
    font-family: inherit;
}

.tdo-cc-box {
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(16, 24, 40, .08);
}

/* Intestazione */
.tdo-cc-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.tdo-cc-sub {
    font-size: 12px;
    color: var(--cc-muted);
    margin-top: 2px;
}

.tdo-cc-avatars {
    display: flex;
    align-items: center;
    margin: 20px 0 18px;
}

.tdo-cc-avatars img,
.tdo-cc-avatars .tdo-cc-more {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-right: -4px;
    background: #e5e7eb;
    object-fit: cover;
    flex: 0 0 auto;
}

.tdo-cc-avatars .tdo-cc-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3a3a3a;
}

.tdo-cc-avatars .tdo-cc-more svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.4;
    fill: none;
    stroke-linecap: round;
}

.tdo-cc-company {
    font-size: 16px;
    color: var(--cc-muted);
}

.tdo-cc-company strong {
    color: var(--cc-ink);
    font-weight: 500;
}

/* ":not(#_)" alza la specificità sopra le regole di app.css per .sidebar-prodotto a/button */
.tdo-cc .tdo-cc-head .tdo-cc-store:not(#_) {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 500;
    color: var(--cc-blue) !important;
    text-decoration: none;
}

.tdo-cc .tdo-cc-store:hover {
    text-decoration: underline;
}

.tdo-cc-store svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Mostrato/nascosto da app.js quando cambia l'indirizzo di consegna */
.tdo-cc-off {
    display: none !important;
}

/* Righe */
.tdo-cc-list {
    display: flex;
    flex-direction: column;
    margin-top: 22px;
    border-top: 1px solid var(--cc-line);
}

.tdo-cc .tdo-cc-row:not(#_) {
    display: flex !important;
    align-items: center;
    gap: 22px;
    width: 100%;
    margin: 0 !important;
    padding: 12px 0 !important;
    border: 0;
    border-bottom: 1px solid var(--cc-line);
    border-radius: 0;
    background: none;
    color: var(--cc-ink);
    font-size: 17px !important;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.tdo-cc .tdo-cc-row:not(#_):last-child {
    border-bottom: 0;
    padding-bottom: 2px !important;
}

@media (hover: hover) {
    .tdo-cc .tdo-cc-row:hover .tdo-cc-label {
        color: var(--cc-blue);
    }
}

.tdo-cc-ico {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--cc-ico-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.tdo-cc-ico svg {
    width: 24px;
    height: 24px;
    stroke: #1f2937;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tdo-cc-ico.tdo-cc-ico-wa svg {
    stroke: none;
    fill: #25d366;
    width: 26px;
    height: 26px;
}

.tdo-cc-label {
    flex: 1 1 auto;
}

.tdo-cc-chev {
    width: 20px;
    height: 20px;
    stroke: #374151;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

/* openOffcanvas() mette uno spinner nel pulsante: va al posto della freccia */
.tdo-cc-row .js-spinner {
    order: 3;
    margin: 0 !important;
    color: var(--cc-muted);
}

.tdo-cc-row:disabled .tdo-cc-chev {
    display: none;
}

.tdo-cc-cant {
    margin-top: 18px;
    line-height: 1.8;
}

/* Variante store: compatta */
.tdo-cc.tdo-cc--store .tdo-cc-title {
    font-size: 17px;
}

.tdo-cc.tdo-cc--store .tdo-cc-list {
    margin-top: 12px;
    border-top: 0;
}

.tdo-cc.tdo-cc--store .tdo-cc-row:not(#_) {
    gap: 14px;
    padding: 9px 0 !important;
    font-size: 15px !important;
}

.tdo-cc.tdo-cc--store .tdo-cc-row:not(#_):last-child {
    padding-bottom: 0 !important;
}

.tdo-cc.tdo-cc--store .tdo-cc-ico {
    width: 38px;
    height: 38px;
}

.tdo-cc.tdo-cc--store .tdo-cc-ico svg {
    width: 20px;
    height: 20px;
}

.tdo-cc.tdo-cc--store .tdo-cc-ico.tdo-cc-ico-wa svg {
    width: 22px;
    height: 22px;
}

.tdo-cc.tdo-cc--store .tdo-cc-chev {
    width: 16px;
    height: 16px;
}

/* Store desktop: card sempre nel margine destro, in alto. La copertina circolare resta
   dov'era: quando lo spazio non basta (schermi stretti, zoom) la card le si sovrappone. */
.tdo-cc-store-card {
    padding: 18px 18px 14px;
    width: 268px;
}

.section-intestazione-company {
    position: relative;
}

.tdo-cc-store-slot-side {
    position: absolute;
    top: 50px;
    right: 26px;
    z-index: 3;
}

/* Card agganciata allo scroll (come nella scheda prodotto): sopra le card prodotto */
.tdo-cc-store-slot-side:has(.anchored) {
    z-index: 1010;
}

/* Store: ferma o agganciata, la card resta come in alto (le regole .sidebar-prodotto della
   scheda prodotto le darebbero larghezza e padding della sidebar) */
.sidebar-prodotto.tdo-cc-store-card,
.sidebar-prodotto.tdo-cc-store-card.anchored {
    width: 268px;
    padding: 18px 18px 14px;
}

/* La card contatti prende il posto della linguetta "STORE" del layout */
@media (min-width: 768px) {
    body:has(.tdo-cc-store-slot-side:not(.tdo-cc-off)) .badge-store {
        display: none;
    }
}

/* Prodotto desktop: la card riempie la sidebar */
.sidebar-prodotto.tdo-cc-box {
    padding: 28px 28px 22px;
}

/* Agganciata è fixed senza z-index: le colonne della barra filtri (position:relative) e le
   righe prodotti (z-index 3) la disegnerebbero sotto il loro bordo. Resta sotto i dropdown
   dei filtri (14) e il menu sticky (999). */
.sidebar-prodotto.tdo-cc-box.anchored {
    border-radius: 10px 0 0 10px;
    z-index: 10;
}

/* Barra mobile */
.tdo-cc-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.tdo-cc-bar-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    color: #1b2130;
    font-size: 18px;
    font-weight: 600;
}

.tdo-cc-bar-btn svg {
    width: 24px;
    height: 24px;
    stroke: #1b2130;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tdo-cc-bar-btn:active {
    background: #f5f6f8;
}

@media (max-width: 767.98px) {
    body:has(.tdo-cc-bar) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

/* Foglio contatti (mobile) */
.offcanvas-bottom.tdo-cc-sheet {
    height: auto;
    max-height: 90dvh;
    border-radius: 18px 18px 0 0;
    border-top: 0;
}

.tdo-cc-sheet .offcanvas-body {
    padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
}

.tdo-cc-sheet-grip {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #d1d5db;
    margin: 8px auto 0;
}

.tdo-cc-sheet-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
}

/* Passi della richiesta da ospite (codice OTP, password) nella stessa offcanvas:
   contenuto centrato in verticale, pulsante alto come i campi del modulo */
.request-offcanvas .offcanvas-body.con-passo {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.request-offcanvas .btn-passo-richiesta {
    font-size: 16px;
    font-weight: 600;
}
