/**
 * Left Pane: Concise Course Catalog List & Search - Subtle Neumorphic Zen
 * Optimized for 262px width: non-overflowing 2-row filters, sleek cards with
 * instructor and schedule side-by-side on the same line.
 */

.course-list-header {
  padding: 10px var(--space-sm);
  background-color: var(--md-sys-color-surface);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 9px;
  font-size: var(--font-size-xs);
  pointer-events: none;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box input {
  width: 100%;
  padding: 7px 28px 7px 28px;
  font-family: inherit;
  font-size: var(--font-size-xs);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--radius-xs);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  outline: none;
  box-shadow: var(--neumorph-inset);
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface);
  box-shadow: var(--neumorph-inset), 0 0 0 1px var(--md-sys-color-primary);
}

.btn-clear-search {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--md-sys-color-outline);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  width: 22px;
  border-radius: var(--radius-xs);
  transition: var(--transition-smooth);
}

.btn-clear-search:hover {
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface-container-high);
}

/* Official ICU Filters: 学部メジャー & 開講言語 */
.filters-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.2;
}

.filter-group select {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  font-size: 11.5px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--neumorph-flat);
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: var(--transition-smooth);
}

.filter-group select:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--neumorph-inset);
}

.filter-group select optgroup {
  font-weight: 700;
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container);
}

.filter-group select option {
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface);
}

.filter-terms-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 1px;
}

.term-checkboxes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.term-check-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  user-select: none;
}

.term-check-label input[type="checkbox"] {
  accent-color: var(--md-sys-color-primary);
  cursor: pointer;
  width: 13px;
  height: 13px;
  margin: 0;
}

.catalog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
  padding: 1px 2px;
}

/* Course Cards Container */
.course-cards-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Catalog Card - Compact, Sleek Neumorphic Lift */
.catalog-course-card {
  background-color: var(--card-bg-normal);
  border: 1px solid var(--card-border-normal);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  cursor: grab;
  transition: var(--transition-smooth);
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--neumorph-card);
}

.catalog-course-card:hover {
  border-color: var(--md-sys-color-outline);
  transform: translateY(-1px);
  box-shadow: var(--neumorph-hover);
}

.catalog-course-card.dragging {
  opacity: 0.35;
  border-style: dashed;
}

.catalog-course-card.is-enrolled {
  border-left: 3px solid var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container);
  box-shadow: var(--neumorph-inset);
}

.catalog-card-header {
  display: flex;
  align-items: center;
  gap: 5px;
}

.code-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface);
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--neumorph-flat);
}

.term-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.term-pill[data-term="春"] {
  color: #c2410c;
  background-color: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.25);
}

.term-pill[data-term="秋"] {
  color: #b45309;
  background-color: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.term-pill[data-term="冬"] {
  color: #0369a1;
  background-color: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.25);
}

.credits-pill {
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
}

.lang-pill {
  font-size: 11px;
  color: var(--md-sys-color-outline);
}

.btn-toggle-enroll {
  margin-left: auto;
  padding: 3px 8px;
  font-size: 10.5px;
  line-height: 1.1;
}

.catalog-card-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

/* Schedule right next to instructor on the same line */
.catalog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 1px;
}

.catalog-card-prof {
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.catalog-card-schedule {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.sched-pill {
  font-size: 10px;
  padding: 0 4px;
  border-radius: 6px;
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.3;
}

.sched-pill.super {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
  font-weight: 600;
  box-shadow: var(--neumorph-flat);
}

.empty-results {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--md-sys-color-outline);
  font-size: var(--font-size-xs);
}
