.evento-all-day-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  padding: 0.6rem 0;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.evento-all-day-toggle input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--navy);
}

.agenda-all-day-week {
  display: grid;
  grid-template-columns: var(--agenda-gronda) repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.agenda-all-day-week-label {
  padding: 0.5rem 0.25rem;
  font-size: 0.7rem;
  color: var(--gray-text);
}

.agenda-all-day-cell {
  min-height: 3.5rem;
  padding: 0.3rem;
  border-left: 1px solid var(--border-soft);
  cursor: crosshair;
}

.agenda-all-day-add {
  display: block;
  width: fit-content;
  margin-left: auto;
  padding: 0.1rem 0.5rem;
  color: var(--navy);
  text-decoration: none;
}

.agenda-all-day-event {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0.75rem;
  margin: 0.25rem 0;
  border-left: 3px solid var(--colore-evento, var(--navy));
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--colore-evento, var(--navy)) 7%, var(--surface));
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.agenda-all-day-event span,
.agenda-all-day-event small {
  font-size: 0.8rem;
}

.agenda-all-day-event small {
  flex-basis: 100%;
  color: var(--gray-text);
}

.agenda-all-day-week .agenda-all-day-event {
  padding: 0.3rem;
  font-size: 0.8rem;
}

.agenda-mese-evento.is-all-day {
  background: color-mix(in srgb, var(--navy) 8%, var(--surface));
  border-radius: 0.25rem;
}

.agenda-mese-evento.is-all-day .agenda-mese-ora {
  font-size: 0.65rem;
}

.agenda-drag-hint {
  font-size: 0.8rem;
  color: var(--gray-text);
}

.is-selecting-days {
  user-select: none;
  cursor: crosshair;
}

.agenda-mese-cella.is-selected-day,
.agenda-all-day-cell.is-selected-day {
  background: color-mix(in srgb, var(--navy) 14%, var(--surface));
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

@media (max-width: 47.99rem), (pointer: coarse) {
  .agenda-drag-hint {
    display: none;
  }

  .evento-form .calendario:not(.is-giorno) .calendario-pannello {
    position: fixed;
    top: auto;
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    bottom: calc(var(--mobile-nav-height, 0px) + 0.5rem);
    max-height: calc(100dvh - var(--mobile-nav-height, 0px) - var(--header-height) - 1.5rem);
    overflow-y: auto;
    padding: 0.7rem;
  }

  .evento-form .calendario:not(.is-giorno) .calendario-mesi {
    flex-direction: column;
    gap: 0.7rem;
  }

  .evento-form .calendario:not(.is-giorno) .calendario-griglia {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .evento-form .calendario:not(.is-giorno) .calendario-giorno {
    min-height: 38px;
  }

  .evento-form .calendario:not(.is-giorno) .calendario-azioni {
    position: sticky;
    bottom: -0.7rem;
    padding: 0.6rem 0;
    background: var(--surface);
  }

  .evento-form .calendario-applica {
    min-height: 44px;
  }
}
