/* ================================================
   YEARLY DASHBOARD STYLING
   Flat tabular layout: one row per week,
   sub-columns V/E/F/T/N/Open per day.
   ================================================ */

.year-grid-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.year-table {
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 0.72rem;
}

/* ---- HEADER ---- */
.yt-th {
  padding: 0.3rem 0.2rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.72rem;
  color: #495057;
  border-bottom: 2px solid #adb5bd;
  background: #f8f9fa;
}
.yt-th--wk {
  width: 4.5rem;
  min-width: 4.5rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8f9fa;
  border-right: 2px solid #adb5bd;
}
.yt-th--day {
  border-left: 1px solid #dee2e6;
  font-size: 0.75rem;
}
.yt-th--weekend {
  color: #adb5bd;
}

/* Sub-header row (V / E / F / T / N / Open) */
.yt-sub {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15rem 0.15rem;
  border-bottom: 2px solid #adb5bd;
  min-width: 1.6rem;
}
.yt-sub--v { color: #0c7b93; background: #e8f4f8; }
.yt-sub--e { color: #856404; background: #fff3cd; }
.yt-sub--f { color: #6f42c1; background: #f0e6ff; }
.yt-sub--t { color: #2e7d32; background: #e8f5e9; }
.yt-sub--n { color: #6c757d; background: #f5f5f5; }
.yt-sub--o { color: #495057; background: #fff; }

/* Day group borders (every 6 columns = one day) */
.yt-sub--v {
  border-left: 1px solid #dee2e6;
}

/* ---- MONTH SEPARATOR ---- */
.yt-month-row {
  background: transparent;
}
.yt-month-label {
  padding: 0.45rem 0.5rem 0.15rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: #212529;
  border: none;
  background: transparent;
}

/* ---- DATA ROWS ---- */
.yt-row {
  border-bottom: 1px solid #f1f3f5;
}
.yt-row:hover {
  background: #f8f9fa;
}
.yt-row--current {
  background: #f1f3f5;
}
.yt-row--current > td {
  border-top: 2px solid #495057;
  border-bottom: 2px solid #495057;
}
.yt-row--current > td:first-child {
  border-left: 2px solid #495057;
}
.yt-row--current > td:last-child {
  border-right: 2px solid #495057;
}
.yt-row--current:hover {
  background: #e9ecef;
}

/* Week number cell */
.yt-wk {
  padding: 0.2rem 0.35rem;
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  border-right: 2px solid #adb5bd;
}
.yt-row--current .yt-wk {
  background: #f1f3f5;
}
.yt-row:hover .yt-wk {
  background: #f8f9fa;
}
.yt-row--current:hover .yt-wk {
  background: #e9ecef;
}
.yt-wk__link,
.yt-wk__link:visited {
  color: #212529;
  text-decoration: none;
}
.yt-wk__link:hover {
  color: #495057;
  text-decoration: none;
}

/* Value cells */
.yt-val {
  padding: 0.2rem 0.15rem;
  text-align: center;
  font-size: 0.72rem;
  color: #495057;
  font-variant-numeric: tabular-nums;
}

/* Day group left border */
.yt-val--v {
  border-left: 1px solid #dee2e6;
}

/* Subtle column tinting */
.yt-val--v { background: #f7fbfc; }
.yt-val--e { background: #fffdf5; }
.yt-val--f { background: #faf6ff; }
.yt-val--t { font-weight: 700; color: #2e7d32; background: #f5faf5; }
.yt-val--n { color: #6c757d; background: #fafafa; }
.yt-val--o { background: #fff; }

/* Empty cells (days outside this year) */
.yt-val--empty {
  background: transparent;
  border-left: 1px solid #dee2e6;
}

/* Holiday colouring (public holidays / Betriebsferien) */
.yt-val--holiday {
  background: #fef3d5 !important;
}

/* Today highlight */
.yt-val--today {
  box-shadow: inset 0 -2px 0 0 #495057;
}

/* Capacity: tight / over */
.yt-val--tight {
  background: #fff0e0 !important;
  color: #e65100;
  font-weight: 700;
}
.yt-val--over {
  background: #fde0e0 !important;
  color: #c62828;
  font-weight: 700;
}

/* ---- LEGEND ---- */
.year-legend {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #6c757d;
  margin-bottom: 0.6rem;
}
.year-legend__item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.year-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.year-legend__dot--regular        { background: #e8f4f8; border: 1px solid #b8dce8; }
.year-legend__dot--extra          { background: #fff3cd; border: 1px solid #ffeaa7; }
.year-legend__dot--holiday-booking { background: #f0e6ff; border: 1px solid #d4b8ff; }
.year-legend__dot--total          { background: #e8f5e9; border: 1px solid #a5d6a7; }
.year-legend__dot--tight          { background: #fff0e0; border: 1px solid #e65100; }
.year-legend__dot--over           { background: #fde0e0; border: 1px solid #c62828; }
.year-legend__item--holiday {
  padding: 1px 6px;
  background: #fef3d5;
  border-radius: 3px;
  font-size: 0.72rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .year-table {
    font-size: 0.65rem;
  }
  .yt-val {
    padding: 0.15rem 0.1rem;
    font-size: 0.65rem;
  }
  .yt-sub {
    font-size: 0.55rem;
    min-width: 1.2rem;
  }
  .yt-th--wk,
  .yt-wk {
    width: 3.5rem;
    min-width: 3.5rem;
  }
}
