/* Barra e stili della modalità modifica (visibili solo all'utente autenticato) */

.cms-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: #16324e;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
}

.cms-badge {
  background: #c2452c;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.cms-bar button {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
}

.cms-bar button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cms-bar .cms-ghost {
  border-color: transparent;
  opacity: 0.75;
}

.cms-status {
  min-width: 1px;
  opacity: 0.9;
}

.cms-status.is-ok {
  color: #7ee0a4;
}
.cms-status.is-warn {
  color: #ffd479;
}
.cms-status.is-err {
  color: #ff9b8a;
}

/* Evidenzia gli elementi modificabili quando la modalità è attiva */
.cms-editing [data-edit] {
  outline: 2px dashed rgba(194, 69, 44, 0.55);
  outline-offset: 3px;
  cursor: text;
  border-radius: 2px;
}

.cms-editing [data-edit]:focus {
  outline: 2px solid #c2452c;
  background: rgba(255, 255, 255, 0.55);
}

.cms-editing [data-edit-img] {
  outline: 2px dashed rgba(194, 69, 44, 0.55);
  outline-offset: 3px;
  cursor: pointer;
}

.cms-editing [data-edit-img]:hover {
  filter: brightness(0.92);
}
