/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Import Bootstrap CSS */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css');

/* Dark Mode Theme */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border-color: #30363d;
  --accent-blue: #58a6ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-orange: #fb8500;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* Base Dark Theme */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  padding-top: 0;
  min-height: 100vh;
}

/* Navigation */
.navbar-dark {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-weight: 600;
  color: var(--text-primary) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary) !important;
}

.dropdown-menu {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.dropdown-item {
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Cards */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  border-radius: 12px;
}

.card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0 !important;
}

/* Forms */
.form-control, .form-select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #4a9eff;
  border-color: #4a9eff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-success {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  border-radius: 8px;
  font-weight: 500;
}

.btn-success:hover {
  background-color: #2ea043;
  border-color: #2ea043;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline-primary {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  border-radius: 8px;
}

.btn-outline-primary:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-outline-primary.active {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-outline-danger {
  color: var(--accent-red);
  border-color: var(--accent-red);
  border-radius: 8px;
}

.btn-outline-danger:hover {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
}

/* Alerts */
.alert-success {
  background-color: rgba(63, 185, 80, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
  border-radius: 8px;
}

.alert-danger {
  background-color: rgba(248, 81, 73, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
  border-radius: 8px;
}

/* List Groups */
.list-group-item {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent-blue);
}

/* Tables */
.table {
  color: var(--text-primary);
}

.table-dark {
  --bs-table-bg: var(--bg-secondary);
  --bs-table-striped-bg: var(--bg-tertiary);
  --bs-table-border-color: var(--border-color);
}

/* Validation */
.is-invalid {
  border-color: var(--accent-red) !important;
}

.invalid-feedback {
  color: var(--accent-red);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.3s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Button group styling */
.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Enrollment Status Styles */
.enrollment-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-weight: 500;
}

.status.confirmed {
  background-color: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.status.waitlisted {
  background-color: rgba(251, 133, 0, 0.1);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
}

.status.available {
  background-color: rgba(88, 166, 255, 0.1);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}

.status.waitlist {
  background-color: rgba(251, 133, 0, 0.1);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
}

.status.full {
  background-color: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.feedback-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* All Feedback Section Styles */
.all-feedback-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.all-feedback-section h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-item {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
}

.feedback-item p {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feedback-item strong {
  color: var(--accent-blue);
  font-weight: 600;
}

/* My Courses Styles */
.courses-overview .card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.courses-overview .card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.courses-overview .card-title {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.enrollment-item {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.enrollment-item.confirmed {
  border-left: 4px solid var(--accent-green);
}

.enrollment-item.waitlisted {
  border-left: 4px solid var(--accent-orange);
}

.enrollment-item h5 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.enrollment-item .text-muted {
  color: var(--text-secondary) !important;
  margin-bottom: 1rem;
}

.enrollment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-actions .card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.quick-actions .card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.quick-actions .card-title {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Instructor Filter Styles */
.instructor-filter {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.instructor-filter h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.instructor-filter .form-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  min-width: 200px;
}

.instructor-filter .form-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

.instructor-filter .btn {
  white-space: nowrap;
}

/* Enhanced Form Styling */
.form-control.bg-secondary {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-color);
  color: var(--text-primary) !important;
}

.form-control.bg-secondary:focus {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--accent-blue);
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

/* Enhanced Card Styling */
.card.bg-secondary {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color);
}

.card.border-primary {
  border-color: var(--accent-blue) !important;
}

/* Enhanced Text Colors */
.text-primary {
  color: var(--accent-blue) !important;
}

.text-white {
  color: var(--text-primary) !important;
}

/* Enhanced Badge Styling */
.badge.fs-6 {
  font-size: 0.875rem !important;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* Enhanced Button Styling */
.btn.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-color);
  background-color: transparent;
}

.btn-outline-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Enhanced Alert Styling */
.alert-warning {
  background-color: rgba(251, 133, 0, 0.1);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  border-radius: 8px;
}

/* Enhanced Form Text */
.form-text {
  color: var(--text-secondary) !important;
  font-size: 0.875rem;
}

/* Ensure text-muted has better contrast */
.text-muted {
  color: var(--text-secondary) !important;
}

/* Enhanced Icon Styling */
.fs-5 {
  font-size: 1.25rem !important;
}

/* Enhanced Text Contrast */
small.text-secondary {
  color: var(--text-secondary) !important;
  font-weight: 500;
}

/* Ensure all form controls have proper text visibility */
.form-control[readonly] {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color);
}

/* Enhanced card header text */
.card-header p {
  color: var(--text-secondary) !important;
  font-weight: 500;
}

/* Enhanced card header text */
.card-header strong {
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Password Section Styling */
#password-section {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--accent-blue) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
}

#password-section h5 {
  color: var(--accent-blue) !important;
  font-weight: 600;
  margin-bottom: 1rem;
}

#password-section .text-secondary {
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
}

/* Unified Dark Theme Form Styling */
.input-group-text {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.input-group-text.bg-secondary {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

.input-group-text.border-secondary {
  border-color: var(--border-color) !important;
}

/* Ensure all disabled form controls use dark theme */
.form-control:disabled {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color);
  opacity: 0.8;
}

/* Ensure all readonly form controls use dark theme */
.form-control[readonly] {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color);
}

/* Form control plaintext styling for dark theme */
.form-control-plaintext {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

/* Ensure all form labels use consistent styling */
.form-label {
  color: var(--text-primary) !important;
  font-weight: 500;
}

/* Ensure all form selects use dark theme */
.form-select {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.form-select:focus {
  background-color: var(--bg-primary) !important;
  border-color: var(--accent-blue) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25) !important;
}

/* Ensure all textarea elements use dark theme */
textarea.form-control {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

textarea.form-control:focus {
  background-color: var(--bg-primary) !important;
  border-color: var(--accent-blue) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25) !important;
}

/* Ensure all number inputs use dark theme */
input[type="number"].form-control {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

input[type="number"].form-control:focus {
  background-color: var(--bg-primary) !important;
  border-color: var(--accent-blue) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25) !important;
}

