﻿/* ════════════════════════════════════════════
   AGENDA ELETTRONICA – Foglio di stile
   Compatibile CSS 2+  (nessun gap, nessuna variabile)
   ════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ── */
html {
  background-color: #1a1a1e;
  min-height: 100%;
}

/* ── Base ── */
body {
  background-color: #0d0d0f;
  color: #e8e8ec;
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
.agenda-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #0d0d0f;
  padding: 18px 20px 0;
  border-bottom: 1px solid #2a2a32;
  backdrop-filter: blur(12px);
}

/* ── Month row ── */
.month-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 18px;
}

.month-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -1px;
  color: #e8e8ec;
  line-height: 1;
  margin-right: 10px;
}

.month-year {
  font-size: 1.3rem;
  font-weight: 300;
  color: #6b6b7a;
}

.nav-arrows {
  margin-left: auto;
  display: flex;
}

.nav-arrows .nav-btn + .nav-btn {
  margin-left: 6px;
}

.nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #4e8cff;
  background: transparent;
  color: #e8e8ec;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.nav-btn:hover {
  background-color: #4e8cff;
  color: #e8e8ec;
}

/* ── Week strip ── */
.week-strip {
  display: flex;
  padding-bottom: 14px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.week-strip::-webkit-scrollbar {
  display: none;
}

.week-strip .day-badge + .day-badge {
  margin-left: 6px;
}

.day-badge {
  flex: 0 0 auto;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
}

.day-badge:hover {
  background-color: #1e1e22;
}

.day-badge.active {
  background-color: rgba(78, 140, 255, 0.13);
  border-color: #4e8cff;
}

.day-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: #e8e8ec;
  margin-bottom: 4px;
}

.day-badge.active .day-num {
  color: #4e8cff;
}

.day-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b7a;
  margin-bottom: 4px;
}

.day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #4e8cff;
  opacity: 0;
  transition: opacity 0.2s;
}

.day-badge.has-events .day-dot {
  opacity: 1;
}

/* ════════════════════════════════════════════
   BODY
   ════════════════════════════════════════════ */
.agenda-body {
  padding: 20px 4px 40px;
  max-width: 100%;
}

/* ── Date separator ── */
.date-sep {
  display: flex;
  align-items: center;
  margin: 28px 0 12px;
}

.date-sep-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6b7a;
  white-space: nowrap;
  margin-right: 10px;
}

.date-sep-line {
  flex: 1;
  height: 1px;
  background-color: #2a2a32;
}

/* ════════════════════════════════════════════
   EVENT CARD
   ════════════════════════════════════════════ */
.event-card {
  display: flex;
  align-items: stretch;
  background-color: #1e1e22;
  border: 1px solid #2a2a32;
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: background-color 0.2s, transform 0.15s;
  position: relative;
  animation: fadeUp 0.3s ease both;
}

.event-card:hover {
  background-color: #26262c;
  transform: translateY(-1px);
}

.event-card:nth-child(1) { animation-delay: 0.04s; }
.event-card:nth-child(2) { animation-delay: 0.08s; }
.event-card:nth-child(3) { animation-delay: 0.12s; }
.event-card:nth-child(4) { animation-delay: 0.16s; }
.event-card:nth-child(5) { animation-delay: 0.20s; }

/* ── Striscia colorata sinistra 4px ─────────
   Il background-color viene impostato via
   ng-style="{'background-color': ev.color}"
   direttamente nell'HTML sul tag .event-accent
   ─────────────────────────────────────────── */
.event-accent {
  width: 6px;
  flex-shrink: 0;
  align-self: stretch;
}

/* ── Action buttons column ── */
.event-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 10px 14px 12px;
  flex-shrink: 0;
}

.event-actions .action-btn + .action-btn {
  margin-top: 8px;
}

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #2a2a32;
  background: transparent;
  color: #6b6b7a;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.22s, background-color 0.22s, color 0.22s, transform 0.22s;
  flex-shrink: 0;
  outline: none;
  line-height: 1;
}

.action-btn:focus {
  outline: none;
}

.action-btn.ok-btn:hover {
  border-color: #28d98b;
  color: #28d98b;
  transform: scale(1.12);
}

.action-btn.ok-btn.active {
  border-color: #28d98b;
  background-color: #28d98b;
  color: #0d0d0f;
  transform: scale(1.08);
}

.action-btn.x-btn:hover {
  border-color: #ff4f6d;
  color: #ff4f6d;
  transform: scale(1.12);
}

.action-btn.x-btn.active {
  border-color: #ff4f6d;
  background-color: #ff4f6d;
  color: #0d0d0f;
  transform: scale(1.08);
}

.action-btn.save-btn:hover {
    border-color: #4e8cff;
    color: #4e8cff;
    transform: scale(1.12);
}

.action-btn.save-btn.active {
    border-color: #4e8cff;
    background-color: #4e8cff;
    color: #0d0d0f;
    transform: scale(1.08);
}

/* ── Event info ── */
.event-info {
  flex: 1;
  padding: 14px 16px 14px 12px;
  min-width: 0;
}

/* titolo più grande */
.event-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e8e8ec;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  display: flex;
  align-items: center;
  color: #6b6b7a;
}

/* orario più grande */
.event-time {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #b0b0c0;
}

.event-time svg {
  flex-shrink: 0;
  margin-right: 4px;
}

/* spazio tra orario e luogo */
.event-time + .event-place,
.allday-badge + .event-place {
  margin-left: 10px;
}

.event-place {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event-place svg {
  flex-shrink: 0;
  margin-right: 4px;
}

.event-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 6px;
}

.allday-badge {
  font-size: 0.82rem;
  color: #6b6b7a;
  font-style: italic;
}

/* ════════════════════════════════════════════
   FAB
   ════════════════════════════════════════════ */
.fab {
  position: fixed;
  bottom: 28px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #4e8cff;
  color: #ffffff;
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(78, 140, 255, 0.33);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 200;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(78, 140, 255, 0.47);
}

/* ════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════ */
.empty-day {
  text-align: center;
  padding: 16px;
  color: #3e3e4a;
  font-size: 0.8rem;
  font-style: italic;
}

/* ════════════════════════════════════════════
   SCROLLBAR (desktop)
   ════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #2a2a32; border-radius: 4px; }

/* ════════════════════════════════════════════
   ANIMATION
   ════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}