/* ==========================================================================
   Orientamenti — Area espositore (editor contenuti)
   ========================================================================== */

/* Schermo intero: senza header/footer del tema */
html.ov-area-fullscreen-active,
body.ov-area-fullscreen-active {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  overflow-x: hidden;
}

body.ov-area-fullscreen-active #page,
body.ov-area-fullscreen-active .site,
body.ov-area-fullscreen-active .site-content,
body.ov-area-fullscreen-active .entry-content,
body.ov-area-fullscreen-active .content-area,
body.ov-area-fullscreen-active main {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.ov-area-fullscreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ov-bg, #f4f7fb);
}

.ov-area-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: #fff;
  border-bottom: 1px solid var(--ov-border, #e2e8f0);
  box-shadow: 0 1px 8px rgba(0, 50, 80, 0.06);
  flex-shrink: 0;
}

.ov-area-topbar__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.ov-area-topbar__logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ov-primary, #0066a1);
}

.ov-area-topbar__label {
  font-size: 0.85rem;
  color: var(--ov-text-muted, #5c6b7a);
}

.ov-area-topbar__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ov-text-muted, #5c6b7a);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--ov-border, #e2e8f0);
  transition: background 0.15s, color 0.15s;
}

.ov-area-topbar__link:hover {
  background: var(--ov-primary-light, #e8f4fc);
  color: var(--ov-primary, #0066a1);
}

.ov-area-fullscreen__main {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ov-area-fullscreen__main > .entry-content,
.ov-area-fullscreen__main > * {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ov-editor-app {
  --ov-primary: #0066a1;
  --ov-primary-dark: #004d7a;
  --ov-primary-light: #e8f4fc;
  --ov-primary-soft: #f0f8fc;
  --ov-accent: #00a0c6;
  --ov-tipo-testo: #6366f1;
  --ov-tipo-galleria: #db2777;
  --ov-tipo-video: #d97706;
  --ov-tipo-allegati: #059669;
  --ov-tipo-evento: #7c3aed;
  --ov-success: #0d7a4a;
  --ov-success-bg: #e8f7ef;
  --ov-error: #c41e3a;
  --ov-error-bg: #fdeef1;
  --ov-text: #1a2332;
  --ov-text-muted: #5c6b7a;
  --ov-border: #e2e8f0;
  --ov-bg: #f4f7fb;
  --ov-card: #ffffff;
  --ov-radius: 14px;
  --ov-radius-sm: 10px;
  --ov-shadow: 0 4px 24px rgba(0, 50, 80, 0.08);
  --ov-shadow-lg: 0 12px 40px rgba(0, 50, 80, 0.12);
  --ov-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

  font-family: var(--ov-font);
  color: var(--ov-text);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(0, 160, 198, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(0, 102, 161, 0.08) 0%, transparent 50%),
    var(--ov-bg);
  padding: 1.75rem clamp(1.25rem, 5vw, 3rem) 6rem;
  border-radius: 0;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
}

.ov-editor-app [hidden] {
  display: none !important;
}

.ov-editor-app *,
.ov-editor-app *::before,
.ov-editor-app *::after {
  box-sizing: border-box;
}

.ov-editor-app__shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Hero */
.ov-editor-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, var(--ov-primary) 0%, var(--ov-accent) 100%);
  border-radius: var(--ov-radius);
  color: #fff;
  box-shadow: var(--ov-shadow-lg);
  overflow: hidden;
}

.ov-editor-hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -40%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.ov-editor-hero__content,
.ov-editor-hero__actions {
  position: relative;
  z-index: 1;
}

.ov-editor-hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.ov-editor-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
}

.ov-editor-hero__sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 36em;
}

.ov-editor-hero__actions {
  flex-shrink: 0;
}

/* Panels */
.ov-editor-panel {
  background: var(--ov-card);
  border-radius: var(--ov-radius);
  box-shadow: var(--ov-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--ov-border);
}

.ov-editor-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(180deg, var(--ov-primary-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--ov-border);
}

.ov-editor-panel__head-text {
  flex: 1;
  min-width: 0;
}

.ov-editor-panel__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ov-primary-light);
  color: var(--ov-primary);
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--ov-radius-sm);
}

.ov-editor-panel__title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.ov-editor-panel__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ov-text-muted);
  line-height: 1.45;
}

.ov-editor-panel__count {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ov-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
}

.ov-editor-panel__body {
  padding: 1.5rem 1.5rem 1.75rem;
}

.ov-editor-subsection {
  margin-bottom: 1.75rem;
}

.ov-editor-subsection:last-child {
  margin-bottom: 0;
}

.ov-editor-subsection__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ov-primary);
}

.ov-editor-subsection__title svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.ov-editor-logo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.ov-editor-logo__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 100px;
  padding: 0.75rem;
  background: #fff;
  border: 1px dashed var(--ov-border);
  border-radius: var(--ov-radius-sm);
}

.ov-editor-logo__preview img {
  max-width: 160px;
  max-height: 100px;
  object-fit: contain;
}

.ov-editor-logo__placeholder {
  font-size: 0.85rem;
  color: var(--ov-text-muted);
}

.ov-editor-logo__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ov-editor-contatti-card {
  padding: 1.25rem 1.35rem;
  background: linear-gradient(145deg, #fafcfe 0%, #f0f7fb 100%);
  border: 1px solid rgba(0, 102, 161, 0.12);
  border-radius: var(--ov-radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ov-editor-grid {
  display: grid;
  gap: 1.25rem;
}

.ov-editor-field--full {
  grid-column: 1 / -1;
}

/* Labels & inputs */
.ov-editor-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ov-text);
  margin-bottom: 0.45rem;
}

.ov-blocco-tipo {
  font-weight: 600;
  cursor: pointer;
}

.ov-editor-input,
.ov-editor-textarea,
.ov-sezione-card select,
.ov-sezione-card input[type="text"],
.ov-sezione-card input[type="url"],
.ov-sezione-card textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ov-text);
  background: #fff;
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ov-editor-input:focus,
.ov-editor-textarea:focus,
.ov-sezione-card select:focus,
.ov-sezione-card input:focus,
.ov-sezione-card textarea:focus {
  outline: none;
  border-color: var(--ov-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.15);
}

.ov-editor-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Buttons */
.ov-editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  border-radius: var(--ov-radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.ov-editor-btn:hover {
  transform: translateY(-1px);
}

.ov-editor-btn--primary {
  background: linear-gradient(135deg, var(--ov-primary) 0%, var(--ov-accent) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 102, 161, 0.35);
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.ov-editor-btn--primary:hover {
  box-shadow: 0 6px 20px rgba(0, 102, 161, 0.4);
}

.ov-editor-btn--primary.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.ov-editor-btn--primary.is-loading .ov-editor-btn__text {
  display: none;
}

.ov-editor-btn--primary.is-loading .ov-editor-btn__loading {
  display: inline !important;
}

.ov-editor-btn--outline {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.ov-editor-btn--outline:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ov-editor-btn--dashed {
  width: 100%;
  padding: 1rem;
  background: var(--ov-primary-light);
  color: var(--ov-primary);
  border: 2px dashed rgba(0, 102, 161, 0.35);
  margin-top: 0.5rem;
}

.ov-editor-btn--dashed:hover {
  background: #dceef8;
  border-color: var(--ov-primary);
}

.ov-editor-btn--ghost {
  background: #fff;
  color: var(--ov-primary);
  border: 1px solid var(--ov-border);
}

.ov-editor-btn--ghost:hover {
  background: var(--ov-primary-light);
  border-color: var(--ov-primary);
}

.ov-sezione-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ov-error);
  background: var(--ov-error-bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.ov-sezione-remove:hover {
  background: #fad4da;
}

/* Sezioni list */
.ov-sezioni-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 60px;
}

.ov-sezioni-list.is-empty::before {
  content: attr(data-empty-label);
  display: block;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ov-text-muted);
  font-size: 0.95rem;
  background: var(--ov-bg);
  border: 2px dashed var(--ov-border);
  border-radius: var(--ov-radius-sm);
}

/* Content cards */
.ov-sezione-card {
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.ov-sezione-card:hover {
  box-shadow: var(--ov-shadow);
}

.ov-sezione-card[data-tipo="testo"] {
  border-left: 4px solid #6366f1;
}

.ov-sezione-card[data-tipo="immagine"] {
  border-left: 4px solid #ec4899;
}

.ov-sezione-card[data-tipo="video"] {
  border-left: 4px solid #f59e0b;
}

.ov-sezione-card[data-tipo="allegato"] {
  border-left: 4px solid #10b981;
}

.ov-sezione-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: #fafbfc;
  border-bottom: 1px solid var(--ov-border);
}

.ov-sezione-card__type-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 200px;
}

.ov-sezione-card__type-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--ov-border);
}

.ov-sezione-card__head select {
  flex: 1;
  max-width: 280px;
  font-weight: 500;
}

.ov-sezione-card__body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.ov-sezione-card .ov-field {
  margin: 0;
}

.ov-sezione-card .ov-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ov-text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Media upload zone */
.ov-field--media {
  padding: 1rem;
  background: var(--ov-bg);
  border-radius: var(--ov-radius-sm);
  border: 1px dashed var(--ov-border);
}

.ov-media-preview {
  margin-bottom: 0.75rem;
  min-height: 48px;
}

.ov-media-preview img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.ov-media-preview span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--ov-text-muted);
  word-break: break-all;
}

.ov-media-preview:empty::before {
  content: "Nessun file selezionato";
  font-size: 0.85rem;
  color: var(--ov-text-muted);
  font-style: italic;
}

/* Footer sticky */
.ov-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 50;
  margin-top: 0.5rem;
  padding: 1rem 0;
  background: linear-gradient(180deg, transparent 0%, var(--ov-bg) 24%, var(--ov-bg) 100%);
}

.ov-editor-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--ov-card);
  border-radius: var(--ov-radius);
  box-shadow: var(--ov-shadow-lg);
  border: 1px solid var(--ov-border);
}

.ov-form-msg {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  min-width: 140px;
}

.ov-form-msg:empty {
  display: none;
}

.ov-form-msg--ok {
  color: var(--ov-success);
  padding: 0.5rem 0.85rem;
  background: var(--ov-success-bg);
  border-radius: 8px;
}

.ov-form-msg--err {
  color: var(--ov-error);
  padding: 0.5rem 0.85rem;
  background: var(--ov-error-bg);
  border-radius: 8px;
}

/* Login box */
.ov-area-login {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--ov-card);
  border-radius: var(--ov-radius);
  box-shadow: var(--ov-shadow-lg);
  border: 1px solid var(--ov-border);
}

.ov-area-login p {
  margin: 0 0 1.25rem;
  color: var(--ov-text-muted);
}

.ov-area-empty {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--ov-card);
  border-radius: var(--ov-radius);
  border: 1px solid var(--ov-border);
}

.ov-area-empty p {
  margin: 0 0 0.75rem;
  color: var(--ov-text-muted);
}

.ov-tipo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
}

.ov-tipo-pill--testo { background: #eef2ff; color: var(--ov-tipo-testo); border-color: #c7d2fe; }
.ov-tipo-pill--galleria { background: #fdf2f8; color: var(--ov-tipo-galleria); border-color: #fbcfe8; }
.ov-tipo-pill--video { background: #fffbeb; color: var(--ov-tipo-video); border-color: #fde68a; }
.ov-tipo-pill--allegati { background: #ecfdf5; color: var(--ov-tipo-allegati); border-color: #a7f3d0; }
.ov-tipo-pill--evento { background: #f5f3ff; color: var(--ov-tipo-evento); border-color: #ddd6fe; }

/* Blocchi / tab */
.ov-blocchi-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.ov-blocchi-list.is-empty::before {
  content: attr(data-empty-label);
  display: block;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ov-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--ov-bg);
  border: 2px dashed rgba(0, 102, 161, 0.2);
  border-radius: var(--ov-radius-sm);
}

.ov-blocco-card {
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius);
  background: var(--ov-card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 40, 70, 0.05);
  transition: box-shadow 0.2s, border-color 0.2s;
  animation: ov-card-in 0.35s ease-out;
}

@keyframes ov-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ov-blocco-card:hover {
  box-shadow: var(--ov-shadow);
}

.ov-blocco-card[data-tipo="testo"] { border-left: 4px solid var(--ov-tipo-testo); }
.ov-blocco-card[data-tipo="galleria"] { border-left: 4px solid var(--ov-tipo-galleria); }
.ov-blocco-card[data-tipo="video"] { border-left: 4px solid var(--ov-tipo-video); }
.ov-blocco-card[data-tipo="allegati"] { border-left: 4px solid var(--ov-tipo-allegati); }
.ov-blocco-card[data-tipo="evento"] { border-left: 4px solid var(--ov-tipo-evento); }

.ov-blocco-card--pick-tipo {
  border-left: 4px solid var(--ov-border);
}

.ov-blocco-card__badge--muted {
  background: var(--ov-bg);
  color: var(--ov-text-muted);
  border: 1px dashed var(--ov-border);
  font-weight: 600;
}

.ov-blocco-tipo-pick {
  padding: 1.15rem 1.25rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--ov-border);
}

.ov-blocco-card--pick-tipo .ov-blocco-tipo-pick {
  border-bottom: none;
}

.ov-blocco-tipo-pick__label {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ov-text);
}

.ov-tipo-choose-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ov-tipo-choose-btn {
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.ov-tipo-choose-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 40, 70, 0.1);
}

.ov-tipo-choose-btn.is-selected {
  box-shadow: 0 0 0 2px var(--ov-primary);
  outline: 2px solid rgba(0, 102, 161, 0.2);
  outline-offset: 1px;
}

.ov-blocco-card__details {
  animation: ov-card-in 0.3s ease-out;
}

.ov-blocco-card__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #fafbfc;
  border-bottom: 1px solid var(--ov-border);
}

.ov-blocco-card__badge {
  font-size: 0.78rem;
}

.ov-blocco-card__remove {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ov-error);
  background: var(--ov-error-bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.ov-blocco-card__remove:hover {
  background: #fad4da;
}

.ov-blocco-card__meta {
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--ov-border);
}

.ov-blocco-card__content {
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--ov-bg);
}

.ov-blocco-content-zone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ov-blocco-content-zone .ov-editor-textarea {
  min-height: 140px;
}

.ov-evento-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  border-radius: var(--ov-radius-sm);
}

.ov-editor-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ov-el-repeater {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.ov-el-item {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 2.5rem 0.85rem 0.85rem;
  background: #fff;
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius-sm);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ov-el-foto-item {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.ov-el-item__media {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 100px;
}

.ov-el-item__fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.ov-el-item__remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--ov-error-bg);
  color: var(--ov-error);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.ov-el-item__remove:hover {
  background: #fad4da;
}

.ov-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--ov-text-muted);
  text-align: center;
  background: var(--ov-bg);
  border-radius: 6px;
  border: 1px dashed var(--ov-border);
}

.ov-el-foto-item .ov-media-preview img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

.ov-el-file-name {
  font-size: 0.8125rem;
  color: var(--ov-text-muted);
  word-break: break-all;
}

.ov-editor-btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.ov-editor-btn--add-tab {
  margin-top: 0.25rem;
  font-size: 1rem;
}

.button-link-delete,
.ov-campo-remove {
  border: none;
  background: transparent;
  color: var(--ov-error);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.ov-field {
  margin: 0;
}

.ov-field .ov-editor-label {
  margin-bottom: 0.35rem;
}

.ov-blocco-elementi {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ov-blocco-elemento__testo {
  line-height: 1.65;
}

.ov-blocco-elemento__testo p:first-child {
  margin-top: 0;
}

.ov-blocco-elemento__video-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

/* Campi personalizzati */
.ov-editor-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ov-text-muted);
}

.ov-editor-info-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
}

.ov-editor-info-stack .ov-editor-field--full {
  grid-column: 1 / -1;
}

.ov-editor-field--checkbox {
  padding: 0.75rem 1rem;
  background: var(--ov-bg);
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius-sm);
}

.ov-editor-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}

.ov-editor-checkbox input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.ov-editor-field--checkbox .ov-editor-hint {
  margin: 0.5rem 0 0 1.65rem;
}

.ov-campi-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ov-campi-list.is-empty::before {
  content: attr(data-empty-label);
  display: block;
  padding: 1rem;
  text-align: center;
  color: var(--ov-text-muted);
  font-size: 0.9rem;
  border: 1px dashed var(--ov-border);
  border-radius: var(--ov-radius-sm);
}

.ov-campo-card {
  border: 1px solid var(--ov-border);
  border-radius: var(--ov-radius-sm);
  background: var(--ov-card);
  overflow: hidden;
}

.ov-campo-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--ov-bg);
  border-bottom: 1px solid var(--ov-border);
}

.ov-campo-tipo {
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--ov-border);
}

.ov-campo-remove {
  border: none;
  background: transparent;
  color: var(--ov-error);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.ov-campo-card__body {
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.ov-campi-admin .ov-campi-list {
  max-width: 640px;
}

@media (max-width: 900px) {
  .ov-editor-info-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ov-editor-app {
    padding: 1rem 0.75rem 4rem;
  }

  .ov-el-foto-item {
    grid-template-columns: 1fr;
  }

  .ov-editor-grid-2 {
    grid-template-columns: 1fr;
  }

  .ov-editor-hero {
    padding: 1.5rem 1.25rem;
  }

  .ov-editor-hero__actions {
    width: 100%;
  }

  .ov-editor-btn--outline {
    width: 100%;
    justify-content: center;
  }

  .ov-editor-panel__head {
    flex-wrap: wrap;
  }

  .ov-editor-panel__count {
    margin-left: 0;
  }

  .ov-editor-footer__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .ov-editor-btn--primary {
    width: 100%;
  }
}
