/* === GLOBAL STYLES === */
body {
  font-family: "Optima", sans-serif;
  background-color: #fff;
  color: #222;
}

/* === NAVBAR === */
.navbar {
  background-color: white; /* Deep Green */
}
.navbar-brand strong {
  color: white;
}
.nav-link {
  color: white !important;
  font-weight: 500;
}
.nav-link.active {
  background-color: #dfffe0; /* Light green highlight */
  color: #006400 !important;
  border-radius: 15px;
  font-weight: bold;
}

/* === ICONS (Bootstrap Icons) === */
.bi {
  margin-right: 6px;
  vertical-align: -0.15em;
  opacity: 0.7;
  font-size: 1.1rem;
}
.bi:hover {
  opacity: 1;
}

/* === BUTTONS === */
.btn {
  border-radius: 6px;
  font-weight: 500;
}
.btn-outline-primary {
  border-color: #006400 !important;
  color: #006400 !important;
}
.btn-outline-primary:hover {
  background-color: #dbeddb;
  color: white;
}
.btn-outline-success {
  border-color: #198754;
  color: #198754;
}
.btn-outline-success:hover {
  background-color: #198754;
  color: white;
}
.btn-outline-danger {
  border-color: #dc3545;
  color: #dc3545;
}
.btn-outline-danger:hover {
  background-color: #dc3545;
  color: white;
}
.btn.btn-primary {
  background-image: linear-gradient(to bottom, #4caf50, #388e3c) !important;
  border-color: #2e7d32 !important;
  color: white !important;
}
/* === TABLES === */
.table thead {
  background-color: #e7f8ec;
  color: #006400;
}
.table th, .table td {
  vertical-align: middle;
}

/* === CARDS === */
.card {
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* === FORMS === */
input.form-control,
select.form-control,
textarea.form-control {
  border-radius: 6px;
}

/* === HEADINGS === */
h1, h2, h3 {
  font-weight: 600;
  color: #006400;
}

/* === AVATARS === */
img.avatar {
  border-radius: 50%;
  object-fit: cover;
  width: 50px;
  height: 50px;
}

/* === FOOTER (optional) === */
footer {
  background: #006400;
  color: white;
  padding: 1rem 0;
  text-align: center;
}
/* Highlight active nav links */
.nav-link.active {
  font-weight: bold;
  border-radius: 6px;
  background-color: #dfffe0;
  color: #006400 !important;
}
/* === Sidebar nav spacing and sticky === */
.col-md-3 {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: #f8f9fa; /* light gray */
  border-right: 1px solid #ddd;
}

/* Sidebar links */
.nav-link {
  font-weight: 500;
  color: #006400 !important;
}
.nav-link:hover {
  background-color: #e9fbe7;
}

/* Active link highlight - thin line only */
.nav-link.active {
  border-left: 4px solid #006400;
  background-color: transparent !important;
  color: #006400 !important;
  font-weight: bold;
  padding-left: 12px;
}

/* Collapse icon alignment */
.nav-link .bi-chevron-down {
  margin-left: auto;
}
/* === SIDEBAR STYLING === */

.sidebar .nav-link {
  color: #006400 !important;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar .nav-link:hover {
  color: #004d00 !important; /* darker green on hover */
  border-left: 3px solid #004d00;
}

.sidebar .nav-link.active {
  color: #006400 !important;
  font-weight: bold;
  border-left: 3px solid #006400;
  background-color: transparent; /* remove blue box */
}

body {
  padding-bottom: 80px; /* Adjust as needed */
}
.sidebar-sticky {
  position: sticky;
  top: 80px; /* Adjust based on header height */
}
/* Green active sidebar tab (like admin dashboard) */
.list-group-item.active {
  background-color: #198754;    
  border-color: #198754;
  color: #fff;
  font-weight: 600;
}

.list-group-item:hover {
  background-color: #e6f4ea;       /* Light green hover */
  color: #198754;
}
@media (max-width: 768px) {
  .sidebar-sticky {
    position: static;
    width: 100%;
  }
  .col-md-3 {
    margin-bottom: 1rem;
  }
  .col-md-9 {
    width: 100%;
  }
}
/* Breadcrumb Link Styling */
.breadcrumb .breadcrumb-item a {
  color: #28a745;
  font-weight: 500;
  text-decoration: none;
}

.breadcrumb .breadcrumb-item a:hover {
  color: #218838;
  text-decoration: underline;
}

.breadcrumb .breadcrumb-item.active {
  color: #6c757d; /* muted for current page */
}

/* Card Header in Green Theme */
.card-header.bg-green {
  background-color: #28a745;
  color: #fff;
}

/* Avatar Profile Image */
.profile-avatar {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
}

/* Optional: Button shadow for consistency */
.btn-success {
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}
#searchInput::placeholder {
  font-style: italic;
  color: #999;
}
form label.form-label {
  font-weight: bold;
}
/* Fix invisible dropdown text in module filter */
select.form-select option {
  color: #212529 !important; /* Visible dark text */
  background-color: #ffffff !important; /* White background */
}
table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 0 0 1px #dee2e6; /* optional: adds a subtle border like Bootstrap */
}
.course-description {
  line-height: 1.3;
  font-size: 0.95rem;
}
/* 🔲 Global Card Style */
.card,
.shadow-card {
  border-radius: 1rem !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  border: none !important;
  background-color: #ffffff;
}

/* 🪄 Smooth hover elevation */
.card:hover {
  transform: translateY(-2px);
  transition: all 0.2s ease-in-out;
}

/* 📋 Inputs and Textareas */
.form-control,
.form-select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"] {
  border-radius: 0.75rem !important;
  border: 1px solid #ced4da;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

/* 🔘 Buttons */
.btn {
  border-radius: 0.75rem !important;
  padding: 0.5rem 1rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 📦 Tables */
.table {
  border-radius: 0.75rem !important;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 💬 Modals */
.modal-content {
  border-radius: 1rem !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
}

/* ⬇️ Dropdowns */
.dropdown-menu {
  border-radius: 0.75rem !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
}

/* 🖼️ Images */
.card-img-top,
.img-thumbnail {
  border-radius: 0.75rem !important;
}

/* 🔇 Muted text */
.text-muted {
  color: #6c757d !important;
  font-size: 0.95rem;
}
/* Sticky panel container fix */
.ck.ck-sticky-panel__content_sticky {
  position: sticky !important;
  top: 70px !important;
  z-index: 1055 !important;
  background: #fff !important;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Make sure no ancestor breaks it */
.card.p-4.shadow-sm,
form,
.container {
  overflow: visible !important;
  position: relative !important;
}

/* Editor minimum height and content styling */
.ck-editor__editable_inline {
  min-height: 400px;
}

.ck-content table {
  width: 100% !important;
  table-layout: auto;
  border-collapse: collapse;
}
.accordion-button:not(.collapsed) {
  background-color: #d4edda !important;  /* Light green or your preferred shade */
  color: #155724 !important;             /* Optional: text color for contrast */
  box-shadow: 0 0 0 2px #dee2e6;         /* Optional: remove Bootstrap shadow */
}
.newsletter-form {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.shadow-input {
  border-radius: 0.75rem;
  padding: 1rem 0.75rem;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* Elegant soft shadow */
  transition: border-color 0.3s, box-shadow 0.3s;
}

.shadow-input:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.btn-dark {
  background-color: #000;
  border: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-dark:hover {
  background-color: #1a1a1a;
  

}
.form-control.shadow-soft {
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.form-control.shadow-soft:focus {
  border-color: rgb(185, 197, 209);
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}
.btn-outline-primary:hover {
  background-color: #006400 !important;  /* Dark green */
  color: #fff !important;                /* Ensure text stays white */
  border-color: #006400 !important;
}
.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 100, 0, 0.25);
}
/* ✅ Force modal overlay */
#previewModal {
    display: block !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* ✅ Modal content animation */
#previewModal .modal-dialog {
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
}

/* ✅ Rounded Apple-style modal */
#previewModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.editor-container {
    position: relative;
}

#global-editor-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 6px;
    position: sticky;
    top: 60px; /* adjust based on header height */
    z-index: 99999 !important;
}
:root {
  --bs-primary: #0E5E3F;
  --bs-primary-hover: #149657;
}

.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.btn-primary:hover,
.list-group-item.active,
.nav-link.active {
    background-color: var(--bs-primary-hover) !important;
    border-color: var(--bs-primary-hover) !important;
}

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

.bg-primary {
    background-color: var(--bs-primary) !important;
}
  /* ✅ Quiz Section Layout */
  #quizForm {
    margin-top: 1rem;
  }
  #quizForm .card {
    border-radius: 14px;
  }

  /* ✅ Buttons side by side */
  .lesson-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
  }
  .lesson-actions .btn {
    min-width: 160px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
  }
  .lesson-actions .btn-success:hover {
    background-color: #28b463;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  }

  /* ✅ Icon-only buttons for view/edit/delete */
  .icon-btn {
    background: none !important;
    border: none !important;
    padding: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
  }
  .icon-btn:hover {
    color: #000;
  }
.cke_editable table {
    width: 100% !important;
    table-layout: auto;
}
.lesson-preview table,
.lesson-preview .ck-content table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}

.lesson-preview table td,
.lesson-preview table th {
  padding: 8px 12px;
  vertical-align: middle;
  word-break: break-word;
}

.lesson-preview table th {
  background-color: #f8f9fa;
  color: #006400;
  font-weight: 600;
}
.btn-primary, .progress-bar.bg-primary {
  background-color: #1E5631 !important; /* MRC Deep Green */
  border-color: #1E5631 !important;
}
.btn-primary:hover {
  background-color: #174426 !important;
  border-color: #174426 !important;
}
.modal-bg.show { 
  display: flex; 
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
/* Overlay background */
.modal-overlay {
  position: fixed;
  inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0 */
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Show overlay when open */
.modal-overlay.open {
  display: flex;
  opacity: 1;
}

/* Modal content container */
#modal-refine {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Show modal content when overlay is open */
.modal-overlay.open #modal-refine {
  opacity: 1;
  transform: translateY(0);
}

/* Close button styles */
#btn-modal-cancel {
  background: #ccc;
  color: #000;
  padding: 8px 14px;
  border-radius: 4px;
  margin-right: 10px;
  cursor: pointer;
  border: none;
}

#btn-modal-save {
  background: #4caf50;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

/* Ensure modal is on top of all other elements */
body.modal-open {
  overflow: hidden;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}
/* Notifications panel */
#notifPanel .list-group-item{ background:var(--card); }
#notifPanel .list-group-item.unread{ background:rgba(27,170,86,.05); }
#notifPanel .actor{
  width:32px; height:32px; border-radius:50%; object-fit:cover;
  border:1px solid var(--stroke); margin-right:10px;
}
/* Notifications panel + unread tint (global) */
#notifPanel .list-group-item.unread{ background:rgba(27,170,86,.05); }
/* Subtle icon alignment inside .pill and .cta */
.pill i, .cta i { font-size: 1rem; line-height: 1; }
.pill i { margin-right: .35rem; }
.cta i  { margin-right: .4rem; }

/* Tighten progress bar rounding for a precision feel */
.progress { height: 10px; border-radius: 12px; }
.progress i { border-radius: 12px; }

/* Typographic rhythm */
.title, .h { letter-spacing: .2px; }
/* Invite Email modal — remove decorative background/illustration */
#inviteEmailModal .modal-body .modal-illustration,
#inviteEmailModal .modal-body .modal-art,
#inviteEmailModal .modal-body svg,
#inviteEmailModal .modal-body canvas,
#inviteEmailModal .modal-body .card-bg,
#inviteEmailModal .modal-body > *:last-child img[alt*="illustration"] {
  display: none !important;
}

/* Keep the modal clean and “Apple” */
#inviteEmailModal .modal-content{
  border-radius:16px;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 20px 48px rgba(0,0,0,.18);
}