/**
 * com_pixcwh — Universal Classifieds — Frontend design system (2.0)
 *
 * Direzione: "editoriale di mercato" — inchiostro blu profondo su neutri caldi
 * tipo carta, ambra per le promozioni, numerali display Fraunces.
 * Base UIkit 3; tutte le classi cwh-* sono del componente.
 *
 * @package com_pixcwh
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,750&display=swap');

/* ========================================================================
   1. DESIGN TOKENS
   ======================================================================== */

:root {
  /* Inchiostro & interattivi */
  --cwh-ink:          #1c2b46;   /* testo forte, prezzi */
  --cwh-primary:      #24539b;   /* azioni, link (AA su bianco) */
  --cwh-primary-deep: #173a70;   /* hover */
  --cwh-primary-soft: #eef3fa;   /* fondi attivi tenui */
  --cwh-primary-ring: rgba(36, 83, 155, 0.35);

  /* Accenti */
  --cwh-accent:       #e2a23b;   /* ambra — featured */
  --cwh-accent-ink:   #7a5310;   /* testo su fondi ambra chiari */
  --cwh-accent-soft:  #fdf3e0;
  --cwh-danger:       #c03d2e;
  --cwh-danger-soft:  #fdf0ee;
  --cwh-success:      #2e7d4f;
  --cwh-success-soft: #ecf6f0;

  /* Neutri caldi (carta) */
  --cwh-surface:      #ffffff;
  --cwh-paper:        #faf8f3;   /* fondi sezione, chip */
  --cwh-paper-2:      #f2efe7;   /* hover dei chip */
  --cwh-border:       #e6e2d8;
  --cwh-border-soft:  #efece4;
  --cwh-text:         #2c3441;   /* corpo */
  --cwh-muted:        #5d6573;   /* secondario — 4.6:1 su bianco */
  --cwh-faint:        #8b91a0;   /* solo decorativo/icone */

  /* Tipografia */
  --cwh-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Raggi */
  --cwh-r-sm: 6px;
  --cwh-r-md: 10px;
  --cwh-r-lg: 16px;
  --cwh-r-pill: 999px;

  /* Ombre — calde, a strati */
  --cwh-shadow-sm: 0 1px 2px rgba(28, 43, 70, 0.06), 0 1px 1px rgba(28, 43, 70, 0.04);
  --cwh-shadow-md: 0 4px 14px rgba(28, 43, 70, 0.08), 0 2px 4px rgba(28, 43, 70, 0.05);
  --cwh-shadow-lg: 0 18px 40px rgba(28, 43, 70, 0.13), 0 4px 10px rgba(28, 43, 70, 0.06);

  /* Layout — altezza dell'header del template.
     Serve alla mappa sticky della lista (offset + altezza) e alle sidebar
     sticky. È l'unico punto da toccare se il template cambia header. */
  --cwh-header-h: 81px;

  /* Spaziatura */
  --cwh-gap-xs: 6px;
  --cwh-gap-sm: 10px;
  --cwh-gap-md: 16px;
  --cwh-gap-lg: 24px;
  --cwh-gap-xl: 40px;
}

/* ========================================================================
   2. ACCESSIBILITÀ DI BASE
   ======================================================================== */

/* Focus visibile coerente su tutti i controlli del componente */
[class*="cwh-"] a:focus-visible,
[class*="cwh-"] button:focus-visible,
[class*="cwh-"] input:focus-visible,
[class*="cwh-"] select:focus-visible,
[class*="cwh-"] textarea:focus-visible,
[class*="cwh-"] [tabindex]:focus-visible {
  outline: 3px solid var(--cwh-primary-ring);
  outline-offset: 2px;
  border-radius: var(--cwh-r-sm);
}

/* Riduzione del movimento */
@media (prefers-reduced-motion: reduce) {
  [class*="cwh-"],
  [class*="cwh-"]::before,
  [class*="cwh-"]::after,
  [class*="cwh-"] * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Stato disabilitato reale */
[class*="cwh-"] button:disabled,
[class*="cwh-"] a[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Solo screen reader */
.cwh-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================================
   3. FORM WIZARD — MODALITÀ EDIT
   ======================================================================== */

/* Il contatore "Step X di 8" nei pannelli non serve più: il contatore vive
   nella barra di navigazione sezioni (layout unico crea/modifica). */
#cwh-ad-form .cwh-step-counter { display: none; }
#cwh-ad-form .cwh-wizard-panel + .cwh-wizard-panel { margin-top: 2rem; }

/* ========================================================================
   4. CARD ANNUNCIO — MOSAICO
   ======================================================================== */

.cwh-ad-card-mosaic {
  overflow: hidden;
  border-radius: var(--cwh-r-lg);
  border: 1px solid var(--cwh-border);
  background: var(--cwh-surface);
  box-shadow: var(--cwh-shadow-sm);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease, border-color 0.3s ease;
  margin-bottom: var(--cwh-gap-lg);
}

.cwh-ad-card-mosaic:hover {
  box-shadow: var(--cwh-shadow-lg);
  border-color: #d8d3c5;
  transform: translateY(-3px);
}

.cwh-ad-card-mosaic:hover .cwh-mosaic-main img {
  transform: scale(1.03);
}

/* ── Pacchetti visibilità ─────────────────────────────────────────────
   Il BORDO DORATO è riservato a "In evidenza". TOP e PREMIUM si distinguono
   solo per badge (e TOP per la foto più grande): nessun bordo colorato. */
.cwh-ad-card--top {
  box-shadow: var(--cwh-shadow-md);
}

/* TOP: "foto di dimensione maggiore" — colonna media ~20% più alta della base
   (220px → 265px), abbastanza da leggersi a colpo d'occhio senza sbilanciare
   la card quando si somma a "In evidenza". */
.cwh-ad-card--top .cwh-mosaic-main,
.cwh-ad-card--top .cwh-mosaic-main .uk-slideshow-items {
  min-height: 265px;
}

/* PREMIUM: solo badge, nessuno stile bordo dedicato */

/* IN EVIDENZA: bordo dorato pieno e ben visibile + tinta ambra + alone tenue */
.cwh-ad-card--featured {
  border: 2px solid var(--cwh-accent);
  background: linear-gradient(var(--cwh-accent-soft), var(--cwh-surface));
  box-shadow: 0 0 0 3px var(--cwh-accent-soft), var(--cwh-shadow-md);
}

.cwh-badge-status--premium {
  background: var(--cwh-primary);
  color: #fff;
}

.cwh-badge-status--evidenza {
  background: var(--cwh-accent-soft);
  color: var(--cwh-accent-ink);
  border: 1px solid var(--cwh-accent);
}

/* === Media area === */

.cwh-mosaic-container {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cwh-mosaic-main {
  position: relative;
  background: var(--cwh-paper-2);
  width: 100%;
  height: 100%;
  min-height: 220px;
  overflow: hidden;
}

.cwh-mosaic-main img {
  transition: transform 0.5s cubic-bezier(0.25, 0.45, 0.45, 0.95);
}

.cwh-mosaic-main .uk-slideshow-items {
  height: 100% !important;
  min-height: 220px;
}

.cwh-mosaic-overlay { z-index: 2; }
.cwh-mosaic-nav     { z-index: 3; }

.cwh-badge-status {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--cwh-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cwh-badge-status--top {
  background: var(--cwh-accent);
  color: #2c1d04;
}

.cwh-mosaic-type-label {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--cwh-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: var(--cwh-shadow-md);
}

.cwh-mosaic-counter {
  background: rgba(28, 43, 70, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--cwh-r-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.cwh-mosaic-nav {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--cwh-ink) !important;
  border-radius: 50% !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cwh-shadow-md);
  transition: all 0.2s;
}

/* uk-position-center-left/right centra con translateY(-50%): va mantenuto
   nell'hover, altrimenti la freccia perde la centratura e scende. */
.cwh-mosaic-nav:hover {
  background: #fff !important;
  transform: translateY(-50%) scale(1.1);
}

/* === Content area === */

.cwh-mosaic-content {
  padding: 16px 20px !important;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cwh-surface);
}

.cwh-advertiser-logo {
  max-width: 140px;
  max-height: 45px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cwh-advertiser-logo img {
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

/* Nome dello spazio accanto al logo (operatori di coworking) */
.cwh-advertiser-logo__name {
  font-size: 12px;
  font-weight: 700;
  color: var(--cwh-muted);
  line-height: 1.2;
  text-align: right;
}

/* ── Riga persone ─────────────────────────────────────────────────────
   Chi lavora già nello spazio: è il contenuto che distingue il prodotto,
   quindi ha un linguaggio visivo tutto suo, mai quello dei chip dotazioni. */
.cwh-people {
  display: flex;
  align-items: center;
  gap: var(--cwh-gap-sm);
  padding: 10px 12px;
  margin: 0 0 12px;
  background: var(--cwh-paper);
  border: 1px solid var(--cwh-border-soft);
  border-radius: var(--cwh-r-md);
}

.cwh-people__count {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cwh-primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

/* Spazio ancora tutto libero: cerchio "vuoto", tratteggiato */
.cwh-people--empty .cwh-people__count {
  background: transparent;
  color: var(--cwh-primary);
  border: 2px dashed var(--cwh-primary);
}

.cwh-people__text {
  flex: 1 1 auto;
  min-width: 0;
}

.cwh-people__headline {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--cwh-ink);
  line-height: 1.3;
}

.cwh-people__sep   { color: var(--cwh-faint); margin: 0 2px; }
.cwh-people__types { font-weight: 500; color: var(--cwh-text); }

.cwh-people__sectors {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--cwh-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge "Cercano N coworker": verde, mai ambra (riservata ai pacchetti) */
.cwh-people__seeking {
  flex: 0 0 auto;
  align-self: center;
  padding: 5px 12px;
  border-radius: var(--cwh-r-pill);
  background: var(--cwh-success-soft);
  color: var(--cwh-success);
  border: 1px solid var(--cwh-success);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .cwh-people { flex-wrap: wrap; }
  .cwh-people__seeking { order: 3; width: 100%; text-align: center; }
  .cwh-people__sectors { white-space: normal; }
}

/* Prezzo + location affiancati, per recuperare spazio verticale */
.cwh-mosaic-price-loc {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 12px;
}

/* Prezzo — numerale display Fraunces: la firma visiva del portale */
.cwh-mosaic-price {
  font-family: var(--cwh-font-display);
  font-size: 1.85rem;
  font-weight: 750;
  color: var(--cwh-ink);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}

.cwh-mosaic-price-unit {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cwh-muted);
  margin-left: 2px;
}

.cwh-mosaic-price-note {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--cwh-muted);
  margin-left: 8px;
}

.cwh-mosaic-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 6px 0 0;
}

.cwh-mosaic-title a {
  color: var(--cwh-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.cwh-mosaic-title a:hover {
  color: var(--cwh-primary-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cwh-mosaic-location {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cwh-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cwh-mosaic-location i,
.cwh-mosaic-location svg {
  color: var(--cwh-faint);
}

/* Feature bar — chip dai campi personalizzati "show in card" */
.cwh-mosaic-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 10px 0 0;
  margin-bottom: 0;
}

.cwh-feat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cwh-text);
  background: var(--cwh-paper);
  border: 1px solid var(--cwh-border-soft);
  border-radius: var(--cwh-r-sm);
  white-space: nowrap;
}

.cwh-feat svg,
.cwh-feat i {
  color: var(--cwh-muted);
  flex-shrink: 0;
}

.cwh-feat--more {
  font-weight: 700;
  color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
  border-color: #d4e0f0;
}

.cwh-mosaic-description {
  font-size: 0.95rem;
  color: var(--cwh-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 10px 0 0;
}

/* Actions footer */
.cwh-mosaic-actions {
  margin-top: auto;
  padding-top: 12px;
  gap: 12px;
}

.cwh-actions-left  { gap: 12px; flex-wrap: wrap; }
.cwh-actions-right { gap: 10px; flex-shrink: 0; }

.cwh-mosaic-actions .cwh-btn-main {
  background: var(--cwh-surface);
  border: 1.5px solid var(--cwh-primary);
  color: var(--cwh-primary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--cwh-r-md);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

.cwh-mosaic-actions .cwh-btn-main:hover {
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary-deep);
}

.cwh-mosaic-actions .cwh-btn-main--primary {
  background: var(--cwh-primary);
  border-color: var(--cwh-primary);
  color: #fff;
}

.cwh-mosaic-actions .cwh-btn-main--primary:hover {
  background: var(--cwh-primary-deep);
  border-color: var(--cwh-primary-deep);
  color: #fff;
}

.cwh-btn-util {
  background: var(--cwh-paper);
  border: 1px solid var(--cwh-border);
  color: var(--cwh-faint);
  width: 44px;
  height: 44px;
  font-size: 1rem;
  padding: 0;
  border-radius: var(--cwh-r-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cwh-btn-util:hover {
  color: var(--cwh-ink);
  background: var(--cwh-paper-2);
  border-color: #d4cfc2;
}

.cwh-favourite-btn.is-active {
  color: var(--cwh-danger);
  background: var(--cwh-danger-soft);
  border-color: #ecc6c0;
}

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

@media (max-width: 959px) {
  .cwh-mosaic-content { padding: 16px 18px !important; }

  .cwh-advertiser-logo {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .cwh-mosaic-main { height: 220px; }
}

@media (max-width: 639px) {
  .cwh-mosaic-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cwh-actions-left { width: 100%; }
  .cwh-actions-left .cwh-btn-main { flex: 1 1 0; }
  .cwh-actions-right { width: 100%; justify-content: flex-end; }
}

/* ========================================================================
   5. BADGE
   ======================================================================== */

.cwh-badge-cat      { background: var(--cwh-ink); color: #fff; }
.cwh-badge-featured { background: var(--cwh-accent); color: #2c1d04; }
.cwh-badge-top      { background: var(--cwh-danger); color: #fff; }
.cwh-badge-verified { color: var(--cwh-primary); }

/* ========================================================================
   6. PREZZO (varianti generiche)
   ======================================================================== */

.cwh-price {
  font-family: var(--cwh-font-display);
  font-size: 1.5rem;
  font-weight: 750;
  color: var(--cwh-ink);
  line-height: 1.2;
}

.cwh-price__unit {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--cwh-muted);
  margin-left: 2px;
}

.cwh-price--inline { font-size: 1.1rem; }

/* ========================================================================
   7. FILTRI — SIDEBAR / OFFCANVAS / CHIP BAR
   ======================================================================== */

.cwh-filters-sidebar {
  position: sticky;
  top: var(--cwh-header-h);
  max-height: calc(100vh - var(--cwh-header-h) - 20px);
  overflow-y: auto;
  padding-right: 4px;
}

.cwh-filters-sidebar::-webkit-scrollbar { width: 4px; }
.cwh-filters-sidebar::-webkit-scrollbar-thumb {
  background: var(--cwh-border);
  border-radius: 2px;
}

.cwh-filter-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cwh-border-soft);
}

.cwh-filter-section:last-child { border-bottom: none; }

.cwh-filter-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--cwh-muted);
  margin-bottom: 10px;
  display: block;
}

/* Riga checkbox filtro (generata dai campi personalizzati) */
.cwh-filter-check {
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--cwh-text);
}

.cwh-filter-check:hover { color: var(--cwh-ink); }

.cwh-filter-field { margin-bottom: 14px; }

.cwh-range-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cwh-range-inputs input { flex: 1; min-width: 0; }
.cwh-range-inputs span  { color: var(--cwh-faint); flex-shrink: 0; }

/* (Il toggle Lista/Mappa è stato rimosso in 2.10.0: la mappa è sempre visibile
   accanto ai risultati, non è più una vista alternativa.) */

/* ── Filtri: un solo form, due presentazioni (2.10.1) ──────────────────
   Desktop: chip bar in linea. Mobile: lo stesso form diventa un pannello a
   tutto schermo quando riceve `.cwh-filters--open`. Nessun secondo form,
   nessun controllo duplicato, nessun id ripetuto. */

/* Intestazione e azioni servono solo al pannello mobile */
.cwh-filters__head,
.cwh-filters__actions { display: none; }

@media (max-width: 959px) {
  /* Chiuso: il form non occupa spazio; si apre dal pulsante "Filtri" */
  .cwh-filters { display: none; }

  .cwh-filters.cwh-filters--open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1015;
    overflow-y: auto;
    padding: 0 var(--cwh-gap-md) var(--cwh-gap-lg);
    background: var(--cwh-surface);
  }

  .cwh-filters--open .cwh-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    padding: var(--cwh-gap-md) 0;
    background: var(--cwh-surface);
    border-bottom: 1px solid var(--cwh-border);
  }

  .cwh-filters__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cwh-ink);
  }

  .cwh-filters__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cwh-border);
    border-radius: 50%;
    background: var(--cwh-surface);
    color: var(--cwh-text);
    cursor: pointer;
  }

  /* Nel pannello i gruppi si impilano e le tendine restano sempre aperte:
     i pulsanti-chip non servono, i pannelli diventano statici. */
  .cwh-filters--open .cwh-chips-bar {
    display: block;
    padding: var(--cwh-gap-md) 0 0;
  }

  .cwh-filters--open .cwh-chip-group { margin-bottom: var(--cwh-gap-md); }
  .cwh-filters--open .uk-button.cwh-chip { display: none; }

  .cwh-filters--open .cwh-chip-group .uk-drop {
    display: block !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    opacity: 1 !important;
  }

  .cwh-filters--open .cwh-chip-panel {
    min-width: 0 !important;
    width: auto !important;
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  /* I pulsanti "Applica" dentro le singole tendine sono ridondanti qui */
  .cwh-filters--open .cwh-chip-panel button[type="submit"] { display: none; }

  .cwh-filters--open .cwh-filters__actions {
    display: block;
    position: sticky;
    bottom: 0;
    padding: var(--cwh-gap-md) 0;
    background: var(--cwh-surface);
    border-top: 1px solid var(--cwh-border);
  }

  /* Il reset a forma di chip appartiene alla barra desktop */
  .cwh-filters--open a.cwh-chip--reset { display: none; }
}

.cwh-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.cwh-chip-group { position: relative; }

.uk-button.cwh-chip,
a.cwh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-pill);
  background: var(--cwh-surface);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cwh-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.uk-button.cwh-chip:hover,
a.cwh-chip:hover {
  border-color: var(--cwh-primary);
  color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
}

.cwh-chip-group--active .uk-button.cwh-chip {
  background: var(--cwh-ink);
  border-color: var(--cwh-ink);
  color: #fff;
}

.cwh-chip-group--active .uk-button.cwh-chip:hover {
  background: var(--cwh-primary-deep);
  border-color: var(--cwh-primary-deep);
  color: #fff;
}

a.cwh-chip--reset {
  padding: 7px 11px;
  color: var(--cwh-muted);
  border-color: var(--cwh-border);
  background: var(--cwh-paper);
  text-decoration: none;
}

a.cwh-chip--reset:hover {
  background: var(--cwh-danger);
  border-color: var(--cwh-danger);
  color: #fff;
}

.cwh-chip-arrow { transition: transform 0.2s; }
.cwh-chip-group:has(.uk-open) .cwh-chip-arrow { transform: rotate(180deg); }

.cwh-chip-panel {
  box-shadow: var(--cwh-shadow-lg);
  border-radius: var(--cwh-r-md);
  border: 1px solid var(--cwh-border-soft);
  margin-top: 4px;
}

/* Pannello chip di un gruppo campi: largo e a più colonne su desktop, così i
   campi non formano una colonna lunghissima e stretta. */
.cwh-chip-panel--group { width: min(620px, 92vw); }

.cwh-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 20px;
}

.cwh-filter-grid .cwh-filter-field { margin-bottom: 12px; }

/* Liste di opzioni (multiselect): 1 colonna su mobile, 2 da tablet.
   Il modificatore --4 passa a 4 colonne da desktop (liste lunghe). */
.cwh-filter-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 16px;
}
@media (min-width: 640px) {
  .cwh-filter-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .cwh-filter-checklist--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* il multiselect occupa l'intera larghezza del pannello per dare spazio alle 2 colonne */
.cwh-filter-grid .cwh-filter-field:has(.cwh-filter-checklist) { grid-column: 1 / -1; }

/* ========================================================================
   8. DETTAGLIO ANNUNCIO (blocchi generici legacy)
   ======================================================================== */

.cwh-detail-header { margin-bottom: 24px; }

.cwh-detail-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cwh-detail-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0;
}

.cwh-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--cwh-gap-md);
  margin: 20px 0;
}

.cwh-detail-grid-item { display: flex; flex-direction: column; }

.cwh-detail-grid-item__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cwh-muted);
  margin-bottom: 2px;
}

.cwh-detail-grid-item__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cwh-ink);
}

.cwh-sticky-sidebar { position: sticky; top: var(--cwh-header-h); }

.cwh-advertiser-card { text-align: center; padding: 20px; }

.cwh-advertiser-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
}

.cwh-advertiser-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--cwh-paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--cwh-faint);
}

/* ========================================================================
   9. STATISTICHE
   ======================================================================== */

.cwh-stats-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--cwh-gap-md);
  text-align: center;
  padding: var(--cwh-gap-md);
  background: var(--cwh-paper);
  border-radius: var(--cwh-r-md);
}

.cwh-stat-value {
  font-family: var(--cwh-font-display);
  font-size: 1.5rem;
  font-weight: 750;
  color: var(--cwh-primary);
}

.cwh-stat-label {
  font-size: 0.75rem;
  color: var(--cwh-muted);
  margin-top: 2px;
}

/* ========================================================================
   10. PAGINAZIONE
   ======================================================================== */

.cwh-pagination-wrapper {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

/* ========================================================================
   11. RESPONSIVE GENERALE
   ======================================================================== */

@media (max-width: 639px) {
  .cwh-cover-43 { aspect-ratio: 16 / 9; }
  .cwh-card-title { white-space: normal; }
}

@media (max-width: 959px) {
  .cwh-filters-sidebar { display: none; }
  .cwh-filters-drawer-trigger { display: inline-flex !important; }
  .cwh-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .cwh-filters-drawer-trigger { display: none !important; }
}

@media (max-width: 479px) {
  .cwh-detail-grid { grid-template-columns: 1fr; }
  .cwh-price { font-size: 1.25rem; }
}

/* ========================================================================
   12. FORM WIZARD — STEPPER
   ======================================================================== */

.cwh-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  vertical-align: middle;
}

#cwh-wizard-nav > li.cwh-step-done { opacity: 0.65; }

.cwh-step-counter {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cwh-accent-ink);
  background: var(--cwh-accent-soft);
  border-radius: var(--cwh-r-pill);
  padding: 4px 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: inline-block;
}

/* Nav laterale (modalità edit) */
.cwh-wizard-nav-side .cwh-step-num {
  width: 28px;
  height: 28px;
  background: var(--cwh-paper-2);
  color: var(--cwh-muted);
  border: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.cwh-wizard-nav-side li.uk-active .cwh-step-num {
  background: var(--cwh-primary);
  color: #fff;
}

.cwh-wizard-nav-side li.cwh-step-done .cwh-step-num {
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary);
}

.cwh-wizard-nav-side .cwh-step-title {
  font-size: 0.95rem;
  font-weight: 500;
}

.cwh-wizard-nav-side li.uk-active .cwh-step-title {
  color: var(--cwh-primary);
  font-weight: 700;
}

.cwh-nav-link {
  padding: 10px 15px !important;
  border-radius: var(--cwh-r-md);
  transition: background 0.2s;
  display: flex;
  align-items: center;
}

.cwh-nav-link:hover {
  background: var(--cwh-paper);
  text-decoration: none !important;
}

/* Pulsanti navigazione wizard */
.cwh-wizard-nav-buttons .uk-button { border-radius: var(--cwh-r-md); }

/* ===== Modalità MODIFICA: tab orizzontali + navigazione + azioni ===== */

/* Barra tab in alto (sticky su desktop) */
.cwh-edit-tabs-wrap {
  background: var(--cwh-surface);
  margin-bottom: var(--cwh-gap-lg);
  z-index: 90;
}
.cwh-edit-tabs-wrap--stuck {
  box-shadow: var(--cwh-shadow-md);
}
.cwh-edit-tabs > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-size: 0.92rem;
  letter-spacing: 0;
  color: var(--cwh-muted);
  padding: 14px 14px;
}
.cwh-edit-tabs > li.uk-active > a { color: var(--cwh-primary); }
.cwh-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cwh-paper-2);
  color: var(--cwh-muted);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.cwh-edit-tabs > li.uk-active .cwh-tab-num {
  background: var(--cwh-primary);
  color: #fff;
}
.cwh-edit-tabs > li > a:hover .cwh-tab-num {
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary);
}

@media (max-width: 959px) {
  .cwh-tab-label { display: none; }            /* su mobile: solo numeri */
  .cwh-edit-tabs > li > a { padding: 12px 10px; }
}

/* Navigazione tra le sezioni (avanti / contatore / indietro) */
.cwh-edit-stepnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cwh-edit-stepnav__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--cwh-r-md);
}
.cwh-edit-stepnav__counter {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cwh-ink);
  white-space: nowrap;
}

/* Barra azioni di salvataggio: separata da un bordo superiore */
.cwh-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: var(--cwh-gap-md);
  padding-top: var(--cwh-gap-md);
  border-top: 1px solid var(--cwh-border);
}
.cwh-edit-actions__cancel { color: var(--cwh-muted); }
.cwh-edit-actions__cancel:hover { color: var(--cwh-danger); }
.cwh-edit-actions__save {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cwh-edit-actions .uk-button { border-radius: var(--cwh-r-md); }

@media (max-width: 639px) {
  .cwh-edit-actions { flex-direction: column-reverse; align-items: stretch; }
  .cwh-edit-actions__save { flex-direction: column; align-items: stretch; }
  .cwh-edit-actions__cancel { text-align: center; }
}

/* ========================================================================
   13. WIZARD STEP 1 — CARD CATEGORIA
   ======================================================================== */

.cwh-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  box-sizing: border-box;
  cursor: pointer;
  border: 2px solid var(--cwh-border);
  border-radius: var(--cwh-r-lg);
  padding: 22px 16px;
  text-align: center;
  background: var(--cwh-surface);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cwh-type-card:hover {
  border-color: #b9cce8;
  transform: translateY(-2px);
  box-shadow: var(--cwh-shadow-md);
}

.cwh-type-card:has(.cwh-type-card__input:checked) {
  border-color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
  box-shadow: 0 0 0 3px var(--cwh-primary-ring);
}

.cwh-type-card:has(.cwh-type-card__input:focus-visible) {
  outline: 3px solid var(--cwh-primary-ring);
  outline-offset: 2px;
}

.cwh-type-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cwh-type-card__icon {
  color: var(--cwh-primary);
  margin-bottom: 6px;
}

.cwh-type-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cwh-ink);
}

.cwh-type-card__desc {
  font-size: 0.78rem;
  color: var(--cwh-muted);
  line-height: 1.35;
}

/* ========================================================================
   13b. CARD CATEGORIE (indice / sottocategorie)
   ======================================================================== */

.cwh-cat-grid {
  margin-top: 0;
}

.cwh-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  border: 1px solid var(--cwh-border);
  border-radius: var(--cwh-r-lg);
  background: var(--cwh-surface);
  box-shadow: var(--cwh-shadow-sm);
  padding: 22px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cwh-cat-card:hover,
.cwh-cat-card:focus-visible {
  border-color: #b9cce8;
  box-shadow: var(--cwh-shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}

.cwh-cat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--cwh-r-md);
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary);
  margin-bottom: 14px;
}

.cwh-cat-card__title {
  font-family: var(--cwh-font-display);
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--cwh-ink);
  line-height: 1.25;
}

.cwh-cat-card__desc {
  font-size: 0.85rem;
  color: var(--cwh-muted);
  line-height: 1.45;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cwh-cat-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.cwh-cat-card__count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
  border-radius: var(--cwh-r-pill);
  padding: 4px 12px;
}

.cwh-cat-card__sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--cwh-muted);
}

.cwh-subcat-section { /* griglia sottocategorie sopra la lista annunci */
  border-bottom: 1px solid var(--cwh-border-soft);
  padding-bottom: var(--cwh-gap-lg);
}

/* Card categoria compatte quando la griglia è a 6 colonne (desktop largo) */
@media (min-width: 1200px) {
  .cwh-cat-card { padding: 16px 14px; }
  .cwh-cat-card__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
  }
  .cwh-cat-card__title { font-size: 1rem; }
  .cwh-cat-card__desc  { display: none; }
  .cwh-cat-card__meta  { margin-top: 10px; gap: 8px; }
}

/* ========================================================================
   14. WIZARD STEP 3 — CAMPI DINAMICI
   ======================================================================== */

.cwh-dyn-field .uk-form-label { margin-bottom: 5px; display: inline-block; }

/* Intestazione di sezione/gruppo (wizard) */
.cwh-dyn-group > .uk-heading-bullet {
  font-family: var(--cwh-font-display);
  font-weight: 650;
  color: var(--cwh-ink);
}

/* --- Ricerca avanzata, step 3: gruppi a card -----------------------------
   La view "search" carica solo frontend.css (non account.css), quindi qui NON
   è disponibile .cwh-glass: i gruppi hanno uno stile a card autonomo. */
.cwh-search-groups { margin-bottom: var(--cwh-gap-lg, 24px); }

.cwh-search-group {
  background: var(--cwh-surface);
  border: 1px solid var(--cwh-border);
  border-radius: var(--cwh-r-lg);
  box-shadow: var(--cwh-shadow-sm);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.cwh-search-group:last-child { margin-bottom: 0; }

/* I gruppi principali (community) hanno un filo d'accento per distinguerli. */
.cwh-search-groups .cwh-search-group {
  border-left: 3px solid var(--cwh-primary);
}

.cwh-search-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--cwh-font-display);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--cwh-ink);
}
.cwh-search-group__title [uk-icon] { color: var(--cwh-primary); flex-shrink: 0; }

/* Accordion "Filtri avanzati" — barra contenuta, contenuto a card. */
.cwh-search-advanced { margin-top: 4px; }

.cwh-search-accordion { margin: 0; }

.cwh-search-advanced .uk-accordion-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--cwh-paper);
  border: 1px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  padding: 14px 18px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--cwh-ink);
  text-transform: none;
  transition: background 0.15s, border-color 0.15s;
}
.cwh-search-advanced .uk-accordion-title::before {
  margin-left: 0; /* sovrascrive il chevron a destra di default di UIkit */
}
.cwh-search-advanced .uk-accordion-title:hover {
  background: var(--cwh-paper-2);
  border-color: var(--cwh-primary);
}

.cwh-search-advanced .uk-accordion-content {
  margin-top: 14px;
}

.cwh-field-suffix {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cwh-muted);
  width: auto !important;
  padding: 0 12px;
}

/* Testo di aiuto sotto un campo personalizzato */
.cwh-field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--cwh-muted);
  margin: 6px 0 0;
}
.cwh-field-hint [uk-icon] { flex-shrink: 0; margin-top: 1px; }

/* Spaziatore alto come una label: allinea i checkbox (senza label) ai campi
   con label come le select sulla stessa riga. */
.cwh-feature-spacer {
  display: block;
}

/* Toggle "caratteristica" (checkbox) */
.cwh-feature-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  background: var(--cwh-surface);
  padding: 7px 11px;
  min-height: 40px; /* = altezza di .uk-input/.uk-select: il box si allinea alla select */
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cwh-text);
  transition: border-color 0.15s, background 0.15s;
}

/* Nella card di sole "Caratteristiche" (tutti checkbox) lo spaziatore non serve */
#cwh-dyn-features .cwh-feature-spacer {
  display: none;
}

.cwh-feature-toggle:hover { border-color: #b9cce8; }

.cwh-feature-toggle:has(input:checked) {
  border-color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary-deep);
  font-weight: 600;
}

.cwh-feature-toggle input { flex-shrink: 0; margin: 0; }

.cwh-feature-toggle__label { line-height: 1.3; }

/* Pillole radio / checkbox-group */
.cwh-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Gruppi di checkbox (multiselect): colonne di pari larghezza invece del
   classico effetto "mosaico". 1 colonna su mobile, 2 colonne quando c'è spazio. */
.cwh-check-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .cwh-check-group {
    grid-template-columns: 1fr 1fr;
  }
}

/* "Settori ideali": molte opzioni brevi → fino a 4 colonne su desktop. */
@media (min-width: 960px) {
  .cwh-dyn-field[data-field="welcome_sectors"] .cwh-check-group {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cwh-radio-pill,
.cwh-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-pill);
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--cwh-text);
  background: var(--cwh-surface);
  transition: border-color 0.15s, background 0.15s;
}

.cwh-radio-pill:hover,
.cwh-check-pill:hover { border-color: #b9cce8; }

.cwh-radio-pill:has(input:checked),
.cwh-check-pill:has(input:checked) {
  border-color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
  color: var(--cwh-primary-deep);
  font-weight: 600;
}

.cwh-radio-pill input,
.cwh-check-pill input { margin: 0; }

/* ========================================================================
   15. WIZARD — DURATA, RIEPILOGO, GALLERIA
   ======================================================================== */

.cwh-duration-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cwh-duration-card {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border: 2px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.cwh-duration-card input[type="radio"] { display: none; }

.cwh-duration-card:has(input:checked) {
  border-color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
}

.cwh-duration-card__days {
  font-family: var(--cwh-font-display);
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--cwh-primary);
}

.cwh-summary-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  font-size: 0.875rem;
}

.cwh-summary-dl dt {
  font-weight: 600;
  color: var(--cwh-muted);
}

.cwh-gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.cwh-gallery-item {
  position: relative;
  border-radius: var(--cwh-r-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--cwh-paper-2);
}

.cwh-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cwh-gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(28, 43, 70, 0.65);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.cwh-gallery-remove:hover,
.cwh-gallery-remove:focus-visible { background: var(--cwh-danger); }

/* Zona upload con errore di validazione */
.cwh-upload-error {
  border: 2px solid var(--cwh-danger) !important;
  border-radius: var(--cwh-r-md);
  background: var(--cwh-danger-soft) !important;
}

/* Step 2 form — override max-width da UIkit/YOOtheme su campi indirizzo */
#field-address,
#field-street,
#field-zone {
  max-width: none !important;
  width: 100% !important;
}

/* =============================================================
   Wizard step "Località" — layout compatto a 2 colonne (desktop)
   Campi a sinistra (2/3), mappa a destra (1/3); su mobile impilati.
   ============================================================= */
.cwh-loc-map {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  border: 1px solid var(--cwh-border, #e5e5e5);
}

.cwh-loc-map-wrap {
  position: sticky;
  top: 12px;
}

@media (min-width: 960px) {
  /* La mappa riempie in altezza la colonna dei campi, dentro il viewport */
  .cwh-loc-map { height: 430px; }
}

/* =============================================================
   Crea/Modifica annuncio — densità desktop ridotta (sta nel viewport).
   Layout unico: vale per entrambe le modalità.
   ============================================================= */
@media (min-width: 960px) {
  #cwh-ad-form .cwh-wizard-panel > .uk-text-center:first-child {
    margin-bottom: .4rem;
  }
  #cwh-ad-form .cwh-wizard-panel > .uk-text-center:first-child > h2 {
    font-size: 1.25rem;
    margin-top: 0;
  }
  #cwh-ad-form .cwh-wizard-panel > .uk-text-center:first-child > p {
    margin-top: .2rem;
    margin-bottom: 0;
    font-size: .9rem;
  }
  #cwh-ad-form .uk-card-body {
    padding: 1.1rem 1.3rem;
  }
  #cwh-ad-form .cwh-edit-stepnav.uk-margin-large-top {
    margin-top: 1rem;
  }
}

/* =============================================================
   "Concludi riga": spezza la riga della griglia flex (form + dettaglio)
   ============================================================= */
.cwh-dyn-break,
.cwh-grid-break {
  width: 100%;
  flex-basis: 100%;
  height: 0;
  margin: 0;
  padding: 0 !important;
}

/* =============================================================
   Step Foto: cursore "mano" SOLO sul pulsante "Clicca qui per caricare"
   (l'area circostante serve solo per il drag&drop).
   NB: con uk-form-custom l'hover lo riceve l'input file trasparente
   sovrapposto al pulsante → il cursore va forzato anche lì.
   ============================================================= */
#cwh-cover-dropzone [uk-form-custom],
#cwh-cover-dropzone [uk-form-custom] *,
#cwh-cover-dropzone [uk-form-custom] input[type="file"],
#cwh-gallery-dropzone [uk-form-custom],
#cwh-gallery-dropzone [uk-form-custom] *,
#cwh-gallery-dropzone [uk-form-custom] input[type="file"],
.cwh-upload-btn {
  cursor: pointer !important;
}

.cwh-upload-btn {
  border-radius: var(--cwh-r-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =============================================================
   Step Visibilità — sezione promozioni "catchy" (call to action)
   ============================================================= */
.cwh-promo-hero {
  text-align: center;
  margin-bottom: 18px;
}

.cwh-promo-hero__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--cwh-font-display);
  font-weight: 750;
  font-size: 1.45rem;
  color: var(--cwh-ink);
}

.cwh-promo-hero__title [uk-icon] { color: var(--cwh-accent); }

.cwh-promo-hero__sub {
  margin: 4px 0 0;
  color: var(--cwh-muted);
  font-size: 0.9rem;
}

/* Step 8 — layout compatto: esempio a sinistra, scelte a destra (desktop).
   Obiettivo: stare in una viewport da portatile FullHD senza scrollare. */
.cwh-promo-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}
@media (min-width: 960px) {
  .cwh-promo-layout { grid-template-columns: 1fr 1fr; }
}

/* L'anteprima riempie la sua colonna invece di restare stretta e centrata */
.cwh-promo-layout__example .cwh-promo-ladder {
  max-width: none;
  margin: 0;
}

/* Titolo "Seleziona un'opzione" sopra le 3 scelte */
.cwh-promo-choices__title {
  margin: 0 0 12px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cwh-ink);
}

/* Card scelta più compatte quando impilate nella colonna destra */
.cwh-promo-layout__choices .cwh-pt-card { padding: 12px 14px; gap: 8px; }
.cwh-promo-layout__choices .cwh-pt-card__perks { gap: 2px; }
.cwh-promo-layout__choices .cwh-pt-none { margin-top: 6px; }

/* Card grandi Premium / Top (radio esclusivi) */
.cwh-pt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  padding: 20px 18px 16px;
  border: 2px solid var(--cwh-border);
  border-radius: var(--cwh-r-lg);
  background: var(--cwh-surface);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .2s, transform .2s;
}

.cwh-pt-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cwh-shadow-md);
}

.cwh-pt-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cwh-pt-card--premium { border-color: var(--cwh-primary); }
.cwh-pt-card--top     { border-color: var(--cwh-accent); }

.cwh-pt-card--premium.is-active {
  background: var(--cwh-primary-soft);
  box-shadow: 0 0 0 3px var(--cwh-primary-ring), var(--cwh-shadow-md);
}

.cwh-pt-card--top.is-active {
  background: var(--cwh-accent-soft);
  box-shadow: 0 0 0 3px rgba(226, 162, 59, 0.4), var(--cwh-shadow-md);
}

.cwh-pt-card__ribbon {
  position: absolute;
  top: -10px;
  right: 14px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cwh-accent);
  color: #2c1d04;
  box-shadow: var(--cwh-shadow-sm);
}

.cwh-pt-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cwh-pt-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cwh-pt-card--premium .cwh-pt-card__icon { background: var(--cwh-primary); color: #fff; }
.cwh-pt-card--top     .cwh-pt-card__icon { background: var(--cwh-accent);  color: #2c1d04; }

.cwh-pt-card__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cwh-ink);
}

.cwh-pt-card__perks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cwh-pt-card__perk {
  font-size: 0.82rem;
  color: var(--cwh-text);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.cwh-pt-card__perk [uk-icon] { color: var(--cwh-success); flex-shrink: 0; margin-top: 2px; }

.cwh-pt-card__price {
  margin-top: auto;
  font-weight: 800;
  font-size: 0.95rem;
}

.cwh-pt-card--premium .cwh-pt-card__price { color: var(--cwh-primary); }
.cwh-pt-card--top     .cwh-pt-card__price { color: var(--cwh-accent-ink); }

/* "Continua gratis": piccolo e discreto, ma con selezione ben visibile */
.cwh-pt-none {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--cwh-muted);
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px dashed var(--cwh-border);
  background: transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.cwh-pt-none input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cwh-pt-none:hover { color: var(--cwh-text); border-color: var(--cwh-muted); }

/* Icone: X quando non selezionato, ✓ quando selezionato */
.cwh-pt-none .cwh-pt-none__ico-on  { display: none; }
.cwh-pt-none.is-active .cwh-pt-none__ico-on  { display: inline-flex; }
.cwh-pt-none.is-active .cwh-pt-none__ico-off { display: none; }

.cwh-pt-none.is-active {
  border: 2px solid var(--cwh-ink);
  background: var(--cwh-ink);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--cwh-shadow-sm);
}

/* Pulsante "Pubblica annuncio": grande e impossibile da ignorare */
.cwh-publish-cta {
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0 34px;
  line-height: 54px;
  border-radius: var(--cwh-r-md);
  background: linear-gradient(135deg, var(--cwh-primary), var(--cwh-primary-deep));
  box-shadow: 0 8px 22px var(--cwh-primary-ring);
  text-transform: none;
  letter-spacing: 0.01em;
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.cwh-publish-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px var(--cwh-primary-ring);
}

/* =============================================================
   Funzioni riservate ai PRO nel form — card ben visibile
   (mostra che l'opzione esiste; se bloccata, indica "Solo PRO")
   ============================================================= */
.cwh-pro-feature {
  position: relative;
  border: 1.5px solid var(--cwh-primary);
  background: var(--cwh-primary-soft);
  border-radius: var(--cwh-r-md);
  padding: 12px 14px;
  margin-top: 14px;
}

.cwh-pro-feature--locked {
  border-style: dashed;
  background: var(--cwh-paper);
}

.cwh-pro-feature__badge {
  position: absolute;
  top: -9px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--cwh-primary);
  color: #fff;
}

.cwh-pro-feature--locked .cwh-pro-feature__badge {
  background: var(--cwh-muted);
}

/* =============================================================
   Step Visibilità — scaletta "dove apparirai nei risultati"
   ============================================================= */
.cwh-promo-ladder {
  max-width: 560px;
  margin: 0 auto 22px;
  padding: 14px 16px;
  border: 1px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  background: var(--cwh-paper);
}

.cwh-promo-ladder__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cwh-muted);
  margin-bottom: 8px;
  text-align: center;
}

.cwh-promo-ladder__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--cwh-r-sm);
  padding: 7px 12px;
  margin-bottom: 5px;
  border: 1px solid var(--cwh-border);
  background: var(--cwh-surface);
  color: var(--cwh-muted);
}

/* TOP / PREMIUM: riga neutra, distinta solo dal badge (niente bordo colorato). */
.cwh-promo-ladder__row--top {
  background: var(--cwh-surface);
  color: var(--cwh-text);
  box-shadow: var(--cwh-shadow-sm);
}

.cwh-promo-ladder__row--premium {
  background: var(--cwh-surface);
  color: var(--cwh-text);
}

/* IN EVIDENZA: l'unica riga col bordo dorato (combinabile con top/premium). */
.cwh-promo-ladder__row--evidenza {
  border: 2px solid var(--cwh-accent);
  background: var(--cwh-accent-soft);
  color: var(--cwh-accent-ink);
}

.cwh-promo-ladder__row--base { opacity: 0.75; }

.cwh-promo-ladder__row--faded {
  opacity: 0.4;
  height: 14px;
  padding: 0 12px;
  margin-bottom: 0;
}

.cwh-promo-ladder__badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Etichetta "base" (righe senza promozione): testo grigio al posto della barra */
.cwh-promo-ladder__base-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cwh-muted);
}

/* Barra segnaposto: rappresenta il "titolo" dell'annuncio nel mockup */
.cwh-promo-ladder__bar {
  flex: 1;
  height: 8px;
  min-width: 40px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
}

.cwh-promo-ladder__row--top .cwh-promo-ladder__badge { background: var(--cwh-accent); color: #2c1d04; }
.cwh-promo-ladder__row--premium .cwh-promo-ladder__badge { background: var(--cwh-primary); color: #fff; }

/* Badge "IN EVIDENZA" dentro la riga (oltre al bordo dorato) */
.cwh-promo-ladder__badge--evidenza {
  background: transparent;
  color: var(--cwh-accent-ink);
  border: 1px solid var(--cwh-accent);
}

/* Spinge eventuali badge multipli a sinistra e il testo a riempire */
.cwh-promo-ladder__row span + span.cwh-promo-ladder__badge { margin-left: -2px; }

/* Didascalia esplicativa sotto la scaletta */
.cwh-promo-ladder__caption {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 2px 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--cwh-muted);
}
.cwh-promo-ladder__caption [uk-icon] { flex-shrink: 0; margin-top: 1px; color: var(--cwh-accent); }

/* Microcopy sotto il prezzo delle card */
.cwh-pt-card__hint {
  font-size: 0.7rem;
  color: var(--cwh-muted);
}

/* =============================================================
   Step Visibilità — scelta obbligatoria + box "In evidenza"
   ============================================================= */

/* Evidenziazione quando si tenta di pubblicare senza scegliere */
@keyframes cwh-attention-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 61, 46, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(192, 61, 46, 0.15); }
}

.cwh-pt-none.cwh-attention {
  border: 2px solid var(--cwh-danger);
  background: var(--cwh-danger-soft);
  color: var(--cwh-danger);
  font-weight: 700;
  animation: cwh-attention-pulse 1.2s ease-in-out 3;
}

.cwh-attention-grid .cwh-pt-card {
  border-color: var(--cwh-danger);
}

/* Box "In evidenza" (combinabile) */
.cwh-evidenza-box {
  border: 1.5px solid var(--cwh-accent);
  background: var(--cwh-accent-soft);
  border-radius: var(--cwh-r-md);
  padding: 14px 16px;
}

.cwh-evidenza-box__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.cwh-evidenza-box__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cwh-accent);
  color: #2c1d04;
  flex-shrink: 0;
}

.cwh-evidenza-box__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cwh-accent-ink);
}

.cwh-evidenza-box__desc {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--cwh-text);
}

.cwh-evidenza-box .uk-select {
  background-color: var(--cwh-surface);
}

/* "In evidenza": box compatto (≈50% pagina su desktop), centrato,
   con la tendina SOTTO le scritte */
.cwh-evidenza-box {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cwh-evidenza-box__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cwh-evidenza-box__controls .uk-select {
  max-width: 280px;
}

/* "Durata del pacchetto": blocco prominente e centrale */
.cwh-pt-days {
  max-width: 560px;
  margin: 18px auto 0;
  padding: 18px 20px;
  text-align: center;
  border: 2px solid var(--cwh-primary);
  background: var(--cwh-primary-soft);
  border-radius: var(--cwh-r-md);
  box-shadow: var(--cwh-shadow-sm);
}

.cwh-pt-days .uk-form-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cwh-primary-deep);
  margin-bottom: 10px;
}

.cwh-pt-days .uk-flex {
  justify-content: center;
}

.cwh-pt-days .uk-select {
  font-weight: 600;
}

.cwh-pt-days #cwh-pt-total {
  font-size: 1.15rem;
  color: var(--cwh-primary-deep);
}

.cwh-pt-days #cwh-pt-explain {
  margin-left: auto;
  margin-right: auto;
}

/* FAQ potenziamenti */
.cwh-promo-faq {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--cwh-border);
  background: var(--cwh-paper);
  border-radius: 0 var(--cwh-r-sm) var(--cwh-r-sm) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cwh-promo-faq__item { font-size: 0.78rem; line-height: 1.45; }

.cwh-promo-faq__q {
  display: block;
  color: var(--cwh-text);
}

.cwh-promo-faq__a { color: var(--cwh-muted); }

/* =============================================================
   LANDING "DIVENTA PRO" (view subscribe)
   ============================================================= */
.cwh-subscribe { position: relative; }

.cwh-subscribe__hero {
  max-width: 720px;
  margin: 0 auto 36px;
}

.cwh-subscribe__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cwh-accent-ink);
  background: var(--cwh-accent-soft);
  border: 1px solid var(--cwh-accent);
  border-radius: var(--cwh-r-pill);
  padding: 5px 14px;
}

.cwh-subscribe__title {
  font-family: var(--cwh-font-display);
  font-weight: 750;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.1;
  color: var(--cwh-ink);
  margin: 14px 0 8px;
}

.cwh-subscribe__lead {
  font-size: 1.05rem;
  color: var(--cwh-muted);
  margin: 0 auto;
  max-width: 560px;
}

.cwh-subscribe__benefits {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}
.cwh-subscribe__benefits li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cwh-text);
}
.cwh-subscribe__benefits [uk-icon] { color: var(--cwh-success); }

/* --- Card piano (glassmorphism) --- */
.cwh-plans { align-items: stretch; }

.cwh-plan-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border-radius: var(--cwh-r-lg);
  border: 1px solid var(--cwh-border);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--cwh-shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .cwh-plan-card { background: var(--cwh-surface); }
}
.cwh-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cwh-shadow-lg);
}

/* Annuale evidenziato */
.cwh-plan-card--featured {
  border: 2px solid var(--cwh-accent);
  background: linear-gradient(180deg, var(--cwh-accent-soft), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0 0 4px rgba(226, 162, 59, 0.14), var(--cwh-shadow-lg);
}
@media (min-width: 960px) {
  .cwh-plan-card--featured { transform: scale(1.04); }
  .cwh-plan-card--featured:hover { transform: scale(1.04) translateY(-4px); }
}

.cwh-plan-card__ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c1d04;
  background: var(--cwh-accent);
  border-radius: var(--cwh-r-pill);
  padding: 5px 16px;
  box-shadow: var(--cwh-shadow-sm);
}

.cwh-plan-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.cwh-plan-card__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cwh-ink);
  margin: 0;
}

.cwh-plan-save {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--cwh-success);
  border-radius: var(--cwh-r-pill);
  padding: 3px 10px;
}

.cwh-plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}
.cwh-plan-card__amount {
  font-family: var(--cwh-font-display);
  font-weight: 750;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--cwh-ink);
}
.cwh-plan-card__period { font-size: 0.9rem; color: var(--cwh-muted); }

.cwh-plan-card__permonth {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cwh-primary);
}
.cwh-plan-card__save-detail {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--cwh-muted);
}

.cwh-plan-card__desc {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--cwh-text);
}

.cwh-plan-card__cta { margin-top: auto; padding-top: 22px; }

.cwh-plan-card__autorenew {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--cwh-text);
  cursor: pointer;
}

.cwh-plan-card--featured .cwh-plan-card__cta-btn {
  background: var(--cwh-accent);
  border-color: var(--cwh-accent);
  color: #2c1d04;
}
.cwh-plan-card--featured .cwh-plan-card__cta-btn:hover {
  background: #d3902c;
  border-color: #d3902c;
}

.cwh-plan-card__note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--cwh-muted);
}

.cwh-subscribe__reassure {
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--cwh-muted);
}
.cwh-subscribe__reassure [uk-icon] { color: var(--cwh-success); }

/* =============================================================
   STATISTICHE PRO (view stats)
   ============================================================= */
.cwh-stats__kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .cwh-stats__kpis { grid-template-columns: repeat(4, 1fr); }
}

.cwh-stat-card {
  background: var(--cwh-surface);
  border: 1px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  box-shadow: var(--cwh-shadow-sm);
  padding: 16px 18px;
  text-align: center;
}
.cwh-stat-card__num {
  font-family: var(--cwh-font-display);
  font-weight: 750;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--cwh-ink);
}
.cwh-stat-card__lbl {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--cwh-muted);
}

/* Tabella panoramica */
.cwh-stats__table-wrap { padding: 8px 6px; overflow-x: auto; }
.cwh-stats__table { width: 100%; border-collapse: collapse; }
.cwh-stats__table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cwh-muted);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--cwh-border-soft);
}
.cwh-stats__table td {
  padding: 10px;
  border-bottom: 1px solid var(--cwh-border-soft);
  font-size: 0.9rem;
  vertical-align: middle;
}
.cwh-stats__adname { font-weight: 650; color: var(--cwh-ink); }
.cwh-stats__spark { width: 120px; }
.cwh-spark { width: 110px; height: 30px; display: block; }

/* Blocchi dettaglio */
.cwh-stats__block { padding: 20px 22px; margin-top: 18px; }
.cwh-stats__block-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cwh-ink);
}
.cwh-area { width: 100%; height: 150px; display: block; }

.cwh-stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 0;
}
@media (min-width: 720px) {
  .cwh-stats__grid { grid-template-columns: 1fr 1fr; }
}
.cwh-stats__grid .cwh-stats__block { margin-top: 0; }

/* Funnel */
.cwh-funnel { display: flex; flex-direction: column; gap: 12px; }
.cwh-funnel__row { display: flex; align-items: center; gap: 10px; }
.cwh-funnel__lbl { width: 90px; flex-shrink: 0; font-size: 0.82rem; color: var(--cwh-muted); }
.cwh-funnel__bar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 28px;
  padding: 4px 10px;
  border-radius: var(--cwh-r-sm);
  background: var(--cwh-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}
.cwh-funnel__bar--save    { background: var(--cwh-accent); color: #2c1d04; }
.cwh-funnel__bar--contact { background: var(--cwh-success); }
.cwh-funnel__pct { font-size: 0.8rem; color: var(--cwh-muted); }

/* Benchmark / boost */
.cwh-stats__bench-main { margin: 0; font-size: 1.05rem; color: var(--cwh-text); }
.cwh-stats__bench-sub { margin: 8px 0 0; font-size: 0.85rem; color: var(--cwh-muted); }
.cwh-stats__pos { font-weight: 800; color: var(--cwh-success); font-size: 1.3rem; }
.cwh-stats__neg { font-weight: 800; color: var(--cwh-danger); font-size: 1.3rem; }
.cwh-badge-top {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2c1d04;
  background: var(--cwh-accent-soft);
  border: 1px solid var(--cwh-accent);
  border-radius: var(--cwh-r-pill);
  padding: 2px 10px;
  margin-right: 6px;
}

.cwh-stats__list { list-style: none; margin: 0; padding: 0; }
.cwh-stats__list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--cwh-border-soft);
  font-size: 0.9rem;
}
.cwh-stats__list li:last-child { border-bottom: 0; }
.cwh-stats__list strong { color: var(--cwh-ink); }

.cwh-stats__detailhead .cwh-stats__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--cwh-muted);
  text-decoration: none;
  margin-bottom: 4px;
}
.cwh-stats__hidden { margin-top: 18px; font-size: 0.82rem; }

/* Teaser bloccato (FREE) */
.cwh-stats-teaser { position: relative; }
.cwh-stats-teaser__blur {
  filter: blur(6px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.cwh-stats-teaser__chart { height: 160px; margin-top: 18px; }
.cwh-stats-teaser__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px;
}
.cwh-stats-teaser__icon { color: var(--cwh-accent); }
.cwh-stats-teaser__overlay h3 { margin: 0; color: var(--cwh-ink); font-size: 1.25rem; }
.cwh-stats-teaser__overlay p { margin: 0 0 8px; color: var(--cwh-muted); max-width: 420px; }

/* ═══════════════════════════════════════════════════════════════════════
   FORM "PRESENTATI" — intestazione, giorni, bottom sheet
   Il contatto è un'auto-presentazione: l'intestazione dice a chi ci si
   presenta e quante persone lavorano già nello spazio.
   ═══════════════════════════════════════════════════════════════════════ */

.cwh-contact__header {
  display: flex;
  align-items: center;
  gap: var(--cwh-gap-sm);
  margin-bottom: var(--cwh-gap-md);
}

.cwh-contact__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cwh-primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  background-size: cover;
  background-position: center;
}

/* Operatore con logo: il marchio sostituisce le iniziali */
.cwh-contact__avatar--logo {
  background-color: var(--cwh-surface);
  border: 1px solid var(--cwh-border);
  background-size: contain;
  background-repeat: no-repeat;
}

.cwh-contact__logo {
  flex: 0 0 auto;
  max-width: 56px;
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.cwh-contact__headings { min-width: 0; }

.cwh-contact__title {
  color: var(--cwh-ink);
  line-height: 1.25;
}

.cwh-contact__subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--cwh-muted);
  line-height: 1.35;
}

.cwh-contact__subtitle:empty { display: none; }

/* Quanti giorni a settimana — segmenti, non una tendina */
.cwh-contact__days {
  display: flex;
  gap: var(--cwh-gap-xs);
}

.cwh-contact__day {
  flex: 1 1 0;
  position: relative;
  cursor: pointer;
}

.cwh-contact__day input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cwh-contact__day span {
  display: block;
  padding: 7px 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cwh-text);
  background: var(--cwh-surface);
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-sm);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.cwh-contact__day:hover span { border-color: var(--cwh-primary); }

.cwh-contact__day input:checked + span {
  background: var(--cwh-primary-soft);
  border-color: var(--cwh-primary);
  color: var(--cwh-primary-deep);
}

.cwh-contact__day input:focus-visible + span {
  outline: 2px solid var(--cwh-primary);
  outline-offset: 2px;
}

.cwh-contact__reassure {
  margin: var(--cwh-gap-sm) 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--cwh-faint);
  text-align: center;
}

/* Su mobile il modale diventa un bottom sheet (design 1c) */
@media (max-width: 639px) {
  .cwh-contact-modal.uk-modal { align-items: flex-end; }

  .cwh-contact-modal .uk-modal-dialog {
    width: 100%;
    margin: 0 !important;
    border-radius: var(--cwh-r-lg) var(--cwh-r-lg) 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   LISTA ANNUNCI — layout split (2.10.0)
   Risultati a sinistra, mappa sempre visibile a destra. L'obiettivo è che
   pill + filtri + intestazione stiano in molto meno di una schermata, così
   la prima card è visibile senza scorrere.
   ═══════════════════════════════════════════════════════════════════════ */

.cwh-listing {
  margin-top: var(--cwh-gap-md);
}

/* Esce dal contenitore del template (param `listing_fullwidth`), così il
   layout funziona anche se la sezione YOOtheme non è a tutta larghezza.
   `100vw` include la scrollbar: senza il clip comparirebbe una scrollbar
   orizzontale su Windows. */
.cwh-listing--fullwidth {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
}

.cwh-listing__inner {
  padding: 0 var(--cwh-gap-md);
}

/* ── Pill categorie ─────────────────────────────────────────────────── */
.cwh-cat-pills {
  margin-bottom: var(--cwh-gap-sm);
}

.cwh-cat-pills__row {
  display: flex;
  flex-wrap: nowrap;          /* su mobile la riga scorre, non va a capo */
  gap: var(--cwh-gap-xs);
  list-style: none;
  margin: 0;
  padding: 2px 0;
}

/* Le pill sono <button type="submit"> dell'unico form filtri (2.10.1):
   servono i reset tipici del bottone perché restino identiche a prima. */
.cwh-cat-pill {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-pill);
  background: var(--cwh-surface);
  color: var(--cwh-text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.cwh-cat-pill:hover {
  border-color: var(--cwh-primary);
  color: var(--cwh-primary-deep);
  text-decoration: none;
}

.cwh-cat-pill--active {
  background: var(--cwh-primary);
  border-color: var(--cwh-primary);
  color: #fff;
}

.cwh-cat-pill--active:hover { color: #fff; }

.cwh-cat-pill__icon  { opacity: .75; flex-shrink: 0; }
.cwh-cat-pill__count { font-weight: 700; opacity: .6; font-size: .78rem; }
.cwh-cat-pill--active .cwh-cat-pill__count { opacity: .85; }

/* ── Due colonne ───────────────────────────────────────────────────── */
.cwh-listing__split {
  display: flex;
  align-items: flex-start;
  gap: var(--cwh-gap-lg);
}

.cwh-listing__results { min-width: 0; flex: 1 1 auto; }

/* Sotto @m la mappa esce dal flusso: solo risultati + pulsante flottante */
.cwh-listing__map { display: none; }

@media (min-width: 960px) {
  .cwh-listing__results { flex: 0 0 60%; max-width: 60%; }

  .cwh-listing__map {
    display: block;
    flex: 0 0 40%;
    max-width: 40%;
    position: sticky;
    top: var(--cwh-header-h);
    height: calc(100vh - var(--cwh-header-h));
    border-radius: var(--cwh-r-md);
    overflow: hidden;
    border: 1px solid var(--cwh-border);
  }
}

.cwh-listing__map-canvas { width: 100%; height: 100%; }

/* ── Mappa a tutto schermo su mobile ───────────────────────────────────
   Niente offcanvas/modal: Leaflet non va spostato nel DOM né inizializzato
   in un contenitore nascosto. Stessa istanza, solo una classe in più. */
.cwh-listing__map--open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1010;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: var(--cwh-surface);
}

.cwh-listing__map-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1020;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cwh-border);
  border-radius: 50%;
  background: var(--cwh-surface);
  color: var(--cwh-text);
  cursor: pointer;
  box-shadow: var(--cwh-shadow-md);
}

/* Pulsante flottante "Mappa" — solo sotto @m */
.cwh-listing__map-fab {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--cwh-r-pill);
  background: var(--cwh-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--cwh-shadow-lg);
}

@media (min-width: 960px) {
  .cwh-listing__map-fab { display: none; }
}

/* ── Card dentro la colonna al 60% ─────────────────────────────────────
   Nessuna modifica al markup della card: solo adattamenti di larghezza,
   validi unicamente dentro la lista (altrove la card resta identica). */
@media (min-width: 960px) {
  .cwh-listing__results .cwh-ad-card-mosaic .cwh-mosaic-main,
  .cwh-listing__results .cwh-ad-card-mosaic .cwh-mosaic-main .uk-slideshow-items {
    min-height: 200px;
  }

  .cwh-listing__results .cwh-ad-card--top .cwh-mosaic-main,
  .cwh-listing__results .cwh-ad-card--top .cwh-mosaic-main .uk-slideshow-items {
    min-height: 240px;
  }

  /* Prezzo e posizione possono andare a capo senza rompere la riga */
  .cwh-listing__results .cwh-mosaic-price-loc { gap: 2px 8px; }
  .cwh-listing__results .cwh-mosaic-price     { font-size: 1.55rem; }

  /* La riga persone resta leggibile: il badge va a capo se serve */
  .cwh-listing__results .cwh-people { flex-wrap: wrap; }
  .cwh-listing__results .cwh-people__sectors { white-space: normal; }
}

/* Marker evidenziato dall'hover sulla card corrispondente */
.cwh-listing__results .cwh-ad-card-mosaic.is-map-active {
  border-color: var(--cwh-primary);
  box-shadow: 0 0 0 2px var(--cwh-primary-ring), var(--cwh-shadow-md);
}

/* ═══════════════════════════════════════════════════════════════════════
   MATCHING (2.11.0) — questionario, banner, segnale sulla card, avvisi
   Il verde è il colore dell'affinità (come "Cercano N coworker");
   l'ambra resta riservata ai pacchetti a pagamento.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Questionario ──────────────────────────────────────────────────── */
.cwh-match {
  padding: var(--cwh-gap-xl) 0;
  max-width: 640px;
}

.cwh-match__head { margin-bottom: var(--cwh-gap-lg); }

.cwh-match__progress {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--cwh-r-pill);
  background: var(--cwh-paper-2);
  color: var(--cwh-muted);
  font-size: .78rem;
  font-weight: 700;
}

.cwh-match__ack {
  margin: var(--cwh-gap-sm) 0 0;
  font-size: .95rem;
  color: var(--cwh-text);
}

.cwh-match__edit {
  margin-left: 6px;
  font-size: .85rem;
  text-decoration: underline;
}

.cwh-match__question {
  margin: 0 0 var(--cwh-gap-xs);
  font-family: var(--cwh-font-display);
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--cwh-ink);
}

.cwh-match__hint {
  margin: 0 0 var(--cwh-gap-lg);
  color: var(--cwh-muted);
}

.cwh-match__select { width: 100%; }

.cwh-match__next {
  width: 100%;
  margin-top: var(--cwh-gap-md);
}

/* Tre scelte grandi: sono la domanda, non un dettaglio del form */
.cwh-match__choices {
  display: grid;
  gap: var(--cwh-gap-sm);
}

.cwh-match__choice {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon label" "icon desc";
  gap: 2px var(--cwh-gap-md);
  align-items: center;
  padding: var(--cwh-gap-md);
  text-align: left;
  background: var(--cwh-surface);
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-md);
  transition: border-color .15s ease, background-color .15s ease;
}

.cwh-match__choice:hover { border-color: var(--cwh-primary); }

.cwh-match__choice--active {
  border-color: var(--cwh-primary);
  background: var(--cwh-primary-soft);
}

.cwh-match__choice-icon  { grid-area: icon; color: var(--cwh-primary); }
.cwh-match__choice-label { grid-area: label; font-weight: 700; color: var(--cwh-ink); }
.cwh-match__choice-desc  { grid-area: desc; font-size: .85rem; color: var(--cwh-muted); }

/* Pill di risposta (giorni, budget) */
.cwh-match__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cwh-gap-xs);
}

.cwh-match__pill { flex: 1 1 auto; position: relative; cursor: pointer; }
.cwh-match__pill input { position: absolute; opacity: 0; width: 0; height: 0; }

.cwh-match__pill span {
  display: block;
  padding: 10px 12px;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--cwh-text);
  background: var(--cwh-surface);
  border: 1.5px solid var(--cwh-border);
  border-radius: var(--cwh-r-sm);
}

.cwh-match__pill input:checked + span {
  background: var(--cwh-primary-soft);
  border-color: var(--cwh-primary);
  color: var(--cwh-primary-deep);
}

.cwh-match__pill input:focus-visible + span {
  outline: 2px solid var(--cwh-primary);
  outline-offset: 2px;
}

/* "Salta": presente ma mai in competizione con la risposta */
.cwh-match__skipform { margin-top: var(--cwh-gap-lg); text-align: center; }

.cwh-match__skip {
  appearance: none;
  border: 0;
  background: none;
  color: var(--cwh-muted);
  font-family: inherit;
  font-size: .9rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Banner "stai cercando come…" ──────────────────────────────────── */
.cwh-match-banner {
  display: flex;
  align-items: center;
  gap: var(--cwh-gap-sm);
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: var(--cwh-gap-md);
  border-radius: var(--cwh-r-md);
  background: var(--cwh-success-soft);
  border: 1px solid var(--cwh-success);
}

.cwh-match-banner__icon { color: var(--cwh-success); flex-shrink: 0; }

.cwh-match-banner__text {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--cwh-ink);
}

.cwh-match-banner__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--cwh-gap-sm);
  flex-shrink: 0;
}

.cwh-match-banner__actions form { display: inline; }

.cwh-match-banner__actions a,
.cwh-match-banner__actions button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: .85rem;
  color: var(--cwh-success);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Segnale sulla card: testo, mai un chip ───────────────────────── */
.cwh-match-signal {
  margin: 0 0 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--cwh-success);
}

/* ── "Nessuno spazio perfetto" + form avvisi ──────────────────────── */
.cwh-noperfect {
  padding: var(--cwh-gap-md);
  margin-bottom: var(--cwh-gap-md);
  border-radius: var(--cwh-r-md);
  background: var(--cwh-paper);
  border: 1px solid var(--cwh-border);
}

.cwh-noperfect__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cwh-ink);
}

.cwh-noperfect__text {
  margin: 0 0 var(--cwh-gap-sm);
  font-size: .9rem;
  color: var(--cwh-muted);
}

.cwh-alertform__row {
  display: flex;
  gap: var(--cwh-gap-xs);
  flex-wrap: wrap;
}

.cwh-alertform__row .uk-input { flex: 1 1 200px; }

.cwh-alertform__privacy {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: var(--cwh-gap-xs);
  font-size: .78rem;
  color: var(--cwh-muted);
}

.cwh-alertform__note {
  margin: 6px 0 0;
  font-size: .75rem;
  color: var(--cwh-faint);
}

/* ── Moduli home ──────────────────────────────────────────────────── */
.cwh-seeker-module__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--cwh-ink);
}

.cwh-seeker-module__row {
  display: flex;
  gap: var(--cwh-gap-xs);
  flex-wrap: wrap;
}

.cwh-seeker-module__select { flex: 1 1 220px; }

.cwh-seeker-module__alt {
  display: inline-block;
  margin-top: var(--cwh-gap-xs);
  font-size: .85rem;
  color: var(--cwh-muted);
  text-decoration: underline;
}

.cwh-alert-module__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cwh-ink);
}

.cwh-alert-module__intro {
  margin: 0 0 var(--cwh-gap-sm);
  font-size: .9rem;
  color: var(--cwh-muted);
}
