/* Luigi Calendar Subtle Enhancements - System Theme Friendly */

/* Use FullCalendar CSS custom properties for consistent theming */
:root {
  /* Subtle improvements without color changes */
  --fc-border-color: #dee2e6;
  --fc-today-bg-color: rgba(var(--theme-primary-rgb, 13, 110, 253), 0.1);
}

/* Better spacing and typography without changing fonts */
.fc-toolbar {
  margin-bottom: 1rem;
  padding: 0.75rem 0;
}

.fc-toolbar h2 {
  margin: 0;
  font-weight: 500;
}

/* Improved button styling that respects theme */
.fc-button-group .fc-button {
  border-radius: 0;
  font-size: 0.875rem;
}

.fc-button-group .fc-button:first-child {
  border-radius: 0.375rem 0 0 0.375rem;
}

.fc-button-group .fc-button:last-child {
  border-radius: 0 0.375rem 0.375rem 0;
}

/* Enhanced list view without color changes */
.fc-list-heading {
  font-weight: 600;
  padding: 0.75rem 1rem;
}

.fc-list-heading-main {
  font-size: 1.1rem;
  font-weight: 600;
}

.fc-list-heading-alt {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-left: 0.5rem;
}

/* Better list item spacing */
.fc-list-item td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.fc-list-item-time {
  font-weight: 400;
  min-width: 80px;
  font-size: 0.875rem;
}

.fc-list-item-title a {
  font-weight: 400;
  text-decoration: none;
  line-height: 1.4;
}

.fc-list-item-notes {
  margin-top: 0.5rem;
  font-size: 0.85em;
  font-weight: 400;
  /* Allow horizontal scroll for pasted tables that are wider than the cell
     (e.g. Google Sheets exports with a 600+px <colgroup>). Without this the
     table either gets crammed into 5 equal-width columns of nothing or gets
     clipped by the parent .fc-list-item-title overflow:hidden. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fc-list-item-notes p {
  margin: 0.25rem 0;
  /* Paragraphs above the table should wrap normally — don't inherit the
     scroll behavior, they shouldn't ever need it. */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Make jot links and production-note links inside the notes block look
   like links. Comes after .fc-list-item-title a (which has equal
   specificity) so this one wins for any <a> inside .fc-list-item-notes. */
.fc-list-item-notes a {
  color: #1e87f0;
  text-decoration: underline;
}

.fc-list-item-notes a:hover {
  color: #0f6ecd;
  text-decoration: underline;
}

.fc-list-item-notes table {
  /* Honor any <colgroup> widths the pasted source defined (Google Sheets,
     Word, etc.). The previous width:100%/table-layout:fixed combo flattened
     every column to equal slices and made mobile unreadable. */
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.fc-list-item-notes table td,
.fc-list-item-notes table th {
  padding: 0.25rem 0.5rem;
  vertical-align: top;
}

@media (max-width: 640px) {
  .fc-list-item-notes {
    font-size: 0.75em;
  }
  .fc-list-item-notes table td,
  .fc-list-item-notes table th {
    padding: 0.2rem 0.3rem;
  }
}

/* Subtle hover effects */
.fc-list-item:hover {
  background-color: rgba(0,0,0,0.02);
}

.sc-theme-dark .fc-list-item:hover {
  background-color: rgba(255,255,255,0.05);
}

/* Better event markers */
.fc-list-item-marker {
  border-radius: 0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.75rem;
}

/* Month view improvements */
.fc-day-header {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem;
}

.fc-day-number {
  font-weight: 500;
}

.fc-today .fc-day-number {
  font-weight: 700;
}

/* Event styling that respects existing colors */
.fc-event {
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0.125rem;
  padding: 0.125rem 0.375rem;
}

/* Better mobile responsiveness */
@media (max-width: 768px) {
  .fc-toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .fc-toolbar .fc-left,
  .fc-toolbar .fc-center,
  .fc-toolbar .fc-right {
    justify-content: center;
  }
  
  .fc-list-item td {
    padding: 0.5rem 0.75rem;
  }
  
  .fc-list-heading {
    padding: 0.5rem 0.75rem;
  }
}

/* Accessibility improvements */
.fc-button:focus {
  outline: 2px solid;
  outline-offset: 2px;
}

.fc-list-item:focus-within {
  outline: 2px solid;
  outline-offset: -2px;
}

/* Loading state (subtle) */
.fc-view-container {
  position: relative;
  min-height: 200px;
}

/* Smooth transitions */
.fc-button,
.fc-list-item,
.fc-day,
.fc-event {
  transition: all 0.15s ease;
}