/* Commerciale Immobiliare Group — titoli leggibili su smartphone.
   Intervento additivo: NON modifica dati, filtri, modali, navigazione o layout tablet/desktop. */
@media screen and (max-width:600px) {
  /* Gestionale: barra comandi prima, intestazione a larghezza intera sotto. */
  html body #editor-panel .editor-heading {
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    gap:12px !important;
    min-width:0 !important;
  }
  html body #editor-panel .editor-heading .ci-editor-toolbar {
    order:0 !important;
    display:flex !important;
    align-self:flex-end !important;
    justify-content:flex-end !important;
    flex:0 0 auto !important;
    flex-wrap:nowrap !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    gap:6px !important;
    margin:0 !important;
  }
  html body #editor-panel .editor-heading #editor-title {
    order:1 !important;
    flex:none !important;
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    font-size:clamp(23px,6vw,32px) !important;
    line-height:1.2 !important;
    overflow-wrap:break-word !important;
    word-break:normal !important;
    hyphens:none !important;
    white-space:normal !important;
  }
  /* Sito pubblico: titoli di annuncio, cantiere e pagine informative non spezzati lettera per lettera. */
  main h1, main h2, main h3,
  .listing-info h3, .listing-card h3,
  .ci-project-detail h1, .ci-project-detail h2,
  .ci-readonly h1, .ci-readonly h2 {
    max-width:100%;
    min-width:0;
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
    hyphens:none;
  }
  main h1 { line-height:1.16; }
  .listing-card, .listing-info, .listing-top, .ci-project-detail {min-width:0;}
}

/* 27/11/2026 — schede del gestionale: comandi sopra, titolo sotto
   su iPad e su computer, senza alterare le regole iPhone già funzionanti.
   La regola originale in admin/index.php usa flex-wrap:nowrap!important,
   quindi qui sovrascriviamo anche quella proprietà con identità specifica. */
@media screen and (min-width:601px) {
  html body #editor-panel .editor-heading {
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:12px !important;
    width:100% !important;
    min-width:0 !important;
  }
  html body #editor-panel .editor-heading .ci-editor-toolbar {
    display:flex !important;
    order:0 !important;
    align-self:flex-end !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex:0 0 auto !important;
    flex-wrap:wrap !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    gap:8px !important;
  }
  html body #editor-panel .editor-heading #editor-title {
    display:block !important;
    order:1 !important;
    flex:0 0 auto !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    font-size:clamp(25px,2.8vw,36px) !important;
    line-height:1.2 !important;
    overflow-wrap:break-word !important;
    word-break:normal !important;
    hyphens:none !important;
    white-space:normal !important;
  }
}
