/* public/css/style.css */

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: transparent;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lane-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

h2 {
  text-align: center;
  padding: 25px 16px;
  margin: 0;
  /* Use the variable, defined in HTML */
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
}

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9em;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.quiet    { background-color: #c8e6c9; }
.moderate { background-color: #fff9c4; }
.busy     { background-color: #ffcdd2; }

/* Accordion */
.accordion-container {
  padding: 10px 25px 25px 25px;
}

.accordion-header {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-top: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  outline: none;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 18px 20px;
}

.accordion-container .accordion-header:first-of-type {
  border-top: 1px solid #e0e0e0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.accordion-container .accordion-header:last-of-type {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.accordion-container .accordion-header.active:last-of-type {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-header:hover,
.accordion-header.active {
  background-color: #f1f3f5;
}

.accordion-header svg {
  width: 22px;
  height: 22px;
  fill: none;
  /* Use variable */
  stroke: var(--primary-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.accordion-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  flex-grow: 1;
}

.accordion-title {
  font-weight: 600;
  font-size: 1.2em;
  color: #333;
}

.accordion-time {
  font-size: 1.0em;
  font-weight: 400;
  color: #555;
}

.accordion-header::after {
  content: '+';
  font-weight: 700;
  font-size: 1.2em;
  /* Use variable */
  color: var(--primary-color);
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.accordion-header.active::after {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
}

.accordion-panel {
  padding: 0;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}

.accordion-panel:last-of-type {
  border-bottom: 1px solid #e0e0e0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Grid */
.schedule-wrapper {
  overflow-x: auto;
  padding: 20px 0;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 0.8fr repeat(7, 1fr);
  min-width: 900px;
}

.grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.85em;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}

.grid-cell.closed {
  background-color: #f5f5f5;
  color: #b0b0b0;
  font-size: 0.85em;
  font-style: italic;
  pointer-events: none;
}

.schedule-grid div:nth-child(8n) {
  border-right: none;
}

.header-cell {
  flex-direction: column;
  font-weight: 600;
  font-size: 0.9em;
  padding: 16px 8px;
  background-color: #fafafa;
  position: sticky;
  top: 0;
  z-index: 10;
}

.time-cell {
  font-weight: 500;
  font-size: 0.8em;
  background-color: #fafafa;
  border-right: 1px solid #e0e0e0;
  position: sticky;
  left: 0;
  z-index: 5;
}

.slot-cell {
  min-height: 25px;
  transition: transform 0.1s ease;
  position: relative;
  z-index: 1;
}

/* Current Time Highlighting */
.current-time-row-label {
  /* Use variable */
  background-color: var(--primary-color) !important;
  font-weight: 700;
  color: #fff;
}

.current-time-slot {
  /* Use variable */
  outline: 3px solid var(--primary-color);
  outline-offset: -3px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4); /* Made generic black shadow to avoid hardcoded color */
  z-index: 4;
  position: relative;
}