/* =========================================
MSCS Calendar 
========================================= */
.meta.mb-2 img {
  max-height: 200px !important;
}

:root {
  --calendar-primary: #0d6efd;
  --calendar-primary-hover: #0b5ed7;
  --calendar-danger: #dc3545;
  --calendar-success: #198754;
  --calendar-warning: #ffc107;
  --calendar-gray-50: #f9fafb;
  --calendar-gray-100: #f3f4f6;
  --calendar-gray-200: #e5e7eb;
  --calendar-gray-300: #d1d5db;
  --calendar-gray-400: #9ca3af;
  --calendar-gray-500: #6b7280;
  --calendar-gray-600: #4b5563;
  --calendar-gray-700: #374151;
  --calendar-gray-800: #1f2937;
  --calendar-gray-900: #111827;
  --calendar-radius: 0.5rem;
  --calendar-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --calendar-shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.meta.watch-live a {
  color: #fff;
  background: #dc3545;
  padding: 0.2em 1em;
  border-radius: 0.5em;
  text-decoration: none;
}
/* Calendar Legend */
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--calendar-gray-50);
  border-radius: var(--calendar-radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.legend-title {
  font-weight: 600;
  color: var(--calendar-gray-600);
  font-size: 0.875rem;
}

.legend-items {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--calendar-gray-600);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.legend-item:hover {
  background: var(--calendar-gray-200);
}

.legend-dot {
  width: 12px;
  height: 10px;
  border-radius: 4%;
  flex-shrink: 0;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--calendar-gray-600);
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

.legend-item:hover {
  background: var(--calendar-gray-200);
  color: var(--calendar-gray-800);
}

.legend-item:focus {
  outline: 2px solid #0e76bb;
  outline-offset: 2px;
}

.legend-item.active {
  background: #0c3f98;
  color: #fff;
  border-color: #0a5a8f00;
  box-shadow: 0 4px 12px rgba(14, 118, 187, 0.18);
}

.legend-item.active .legend-dot {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.legend-items button.students:hover {
  background: #fc0000;
  color: #fff;
}

.legend-items button.teacher:hover {
  background: #ffc107;
  color: #fff;
}
.legend-items button.board:hover {
  background: #4d16b3;
  color: #fff;
}

.legend-items button.employee:hover {
  background: #ff8c04;
  color: #fff;
}
.legend-items button.assessement:hover {
  background: #586e8e;
  color: #fff;
}
.legend-items button.events:hover {
  background: #25792f;
  color: #fff;
}

.legend-items button.graduation:hover {
  background: #0049cb;
  color: #fff;
}
.legend-item.legend-item-all.active {
  background: linear-gradient(90deg, #64748b, #64748b);
}
/* Calendar Wrapper */
.calendar-wrapper {
  background: #fff;
  border-radius: var(--calendar-radius);
  box-shadow: var(--calendar-shadow);
  padding: 1.5rem;
  border: 1px solid var(--calendar-gray-200);
}

/* === Toolbar === */
.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* View Toggle - Segmented Control */
.cal-view-toggle {
  display: flex;
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.cal-toggle-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 8px;
}

.cal-toggle-btn i {
  font-size: 0.9rem;
}

.cal-toggle-btn.active {
  color: #ffffff;
}

.cal-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #0e76bb 0%, #0a5a8f 100%);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(14, 118, 187, 0.35);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

/* Download Button */
.cal-download-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cal-download-btn:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cal-download-btn::after {
  margin-left: 0.25rem;
}

/* === Filters === */
.cal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.cal-search-wrap {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.cal-search-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.cal-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.cal-search-input:focus {
  outline: none;
  border-color: #0e76bb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 118, 187, 0.12);
}

.cal-filter-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cal-filter-select {
  min-width: 160px;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #f8fafc
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 1rem center;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-filter-select:focus {
  outline: none;
  border-color: #0e76bb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 118, 187, 0.12);
}

/* === Dropdown Menu === */
#mscs-calendar-app .dropdown-menu {
  padding: 0.5rem;
  border: none;
  border-radius: 12px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.08);
  min-width: 280px;
  animation: dropIn 0.2s ease;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mscs-calendar-app .dropdown-menu .dropdown-header {
  font-weight: 700;
  font-size: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0e76bb;
  padding: 0.75rem 1rem 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

#mscs-calendar-app .dropdown-menu .dropdown-item {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #334155;
  transition: all 0.15s ease;
}

#mscs-calendar-app .dropdown-menu .dropdown-item:hover {
  background: #f1f5f9;
  color: #0e76bb;
  transform: translateX(4px);
}

#mscs-calendar-app .dropdown-divider {
  margin: 0.5rem 0;
  border-color: #e2e8f0;
}

/* === Pagination === */
#mscs-calendar-app .pagination {
  gap: 0.35rem;
}

#mscs-calendar-app .page-item .page-link {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  transition: all 0.15s ease;
}

#mscs-calendar-app .page-item .page-link:hover {
  background: #e2e8f0;
  color: #0f172a;
}

#mscs-calendar-app .page-item.active .page-link {
  background: linear-gradient(135deg, #0e76bb 0%, #0a5a8f 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 118, 187, 0.35);
}

#mscs-calendar-app .page-item.disabled .page-link {
  background: #f8fafc;
  color: #cbd5e1;
}

/* === Event Cards === */
#mscs-calendar-app .event-card {
  border: none;
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#mscs-calendar-app .event-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

#mscs-calendar-app .event-card-date {
  background: linear-gradient(180deg, #0e76bb 0%, #064e77 100%);
}

#mscs-calendar-app .event-card-content {
  padding: 1.75rem 1.25rem 1.25rem;
}

#mscs-calendar-app .event-card-content h5 {
  font-weight: 700;
  font-size: 1.05rem;
  color: #3b4b71;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  margin-top: 1em;
}

#mscs-calendar-app .event-card-content .meta {
  color: #64748b;
  font-size: 0.85rem;
}

#mscs-calendar-app .event-card-content .category-label {
  background: linear-gradient(135deg, #0e76bb 0%, #0a5a8f 100%);
  /* background: linear-gradient(135deg, #26353f 0%, #031019 100%); */
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  /* box-shadow: 0 2px 8px rgba(14, 118, 187, 0.3); */
  z-index: 0;
}

/* Action buttons in cards */
#mscs-calendar-app .event-card .btn-primary {
  background: linear-gradient(135deg, #0e76bb 0%, #0a5a8f 100%);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 0.25em 1em;
  box-shadow: 0 2px 6px rgba(14, 118, 187, 0.25);
  transition: all 0.2s ease;
}

#mscs-calendar-app .event-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 118, 187, 0.35);
}

#mscs-calendar-app .event-card .btn-outline-primary {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#mscs-calendar-app .event-card .btn-outline-primary:hover {
  background: #f8fafc;
  border-color: #0e76bb;
  color: #0e76bb;
}

/* === List View Enhanced === */
#mscs-calendar-app #listWrapper .list-group-item {
  border: none;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  background: #ffffff;
}

#mscs-calendar-app #listWrapper .list-group-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

#mscs-calendar-app #listWrapper .event-date {
  min-width: 80px;
  padding: 0.75rem;
  border-radius: 10px;
  color: #ffffff;
}
.event-description p {
  padding: 0;
}
/* Responsive */
@media (max-width: 768px) {
  .cal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cal-view-toggle {
    order: 2;
    justify-content: center;
  }

  .cal-download-btn {
    width: 100%;
    justify-content: center;
  }

  .cal-filters {
    flex-direction: column;
  }

  .cal-search-wrap {
    min-width: 100%;
  }

  .cal-filter-group {
    width: 100%;
  }

  .cal-filter-select {
    flex: 1;
    min-width: 0;
  }
}

/* Legacy overrides */
.flex-wrap .btn-outline-primary {
  background: #ffffff;
  border: #77839e 0.15em solid;
  color: #4e4f53;
}

/* Scope to this section to avoid side effects */
#quick-links.qlb .card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    box-shadow 0.18s ease,
    transform 0.16s ease,
    border-color 0.18s ease;
  color: #0b172a;
  text-decoration: none;
}
#quick-links.qlb .card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 118, 187, 0.22);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.1),
    0 1px 1px rgba(14, 118, 187, 0.12);
}
#quick-links.qlb .card:focus {
  outline: 2px solid #0e76bb;
  outline-offset: 2px;
}

/* soft diagonal gradient wash behind content */
#quick-links.qlb .qlb-grad {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(14, 118, 187, 0.1),
    rgba(14, 118, 187, 0)
  );
}

/* make the existing <i> into a soft “pill” */
#quick-links.qlb .card i {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  font-size: 1.25rem;
  color: #0e76bb; /* subtle brand tint */
}

/* label */
#quick-links.qlb .card span {
  font-weight: 700;
  font-size: 1.07rem;
  line-height: 1.2;
}

/* responsive trims */
@media (max-width: 1200px) {
  #quick-links.qlb .card {
    padding: 0.75rem 0.9rem;
  }
  #quick-links.qlb .card i {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  #quick-links.qlb .card span {
    font-size: 1.03rem;
  }
}

/* dropdown header override moved to new styles above */

/* Card shell */
.event-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0rem;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin: 0 0.5em;
}

/* Left date rail */
.event-card-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 1rem 0.5rem;
  background: linear-gradient(180deg, #005aa8 0%, #0e76bb 55%, #2d405c 100%);
  width: 100%;
  position: relative;
}

/* .event-card-date .month {
text-transform: uppercase;
font-size: 1rem;
letter-spacing: .08em;
opacity: .95;
font-style: italic;
} */
.event-card-date .month {
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.08em;
  opacity: 0.95;
  font-style: italic;
  margin-top: 2em;
  top: 0;
  position: absolute;
  left: 0;
  right: 0;
}
/* .event-card-date .day {
font-size: 2.75rem;
line-height: 1;
font-weight: 800;
} */
.event-card-date .day {
  font-size: 4rem;
  line-height: 1;
  font-weight: 800;
  margin-top: 0.8em;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
/* .event-card-date .year {
font-size: .95rem;
opacity: .9;
font-style: italic;
} */
.event-card-date .year {
  font-size: 0.95rem;
  opacity: 0.9;
  font-style: italic;
  margin-top: 7.8em;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
/* Right content */
.event-card-content {
  position: relative;
  padding: 2rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Category pill centered above title */
.event-card-content .category-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #141212;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25em 0.9em;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
  white-space: nowrap;
  font-style: italic;
  text-align: center;
}

/* Title & meta */
.event-card-content .event-title {
  margin-top: 0.6rem; /* make room for the pill */
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #1e1e1e;
}

.event-card-content .event-meta {
  color: #58595b;
  font-size: 0.9rem;
}

/* Hover: slight lift */
.event-card:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.event-card,
#listWrapper .list-group-item {
  cursor: pointer;
}
.event-card:focus,
#listWrapper .list-group-item:focus {
  outline: 2px solid #0e76bb;
  outline-offset: 2px;
}
.event-card-content .category-label {
  background: #063354;
  color: #ffffff;
  margin-top: 1em;
  border-radius: 0.2em;
  margin: 1em -2em;
  left: 0;
}
/* Responsive: stack on mobile */
@media (max-width: 576px) {
  .event-card {
    grid-template-columns: 1fr;
  }
  .event-card-date {
    flex-direction: row;
    gap: 0.75rem;
    justify-content: center;
  }
  .event-card-date .day {
    font-size: 2.25rem;
  }
  .event-card-content .category-label {
    top: -10px;
  }
}
