/* Custom styles for Teaching Fee Tracker */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-thai: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-thai);
  background-color: #f8fafc;
  color: #1e293b;
}

/* Day of week color themes matching Google Sheet exactly */
.day-thursday {
  background-color: #f97316 !important;
  color: #ffffff !important;
}
.day-friday {
  background-color: #06b6d4 !important;
  color: #ffffff !important;
}
.day-saturday {
  background-color: #a855f7 !important;
  color: #ffffff !important;
}
.day-sunday {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}
.day-monday {
  background-color: #84cc16 !important;
  color: #ffffff !important;
}
.day-tuesday {
  background-color: #ec4899 !important;
  color: #ffffff !important;
}
.day-wednesday {
  background-color: #22c55e !important;
  color: #ffffff !important;
}

/* Day Pill Active Colors */
.day-pill-Monday.active { background-color: #84cc16 !important; color: white !important; border-color: #65a30d !important; }
.day-pill-Tuesday.active { background-color: #ec4899 !important; color: white !important; border-color: #db2777 !important; }
.day-pill-Wednesday.active { background-color: #22c55e !important; color: white !important; border-color: #16a34a !important; }
.day-pill-Thursday.active { background-color: #f97316 !important; color: white !important; border-color: #ea580c !important; }
.day-pill-Friday.active { background-color: #06b6d4 !important; color: white !important; border-color: #0891b2 !important; }
.day-pill-Saturday.active { background-color: #a855f7 !important; color: white !important; border-color: #9333ea !important; }
.day-pill-Sunday.active { background-color: #ef4444 !important; color: white !important; border-color: #dc2626 !important; }

/* Row tinting for weekend vs weekday */
.row-weekend {
  background-color: #fffdf5;
}
.row-weekend:hover {
  background-color: #fef9c3;
}
.row-empty {
  opacity: 0.75;
  background-color: #f8fafc;
}

/* Sticky elements for smooth horizontal and vertical scrolling */
.table-container {
  max-height: calc(100vh - 310px);
  overflow: auto;
  position: relative;
}

.sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 20;
  background-color: inherit;
}

.sticky-col-2 {
  position: sticky;
  left: 105px;
  z-index: 20;
  background-color: inherit;
}

.sticky-col-right {
  position: sticky;
  right: 0;
  z-index: 20;
  background-color: #ffffff;
  box-shadow: -4px 0 8px -2px rgba(0, 0, 0, 0.05);
}

thead th.sticky-col-1,
thead th.sticky-col-2 {
  z-index: 30;
  background-color: #ea580c;
}

thead th.sticky-col-right {
  z-index: 30;
  background-color: #c2410c;
}

tfoot td.sticky-col-1,
tfoot td.sticky-col-2 {
  z-index: 30;
  background-color: #1e293b;
}

tfoot td.sticky-col-right {
  z-index: 30;
  background-color: #0f172a;
}

/* Rate button styling */
.rate-btn-300 {
  background-color: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.rate-btn-300.active {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.4);
}

.rate-btn-175 {
  background-color: #ffedd5;
  color: #c2410c;
  border-color: #fed7aa;
}
.rate-btn-175.active {
  background-color: #ea580c;
  color: #ffffff;
  border-color: #c2410c;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.4);
}

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

/* Input focus ring */
.cell-input {
  transition: all 0.15s ease;
}
.cell-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  background-color: #ffffff;
}

/* Dropdown popover */
.student-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tab active state */
.nav-tab.active {
  border-color: #ea580c;
  color: #ea580c;
  background-color: #ffffff;
}

/* Print styles */
@media print {
  body {
    background-color: #ffffff;
    font-size: 10pt;
  }
  .no-print {
    display: none !important;
  }
  .table-container {
    max-height: none !important;
    overflow: visible !important;
  }
  .sticky-col-1, .sticky-col-2, .sticky-col-right {
    position: static !important;
    box-shadow: none !important;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  th, td {
    border: 1px solid #cbd5e1 !important;
    padding: 3px 5px !important;
  }
}
