/**
 * Enrollment Move Drawer v2
 * Namespaced CSS for right-side enrollment move drawer
 * All selectors prefixed with .emove-* to avoid conflicts
 */

/* Root container - fixed overlay */
.emove-root {
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
}

.emove-root[aria-hidden="false"] {
  display: block;
  pointer-events: auto;
}

/* Background overlay */
.emove-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  z-index: 1040;
}

/* Main drawer panel */
.emove-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(480px, 92vw);
  background: #ffffff;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 1041;
}

/* Panel slide-in animation */
.emove-root.emove-open .emove-panel {
  transform: translateX(0);
}

/* Header section */
.emove-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
}

.emove-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

.emove-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  margin: -0.25rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.emove-close:hover,
.emove-close:focus {
  color: #495057;
  background-color: #e9ecef;
  outline: none;
}

/* Body content */
.emove-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.emove-row {
  margin-bottom: 1.5rem;
}

.emove-row:last-child {
  margin-bottom: 0;
}

.emove-label {
  display: block;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.emove-value {
  padding: 0.5rem 0;
  font-weight: 600;
  color: #212529;
}

.emove-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: #ffffff;
  color: #495057;
  font-size: 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.emove-select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.emove-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

/* Smaller select variant for filters */
.emove-select-sm {
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}

/* Inline row for checkboxes */
.emove-row-inline {
  margin-bottom: 1rem;
}

.emove-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6c757d;
}

.emove-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #636882;
  cursor: pointer;
}

.emove-checkbox-label:hover {
  color: #495057;
}

/* Footer actions */
.emove-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Body scroll lock when drawer is open */
body.emove-lock {
  overflow: hidden;
}

/* Dark theme support */
[data-bs-theme="dark"] .emove-panel {
  background: #212529;
  color: #ffffff;
}

[data-bs-theme="dark"] .emove-header {
  background: #343a40;
  border-bottom-color: #495057;
}

[data-bs-theme="dark"] .emove-header h2 {
  color: #ffffff;
}

[data-bs-theme="dark"] .emove-close {
  color: #adb5bd;
}

[data-bs-theme="dark"] .emove-close:hover,
[data-bs-theme="dark"] .emove-close:focus {
  color: #ffffff;
  background-color: #495057;
}

[data-bs-theme="dark"] .emove-label {
  color: #adb5bd;
}

[data-bs-theme="dark"] .emove-value {
  color: #ffffff;
}

[data-bs-theme="dark"] .emove-select {
  background-color: #495057;
  border-color: #6c757d;
  color: #ffffff;
}

[data-bs-theme="dark"] .emove-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .emove-help {
  color: #6c757d;
}

[data-bs-theme="dark"] .emove-checkbox-label {
  color: #adb5bd;
}

[data-bs-theme="dark"] .emove-checkbox-label:hover {
  color: #ffffff;
}

[data-bs-theme="dark"] .emove-footer {
  background: #343a40;
  border-top-color: #495057;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .emove-panel {
    width: 100vw;
  }
  
  .emove-header,
  .emove-body,
  .emove-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Focus ring for accessibility */
.emove-panel:focus {
  outline: none;
}

.emove-close:focus-visible,
.emove-select:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}