/* Admin Course Styles */

.course-form-container {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Steps */
.step-card {
  border-left: 5px solid #007bff;
}

/* Questions */
.question-card {
  border-left: 4px solid #28a745;
}

.question-label {
  font-weight: 600;
  color: #28a745;
}

/* Answers */
.answer-row {
  border-left: 3px solid #6c757d;
}

.answer-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  /* Material Design 3 Color Palette - Blue Scheme */
  --m3-primary: #005a9e;
  /* Professional Blue */
  --m3-on-primary: #ffffff;
  --m3-primary-container: #d1e4ff;
  --m3-on-primary-container: #001d36;

  --m3-secondary: #535f70;
  --m3-on-secondary: #ffffff;
  --m3-secondary-container: #d7e3f7;
  --m3-on-secondary-container: #101c2b;

  --m3-surface: #f8f9ff;
  --m3-on-surface: #191c20;
  --m3-surface-variant: #dfe3eb;
  --m3-on-surface-variant: #43474e;

  --m3-outline: #73777f;
  --m3-shadow: rgba(0, 0, 0, 0.1);
  --m3-error: #ba1a1a;
  --m3-on-error: #ffffff;
  --m3-error-container: #ffdad6;
  --m3-on-error-container: #410002;

  /* Elevation */
  --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

body {
  padding-top: 100px;
  font-family: 'Roboto', sans-serif;
  background-color: var(--m3-surface);
  color: var(--m3-on-surface);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--m3-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Navbar M3 Floating Style */
.navbar {
  background-color: rgba(244, 246, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  margin: 1rem;
  border-radius: 100px;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--m3-surface-variant) !important;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand {
  font-family: 'Outfit', sans-serif;
  color: var(--m3-primary) !important;
  font-weight: 700;
  font-size: 1.4rem;
}

.nav-link {
  color: var(--m3-on-surface-variant) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 100px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: var(--m3-surface-variant);
  color: var(--m3-on-surface) !important;
}

/* Material Buttons - Advanced Modern Style */
.btn {
  border-radius: 100px;
  padding: 0.7rem 1.8rem;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  border: none;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Filled Button (Primary) */
.btn-primary {
  background-color: var(--m3-primary) !important;
  color: var(--m3-on-primary) !important;
  box-shadow: var(--elevation-1);
}

.btn-primary:hover {
  background-color: #354e78 !important;
  /* Muted dark blue */
  box-shadow: var(--elevation-2);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #2b4063 !important;
  transform: translateY(0);
}

/* Outlined Button */
.btn-outline-primary {
  border: 1px solid var(--m3-outline);
  color: var(--m3-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--m3-primary-container);
  color: var(--m3-on-primary-container);
  border-color: var(--m3-primary);
}

/* Tonal Button (M3 Variant) */
.btn-tonal {
  background-color: var(--m3-secondary-container);
  color: var(--m3-on-secondary-container);
}

.btn-tonal:hover {
  background-color: #c9d7ef;
  box-shadow: var(--elevation-1);
}

/* Elevated Button (New M3 Variant) */
.btn-elevated {
  background-color: #fff;
  color: var(--m3-primary);
  box-shadow: var(--elevation-2);
}

.btn-elevated:hover {
  box-shadow: var(--elevation-3);
  background-color: var(--m3-surface);
  transform: translateY(-2px);
}

/* Text Button */
.btn-text {
  background: transparent;
  color: var(--m3-primary);
  padding-left: 1rem;
  padding-right: 1rem;
}

.btn-text:hover {
  background-color: var(--m3-primary-container);
  opacity: 0.9;
}

/* Icon alignment inside buttons */
.btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(2px);
}

/* Cards M3 Style */
.card,
.card-custom {
  background-color: #fff;
  border-radius: 28px;
  border: 1px solid var(--m3-surface-variant);
  box-shadow: var(--elevation-1);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover,
.card-custom:hover {
  box-shadow: var(--elevation-2);
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--m3-surface-variant) !important;
  padding-bottom: 1rem !important;
}

/* Forms M3 Outlined */
.form-control,
.form-select {
  border-radius: 12px;
  border: 1px solid var(--m3-outline);
  padding: 0.8rem 1rem;
  background-color: transparent;
  transition: border-width 0.1s, border-color 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--m3-primary);
  border-width: 2px;
  box-shadow: none;
  background-color: transparent;
}

.form-label {
  font-weight: 500;
  color: var(--m3-on-surface-variant);
  margin-left: 0.2rem;
}

/* Alerts */
.alert {
  border-radius: 16px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0a3622;
}

.alert-danger {
  background-color: #f8d7da;
  color: #58151c;
}

/* Footer */
footer {
  background-color: var(--m3-surface-variant);
  color: var(--m3-on-surface-variant);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  border-top: none;
}

footer h5 {
  color: var(--m3-primary);
  font-weight: 700;
}

footer a {
  color: var(--m3-on-surface-variant);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--m3-primary);
}

/* Custom Utilities */
.text-primary {
  color: var(--m3-primary) !important;
}

.bg-primary {
  background-color: var(--m3-primary) !important;
}

/* Admin Sticky Form Fix - Integrated Pill Style */
.admin-sticky-submit {
  position: sticky;
  bottom: 6.5rem !important;
  z-index: 1040;
  display: flex !important;
  justify-content: center;
  pointer-events: none;
  /* Container doesn't block clicks */
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.admin-sticky-submit .btn {
  pointer-events: auto;
  /* Button itself remains clickable */
  padding: 0.8rem 2.5rem !important;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
  border: 4px solid var(--m3-surface) !important;
  /* Visual integration: adds 'air' around the button */
}

.admin-sticky-submit .btn:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

/* Quiz Validation - Material 3 Style */
.quiz-question {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  padding-left: 1.5rem !important;
  position: relative;
}

.quiz-question.is-invalid {
  border-left-color: var(--m3-error);
  background-color: rgba(186, 26, 26, 0.02);
  /* The animation triggers when the class is added OR when the element is rendered with it */
  animation: m3-shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.error-message {
  display: none;
  color: var(--m3-error);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  align-items: center;
  gap: 0.25rem;
}

.is-invalid .error-message {
  display: flex;
}

@keyframes m3-shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}
