/* Cultural Center HSE High-Density Spreadsheet & Calendar Theme */
:root {
  --hse-blue: #003274;
  --hse-blue-dark: #002250;
  --hse-blue-light: #0d4a9c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Tabular figures for dates, numbers and timing */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Custom compact scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modern Clean Table Styling matching HSE Cultural Center Event Cards */
.excel-table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 1560px;
  min-width: 1560px;
  table-layout: fixed;
  background: #ffffff;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
}

.excel-table, .excel-th, .excel-td, .excel-table col {
  box-sizing: border-box !important;
}

.excel-th {
  background-color: #fee2e2 !important; /* Soft pastel rose/peach header from original Google Sheets */
  color: #1e293b !important;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px !important;
  border: 1px solid #cbd5e1 !important;
  line-height: 1.25;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 20;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  white-space: normal !important;
}

.excel-td,
.excel-table td {
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.4;
  border: 1px solid #cbd5e1;
  vertical-align: top !important;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #1e293b;
  background-color: #ffffff;
  transition: background-color 0.15s ease;
}

.excel-tr:hover td {
  background-color: #f8fafc !important;
}

/* Excel Table Row Tints */
.row-default td {
  background-color: #ffffff;
}

.row-weekend td {
  background-color: #ffffff;
}

.row-hold td {
  background-color: #fffbeb !important;
}

.row-meeting td {
  background-color: #fafbfc !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 11px;
}

.row-meeting:hover td {
  background-color: #f1f5f9 !important;
}

.row-meeting td,
.row-task td,
.row-mounting td,
.tint-blue td {
  background-color: #f8fafc !important;
  color: #334155 !important;
}

.row-meeting:hover td,
.row-task:hover td,
.row-mounting:hover td,
.tint-blue:hover td {
  background-color: #f1f5f9 !important;
}

/* Soft pink tint for Unity meeting */
.tint-unity td {
  background-color: #fdf4f9 !important;
}
.tint-unity:hover td {
  background-color: #fae8f3 !important;
}
.tint-unity td.col-title {
  color: #581c87 !important;
}
.tint-unity td.col-timing {
  color: #db2777 !important;
  font-weight: 700 !important;
}

/* Cohesive soft-sage styling for Technical Day across the entire row */
.row-techday td {
  background-color: #f2fbf5 !important;
  border-top-color: #bbf7d0 !important;
  border-bottom-color: #bbf7d0 !important;
}

.row-techday:hover td {
  background-color: #e6f9ed !important;
}

.row-techday td.col-title {
  text-align: left !important;
  vertical-align: middle !important;
}

.row-cancelled td {
  background-color: #ffffff !important;
}

.row-cancelled .cell-cancel-strike,
.cell-cancel-strike {
  text-decoration: line-through !important;
  color: #475569 !important;
}

/* Precise Column Widths (12 Columns, total ~1560px) */
.col-date {
  width: 78px;
  min-width: 78px;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  font-weight: 500;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.col-date {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  font-weight: 500;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.col-weekday {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center !important;
  vertical-align: middle !important;
  font-weight: 500;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.col-weekday.is-weekend,
.is-weekend {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

.col-title {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
  white-space: normal !important;
  text-align: left !important;
}

.col-rooms { width: 155px; min-width: 155px; max-width: 155px; }
.col-timing { width: 180px; min-width: 180px; max-width: 180px; }
.col-scenario { width: 140px; min-width: 140px; max-width: 140px; }
.col-materials { width: 200px; min-width: 200px; max-width: 200px; }
.col-duty { width: 125px; min-width: 125px; max-width: 125px; vertical-align: middle !important; }
.col-contacts { width: 150px; min-width: 150px; max-width: 150px; }
.col-payment { width: 115px; min-width: 115px; max-width: 115px; }
.col-participants {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.col-comments { width: 175px; min-width: 175px; max-width: 175px; }

/* Instant O(1) Column Visibility via Table CSS classes */
.hide-col-rooms .col-rooms,
.hide-col-timing .col-timing,
.hide-col-scenario .col-scenario,
.hide-col-materials .col-materials,
.hide-col-duty .col-duty,
.hide-col-contacts .col-contacts,
.hide-col-payment .col-payment,
.hide-col-participants .col-participants,
.hide-col-comments .col-comments {
  display: none !important;
}

/* Text clamping */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 4.8em;
}

/* Modern Refined Week Divider Row */
.excel-week-row td {
  background: #cfe2fe !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 6px 12px !important;
  border: 1px solid #93c5fd !important;
  font-size: 12px !important;
  white-space: normal !important;
}

/* Hyperlinks inside cells */
.excel-link {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
  word-break: break-all !important;
  font-size: 10px !important;
}
.excel-link:hover {
  color: #1e40af !important;
}

/* Inline editable cells */
.inline-edit-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 4px;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: all 0.15s ease;
}

.inline-edit-input:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.inline-edit-input:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Modal backdrop animation */
.modal-backdrop {
  backdrop-filter: blur(4px);
  background-color: rgba(15, 23, 42, 0.5);
}

/* Calendar month cell */
.cal-day-cell {
  min-height: 120px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.cal-day-cell:hover {
  background-color: #f8fafc;
}

.cal-day-cell.other-month {
  background-color: #f8fafc;
  opacity: 0.5;
}

.cal-day-cell.today {
  background-color: #eff6ff;
}

/* Calendar event pill */
.cal-pill {
  font-size: 11px;
  line-height: 1.3;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cal-pill-event {
  background-color: #eff6ff;
  border-left: 3px solid #2563eb;
  color: #1e40af;
}

.cal-pill-meeting {
  background-color: #faf5ff;
  border-left: 3px solid #9333ea;
  color: #6b21a8;
}

.cal-pill-hold {
  background-color: #fffbeb;
  border-left: 3px solid #d97706;
  color: #92400e;
}

/* Interactive cell expanders (accordion style) */
.expandable-cell button,
.rooms-cell button {
  transition: all 0.15s ease-in-out;
}

.expandable-content {
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.expandable-comment:hover .comment-toggle span {
  text-decoration: underline;
}

