/* ── Full-Year Calendar Styles ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #e8eef5;
  margin: 0; padding: 0;
}

.fc-outer {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* ── Banner ── */
.fc-banner {
  text-align: center;
  border: 3px solid #1e3a8a;
  border-radius: 12px;
  padding: 18px 12px 14px;
  margin-bottom: 22px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.fc-banner h1 {
  color: #1e3a8a;
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}
.fc-banner h2 {
  color: #dc2626;
  font-size: clamp(.95rem, 2vw, 1.3rem);
  font-weight: 800;
  margin: 5px 0 0;
}

/* ── Legend ── */
.fc-legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 10px 16px; margin-bottom: 22px; background: #fff;
}
.fc-legend-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #334155; }
.fc-legend-swatch { width: 13px; height: 13px; border-radius: 3px; flex-shrink: 0; }
.fc-ls-vacation   { background: #22c55e; }
.fc-ls-gazetted   { background: #ef4444; }
.fc-ls-nonsitting { background: #06b6d4; }
.fc-ls-weekend    { background: #f87171; }
.fc-ls-today      { background: #2563eb; border-radius: 50%; }
.fc-ls-regional   { background: #7c3aed; border-radius: 2px; }

/* ── 12-month grid ── */
.fc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

/* ── Month card ── */
.fc-month {
  border: 1px solid #c7d7ed;
  border-radius: 10px;
  overflow: visible;          /* allow tooltip overflow */
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.fc-month-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff; text-align: center;
  padding: 9px; font-size: .9rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: 9px 9px 0 0;
}

/* Day-name sub-header */
.fc-month-days-header {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: #f1f5f9; border-bottom: 2px solid #c7d7ed;
}
.fc-month-days-header span {
  text-align: center; font-size: .6rem; font-weight: 700;
  padding: 5px 0; letter-spacing: .05em; color: #64748b;
}
.fc-month-days-header .fcdh-sun { color: #dc2626; }
.fc-month-days-header .fcdh-sat { color: #2563eb; }

/* Day grid */
.fc-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* ── Day cell ── */
.fc-day {
  min-height: 46px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px 3px 3px;
  display: flex; flex-direction: column; align-items: flex-start;
  font-size: .62rem;
  position: relative;    /* for Bootstrap tooltip anchor */
  cursor: default;
  transition: background .12s;
}
.fc-day:nth-child(7n)  { border-right: none; }
.fc-day:last-child     { border-bottom: none; }
.fc-day:hover          { filter: brightness(.96); }
.fcblank               { background: #f9fafb; pointer-events: none; }

.fc-day-num {
  font-weight: 700; font-size: .74rem; color: #334155;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}

/* State classes */
.fc-today .fc-day-num          { background: #2563eb; color: #fff; }
.fc-sunday                     { background: #fef2f2; }
.fc-sunday .fc-day-num         { color: #dc2626; }
.fc-weekend-off                { background: #fef2f2; }
.fc-weekend-off .fc-day-num    { color: #dc2626; }
.fc-sat-nonsitting             { background: #ecfeff; }
.fc-sat-nonsitting .fc-day-num { color: #0e7490; }
.fc-vacation                   { background: #f0fdf4; }
.fc-vacation .fc-day-num       { color: #15803d; }
.fc-gazetted                   { background: #fff1f2; }
.fc-gazetted .fc-day-num       { color: #b91c1c; }
.fc-nonsitting                 { background: #ecfeff; }
.fc-nonsitting .fc-day-num     { color: #0e7490; }

/* Regional letter badge */
.fc-cell-bottom { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 2px; }
.fc-region-badge {
  font-size: .5rem; font-weight: 900; line-height: 1;
  background: #7c3aed; color: #fff;
  border-radius: 2px; padding: 1px 3px; letter-spacing: 0;
}

/* ── Holiday table section ── */
.fc-table-section {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: 20px 22px; margin-bottom: 28px;
}
.fc-table-section > h3 {
  font-size: 1.05rem; font-weight: 900; color: #1e3a8a;
  border-bottom: 2px solid #1e3a8a; padding-bottom: 6px;
  margin-bottom: 20px; text-transform: uppercase; letter-spacing: .05em;
}

/* Group sections */
.fc-group-section { margin-bottom: 26px; }
.fc-group-section:last-child { margin-bottom: 0; }
.fc-group-header {
  font-size: .85rem; font-weight: 800;
  border-left: 4px solid #1e3a8a;
  padding: 7px 14px; margin-bottom: 8px;
  background: #f8fafc; border-radius: 0 7px 7px 0;
  letter-spacing: .04em; text-transform: uppercase;
}

/* Tables */
.fc-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.fc-table th {
  padding: 8px 13px; text-align: left;
  font-weight: 700; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase;
  background: #1e3a8a; color: #fff;
}
.fc-table td {
  padding: 7px 13px; border-bottom: 1px solid #e2e8f0;
  color: #334155; vertical-align: middle;
}
.fc-table tr:last-child td   { border-bottom: none; }
.fc-table tr:hover td        { background: #f0f6ff !important; }
.fc-table tr:nth-child(even) td { background: #f8fafc; }

/* Badges */
.fc-badge {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
}
.fc-badge-gazetted   { background: #fee2e2; color: #991b1b; }
.fc-badge-vacation   { background: #dcfce7; color: #15803d; }
.fc-badge-nonsitting { background: #cffafe; color: #0e7490; }

/* Notes */
.fc-notes {
  font-size: .8rem; color: #475569; background: #fff;
  border-radius: 8px; padding: 14px 18px;
  border-left: 4px solid #2563eb;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.fc-notes strong { color: #1e3a8a; font-size: .85rem; }
.fc-notes ol { margin: 8px 0 0 18px; }
.fc-notes li { margin-bottom: 5px; }

/* ── Bootstrap tooltip overrides ── */
.tooltip-inner {
  max-width: 220px;
  font-size: .75rem;
  text-align: left;
  line-height: 1.5;
  padding: 7px 10px;
  background-color: #1e293b;
  color: white;
}
.bs-tooltip-auto .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before  { border-top-color: #1e293b; }
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: #1e293b; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .fc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .fc-grid { grid-template-columns: 1fr; }
  .fc-day  { min-height: 36px; }
  .fc-table-section { padding: 14px 12px; }
}
@media print {
  body { background: #fff; }
  .fc-outer { padding: 4px; }
  .fc-grid  { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
