/* ============================================================
   Sindesi Core — Provider Public Page (v0.41.3)
   ------------------------------------------------------------
   Stili per `/dienstleister/{slug}/` — pagina vetrina Sindesi-native
   che sostituisce il template HP `vendor_view_page` a partire da v0.41.3.

   Precedente file `vendor-public.css` (v0.40.8.1 → v0.40.8.2) rimosso:
   conteneva solo lo stile `.sindesi-vendor-bio` per il blocco iniettato
   in sidebar HP tramite VendorPublicPageBio. Con la sostituzione full-page
   quello stile è dead code.

   Layout target: single-column, centered content, max-width contenuta.
   Coerente con la larghezza delle altre pagine detail Sindesi (Anfrage,
   Dienstleistung). Su mobile: stack verticale con avatar centrato.
   ============================================================ */

/* ---------- Base components (self-contained duplicati) ----------
   Questa pagina è servita su `/dienstleister/{slug}/` che NON matcha
   `Anfragen\AssetEnqueue::isSindesiPage()` (quel matcher copre la lista
   `/dienstleister/` senza slug ma non le detail). Anziché estendere il
   matcher e trascinare anche `anfragen.js` (motore autocomplete Google,
   card handlers) qui inutilmente, duplichiamo le poche classi base che
   usiamo: btn (primary/ghost), breadcrumb, empty-state. I valori sono
   copiati da `anfragen.css` — se un domani vengono estratti in un
   `base-components.css` condiviso, rimuovere questa sezione. */

.sindesi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1;
    white-space: nowrap;
}
.sindesi-btn:hover { transform: translateY(-1px); }
.sindesi-btn:active { transform: translateY(0); }
.sindesi-btn--primary {
    background: #0280DE;
    background-image: linear-gradient(135deg, #0280DE, #08B4BB);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 128, 222, 0.3);
}
.sindesi-btn--primary * { color: inherit !important; -webkit-text-fill-color: inherit !important; }
.sindesi-btn--ghost {
    background: transparent;
    color: #475569 !important;
    -webkit-text-fill-color: #475569;
    border: 1px solid #e2e8f0;
}

.sindesi-breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sindesi-breadcrumb a {
    color: #0280DE;
    text-decoration: none;
}
.sindesi-breadcrumb__sep { color: #cbd5e1; }
.sindesi-breadcrumb__current {
    color: #64748b;
    font-weight: 500;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.sindesi-empty-state {
    padding: 32px 24px;
    text-align: center;
}
.sindesi-empty-state__icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

/* ---------- Provider public page ---------- */

.sindesi-provider-public {
    padding: 24px 20px 64px;
}

.sindesi-provider-public__inner {
    max-width: 960px;
    margin: 0 auto;
}

/* ---------- Preview banner (owner + non-published) ---------- */
.sindesi-provider-public__preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8e5;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0 8px;
    color: #78350f;
    font-size: 14px;
    line-height: 1.5;
}

.sindesi-provider-public__preview-banner-icon {
    flex-shrink: 0;
    color: #b45309;
    margin-top: 2px;
}

.sindesi-provider-public__preview-banner-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sindesi-provider-public__preview-banner-body strong {
    font-weight: 600;
    color: #78350f;
}

/* ---------- Owner actions bar ---------- */
.sindesi-provider-public__owner-actions {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 16px;
}

.sindesi-provider-public__owner-actions .sindesi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Hero: avatar + nome + rating + città + bio + badge ---------- */
.sindesi-provider-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 32px;
}

.sindesi-provider-hero__avatar-wrap {
    flex-shrink: 0;
}

.sindesi-provider-hero__avatar {
    display: block;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    background: #f3f4f6;
    border: 2px solid #f3f4f6;
}

.sindesi-provider-hero__avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.sindesi-provider-hero__avatar--fallback svg {
    width: 64px;
    height: 64px;
}

.sindesi-provider-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0; /* consente wrap del bio */
}

.sindesi-provider-hero__name {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
    word-wrap: break-word;
}

.sindesi-provider-hero__rating {
    /* Il shortcode rating porta il proprio markup — qui solo posizionamento. */
    display: flex;
    align-items: center;
}

.sindesi-provider-hero__location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 15px;
}

.sindesi-provider-hero__location svg {
    color: #6b7280;
    flex-shrink: 0;
}

.sindesi-provider-hero__bio {
    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 640px;
}

/* ---------- Badge grid (lingue + Arbeitsradius) ---------- */
.sindesi-provider-hero__badges {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sindesi-provider-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 999px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.sindesi-provider-hero__badge svg {
    color: #6b7280;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ---------- Services section ---------- */
.sindesi-provider-services {
    margin-top: 8px;
}

.sindesi-provider-services__heading {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.sindesi-provider-services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.sindesi-provider-services__empty {
    padding: 40px 24px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    text-align: center;
}

.sindesi-provider-services__empty h3 {
    margin: 8px 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.sindesi-provider-services__empty p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
}

/* ---------- Service card (semplificata, opzione B) ---------- */
.sindesi-provider-service-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
}

.sindesi-provider-service-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.sindesi-provider-service-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

.sindesi-provider-service-card__image {
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sindesi-provider-service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sindesi-provider-service-card__image-fallback {
    color: #d1d5db;
}

.sindesi-provider-service-card__image-fallback svg {
    width: 48px;
    height: 48px;
}

.sindesi-provider-service-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.sindesi-provider-service-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sindesi-provider-service-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.sindesi-provider-service-card__price {
    font-size: 14px;
    font-weight: 600;
    color: #0280DE;
}

.sindesi-provider-service-card__mode {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

.sindesi-provider-service-card__mode svg {
    width: 14px;
    height: 14px;
}

.sindesi-provider-service-card__mode--online {
    background: #ecfdf5;
    color: #047857;
}

.sindesi-provider-service-card__mode--vor-ort {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ---------- 404 empty state ---------- */
.sindesi-provider-public--empty .sindesi-empty-state {
    padding: 64px 24px;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
    max-width: 480px;
    margin: 40px auto;
}

.sindesi-provider-public--empty .sindesi-empty-state h1 {
    margin: 12px 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.sindesi-provider-public--empty .sindesi-empty-state p {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 15px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
    .sindesi-provider-public {
        padding: 16px 12px 48px;
    }

    .sindesi-provider-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
        padding: 20px 16px;
    }

    .sindesi-provider-hero__avatar-wrap {
        display: flex;
        justify-content: center;
    }

    .sindesi-provider-hero__avatar {
        width: 96px;
        height: 96px;
    }

    .sindesi-provider-hero__avatar--fallback svg {
        width: 48px;
        height: 48px;
    }

    .sindesi-provider-hero__name {
        font-size: 22px;
    }

    .sindesi-provider-hero__rating,
    .sindesi-provider-hero__location {
        justify-content: center;
    }

    .sindesi-provider-hero__badges {
        justify-content: center;
    }

    .sindesi-provider-hero__bio {
        text-align: left;
    }

    .sindesi-provider-services__grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }

    .sindesi-provider-public__owner-actions {
        justify-content: stretch;
    }

    .sindesi-provider-public__owner-actions .sindesi-btn {
        width: 100%;
        justify-content: center;
    }
}

/*
 * v0.42.1 (ADR-0008) — Sezione "Melden" in fondo alla pagina profilo.
 * Il bottone stesso è definito in reports.css (self-contained). Qui
 * gestiamo solo lo spacing rispetto alla sezione servizi soprastante.
 */
.sindesi-provider-public__report {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

/*
 * v0.44.14 (ADR-0011) — CTA "Direktanfrage senden".
 * Blocco centrato tra hero e sezione servizi. Il pulsante riusa
 * `.sindesi-btn.sindesi-btn--primary` (definito in anfragen.css) per
 * coerenza con gli altri CTA primari della piattaforma. Sotto il pulsante
 * un hint testuale chiarisce la semantica "solo a questo provider".
 */
.sindesi-provider-public__inquiry-cta {
    margin: 28px 0 20px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.sindesi-provider-public__inquiry-cta .sindesi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
}

.sindesi-provider-public__inquiry-cta .sindesi-btn svg {
    flex-shrink: 0;
}

.sindesi-provider-public__inquiry-cta-hint {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    max-width: 480px;
}

@media (max-width: 640px) {
    .sindesi-provider-public__inquiry-cta {
        margin: 20px 0 16px;
        padding: 16px 18px;
    }
    .sindesi-provider-public__inquiry-cta .sindesi-btn {
        width: 100%;
        justify-content: center;
    }
}
