/* Phone Row Styles */
.phone-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.phone-main {
  flex: 2;
}

.phone-ext {
  flex: 1;
}

/* Date Range Styles */
.date-range-row {
  display: flex;
  gap: 1rem;
}

.date-field {
  flex: 1;
}

/* Grade Range Styles */
.grade-range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grade-field {
  flex: 1;
}

/* Form Styles */
.form-container {
  max-width: 600px;
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #495057;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  box-sizing: border-box;
  line-height: 1.5;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("/assets/chevron-down-f339a553.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 36px;
}

.checkbox-group {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  background-color: #f8f9fa;
}

.form-check {
  display: flex;
  align-items: center;
  padding: 6px 0;
}

.form-check-input {
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.form-check-label {
  cursor: pointer;
  color: #495057;
  font-size: 14px;
  user-select: none;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.form-section-header {
  margin: 2rem 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

/* Error Messages */
.field-with-errors .form-control {
  border-color: #e74c3c;
}

.required {
  color: #721c24;
}

.error-messages {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.error-messages h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
}

.district-school-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.district-item {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.district-item.expanded .school-list {
  display: block;
}

.district-item.expanded .chevron-icon {
  transform: rotate(0deg);
}

.district-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.district-header:hover {
  background-color: #f8f9fa;
}

.district-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #6c757d;
}

.chevron-icon {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.district-checkbox,
.school-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
  accent-color: #3498db;
}

.district-checkbox:indeterminate {
  accent-color: #6c757d;
}

.district-icon,
.school-icon {
  width: 20px;
  height: 20px;
  color: #6c757d;
  flex-shrink: 0;
}

.district-label {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  flex: 1;
  user-select: none;
}

.school-count {
  font-size: 14px;
  color: #6c757d;
  margin-left: auto;
  white-space: nowrap;
}

.school-count.all-selected {
  color: #28a745;
  font-weight: 500;
}

.school-list {
  display: none;
  padding: 0 16px 16px 16px;
  background-color: #ffffff;
}

.school-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-left: 36px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.school-item:hover {
  background-color: #f8f9fa;
}

.school-label {
  font-size: 15px;
  color: #495057;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

/* District & School Header */
.district-school-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.school-quick-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Custom Dropdown */
.custom-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  font-size: 14px;
  color: #3498db;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-right: 16px;
  font-family: inherit;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-trigger:hover .dropdown-text {
  text-decoration: underline;
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  color: #3498db;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.custom-dropdown.open .dropdown-menu {
  display: block;
  animation: dropdownSlide 0.15s ease-out;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #333;
  font-weight: 400;
  cursor: pointer;
  background: white;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 14px;
  font-family: inherit;
  transition: background 0.1s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item + .dropdown-divider {
  margin-top: -1px;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: #3498db;
}

.dropdown-item:active {
  background: #e9ecef;
}

.dropdown-divider {
  height: 1px;
  background: #ddd;
  margin: 4px 0 0 0;
}

.dropdown-item-danger {
  color: #e74c3c;
}

.dropdown-item-danger:hover {
  background: #fff5f5;
  color: #c0392b;
}