/* Shared filter controls for School Admin pages.
   Mirrors styles used in `templates/school_admin/schedule.html`. */

.filter-section-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: 0.75;
  margin: 0 0 12px 0;
  text-align: left;
  height: 16px;
  display: flex;
  align-items: center;
}

.unified-input {
  height: 40px;
  padding: 8px 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all 0.2s ease;
  background: var(--color-surface);
  color: var(--color-text);
}

.unified-input:focus {
  border-color: var(--accent-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.btn-reset,
.btn-apply {
  height: 40px;
  min-width: 120px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.btn-reset {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-muted);
}

.btn-reset:hover {
  background: var(--color-surface-2);
}

.btn-apply {
  background: var(--gradient-accent);
  border: 2px solid transparent;
  color: white;
}

.btn-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.25);
}

/* Unified dropdown (multi-select with search)
   Mirrors styles used in `templates/school_admin/schedule.html`. */

.teachers-dropdown-wrapper,
.students-dropdown-wrapper,
.vis-teachers-dropdown-wrapper,
.sa-dropdown-wrapper {
  position: relative;
  z-index: 1;
}

.teachers-dropdown-wrapper.open,
.students-dropdown-wrapper.open,
.vis-teachers-dropdown-wrapper.open,
.sa-dropdown-wrapper.open {
  z-index: 60;
}

.unified-dropdown {
  height: 40px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.unified-dropdown:hover {
  border-color: var(--accent-500);
}

.dropdown-text {
  color: var(--color-text-2);
}

.dropdown-text.text-gray-400 {
  color: var(--color-muted);
  opacity: 0.7;
}

.dropdown-arrow {
  font-size: 12px;
  color: var(--color-muted);
  transition: transform 0.2s ease;
}

.teachers-dropdown-wrapper.open .dropdown-arrow,
.students-dropdown-wrapper.open .dropdown-arrow,
.vis-teachers-dropdown-wrapper.open .dropdown-arrow,
.sa-dropdown-wrapper.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 0.15rem);
  left: 0;
  right: 0;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 7000;
  display: none;
}

.teachers-dropdown-wrapper.open .dropdown-content,
.students-dropdown-wrapper.open .dropdown-content,
.sa-dropdown-wrapper.open .dropdown-content {
  display: block;
}

.vis-teachers-dropdown-wrapper {
  position: relative;
  z-index: 3000;
}
.vis-teachers-dropdown-wrapper.open {
  z-index: 6000;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  outline: none;
  font-size: 14px;
  background: var(--color-surface-2);
  color: var(--color-text);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.options-list {
  max-height: 200px;
  overflow-y: auto;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: var(--color-text);
}

.option-item:hover {
  background: var(--color-surface-2);
}

.option-item--button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.option-item--selected {
  background: rgba(124, 58, 237, 0.08);
  color: var(--color-text);
}

.option-item input[type="checkbox"],
.option-item input[type="radio"] {
  margin-right: 12px;
  accent-color: var(--accent-500);
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}
