





#epilepsy-rotation .page-subtitle {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

#epilepsy-rotation .page-subtitle-credit {
  display: block;
  margin-top: 0.2rem;
}

#epilepsy-rotation .epilepsy-tabs {
  margin-bottom: 1.5rem;
}

#epilepsy-rotation .tab-nav {
  justify-content: center;
  gap: 0.35rem;
}

#epilepsy-rotation .tab-nav-item {
  appearance: none;
  font: inherit;
  min-width: 140px;
  text-align: center;
}

#epilepsy-rotation .tab-nav-item:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

/* Quick Links Dropdown Styles - Desktop */
#epilepsy-rotation .quick-links-dropdown-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: none;
  position: sticky;
  top: 64px;
  z-index: 20;
}

#epilepsy-rotation .dropdown-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

#epilepsy-rotation .quick-links-dropdown {
  flex: 1;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  appearance: none;
  background-image: 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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 40px;
}

#epilepsy-rotation .quick-links-dropdown:hover {
  border-color: var(--accent-color);
  box-shadow: none;
}

#epilepsy-rotation .quick-links-dropdown:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

/* Dark mode styles */
body.dark #epilepsy-rotation .quick-links-dropdown-container {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

body.dark #epilepsy-rotation .dropdown-label {
  color: var(--text-color);
}

body.dark #epilepsy-rotation .quick-links-dropdown {
  background-color: var(--bg-color);
  border-color: var(--border-color);
  color: var(--text-color);
  background-image: 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='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body.dark #epilepsy-rotation .quick-links-dropdown:hover {
  border-color: var(--accent-color);
  box-shadow: none;
}

body.dark #epilepsy-rotation .quick-links-dropdown:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

#epilepsy-rotation .section-heading-icon {
  color: var(--accent-color);
  margin-right: 0.5rem;
}

#epilepsy-rotation .goals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#epilepsy-rotation code {
  color: var(--text-color);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

/* Table variants */
#epilepsy-rotation .custom-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-color);
}

#epilepsy-rotation .schedule-table tbody td:first-child,
#epilepsy-rotation .contact-table tbody td:first-child,
#epilepsy-rotation .phrase-table tbody td:first-child {
  min-width: 12rem;
}

#epilepsy-rotation .info-box table.custom-table tbody td:first-child i {
  color: var(--accent-color);
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

#epilepsy-rotation .milestone-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

#epilepsy-rotation .milestone-links .table-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 102, 204, 0.1);
  border-radius: var(--radius-sm);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  border: 1px solid rgba(0, 102, 204, 0.2);
}

#epilepsy-rotation .milestone-links .table-link:hover {
  background: rgba(0, 102, 204, 0.2);
  transform: none;
  box-shadow: none;
  text-decoration: none;
}

body.dark #epilepsy-rotation .milestone-links .table-link {
  background: rgba(41, 151, 255, 0.15);
  border-color: rgba(41, 151, 255, 0.3);
}

body.dark #epilepsy-rotation .milestone-links .table-link:hover {
  background: rgba(41, 151, 255, 0.25);
  box-shadow: none;
}

#epilepsy-rotation .info-box {
  background: var(--surface-1);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: none;
  margin-bottom: 1.5rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#epilepsy-rotation .info-box:hover {
  box-shadow: none;
}

#epilepsy-rotation h2.section-header {
  font-size: 1.6rem;
  text-align: left;
  border-bottom: none;
  margin: 2rem 0 0.75rem;
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color var(--transition-duration);
}

#epilepsy-rotation h2.section-header:first-of-type {
  margin-top: 0.5rem;
}

#epilepsy-rotation .info-box h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color var(--transition-duration);
}

#epilepsy-rotation .info-box h4 {
  font-size: 1.2rem;
  margin: 1.2rem 0 0.8rem;
  color: var(--text-color);
  font-weight: 600;
  transition: color var(--transition-duration);
}

body.dark #epilepsy-rotation h2.section-header,
body.dark #epilepsy-rotation .info-box h3,
body.dark #epilepsy-rotation .info-box h4 {
  color: var(--text-color);
}

#epilepsy-rotation .section-detail {
  margin-bottom: 1.5rem;
}

#epilepsy-rotation .section-header {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1rem 0;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.2s ease;
}

#epilepsy-rotation .section-header:hover {
  color: var(--accent-color);
}

/* REMOVE BULLETS FROM ACCORDION LISTS AND CHECKLISTS */
#epilepsy-rotation .accordion-container ul,
#epilepsy-rotation .checklist,
#epilepsy-rotation .clean-list {
  list-style: none;
  padding-left: 0;
}

#epilepsy-rotation .accordion-container ul li,
#epilepsy-rotation .checklist li,
#epilepsy-rotation .clean-list li {
  margin-bottom: 0.8rem;
  padding-left: 0;
  position: relative;
}

/* Specific styling for clean-list to improve readability without bullets */
#epilepsy-rotation .clean-list li {
  padding-left: 1rem;
  border-left: 3px solid rgba(0, 102, 204, 0.3);
  /* Accent color border */
  line-height: 1.5;
}

body.dark #epilepsy-rotation .clean-list li {
  border-left-color: rgba(41, 151, 255, 0.4);
}

#epilepsy-rotation .checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#epilepsy-rotation .checklist li i {
  color: var(--accent-color);
  margin-top: 4px;
  /* Align icon with text */
}

#epilepsy-rotation .custom-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--surface-1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: none;
  transition: background var(--transition-duration), box-shadow var(--transition-duration);
}

#epilepsy-rotation .schedule-table th:first-child,
#epilepsy-rotation .schedule-table td:first-child {
  width: 12rem;
}

#epilepsy-rotation .event-table th:first-child,
#epilepsy-rotation .event-table td:first-child {
  width: 28%;
}

#epilepsy-rotation .custom-table thead th {
  background-color: var(--surface-2);
  color: var(--text-color);
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

body.dark #epilepsy-rotation .custom-table thead th {
  background-color: var(--surface-2);
  color: var(--text-color);
}

#epilepsy-rotation .custom-table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  transition: color var(--transition-duration), background-color var(--transition-duration);
}

#epilepsy-rotation .custom-table tbody tr:last-child td {
  border-bottom: none;
}

#epilepsy-rotation .custom-table tbody tr:hover td {
  background-color: var(--surface-2);
}

body.dark #epilepsy-rotation .custom-table tbody tr:hover td {
  background-color: var(--surface-2);
}

#epilepsy-rotation .table-link {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

#epilepsy-rotation .table-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

body.dark #epilepsy-rotation .table-link {
  color: var(--accent-color);
}

#epilepsy-rotation .table-link i {
  margin-right: 5px;
}

#epilepsy-rotation .copy-button {
  appearance: none;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-color);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 0.45rem;
  padding: 0.25rem 0.5rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#epilepsy-rotation .copy-button:hover,
#epilepsy-rotation .copy-button:focus-visible {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.45);
}

#epilepsy-rotation .copy-block {
  position: relative;
}

#epilepsy-rotation .copy-block-button {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
}

#epilepsy-rotation .code-block,
#epilepsy-rotation .curriculum-scroll {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

#epilepsy-rotation .code-block {
  color: var(--text-color);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  overflow-x: auto;
  padding: 3rem 1rem 1rem;
  white-space: pre-wrap;
}

#epilepsy-rotation .curriculum-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding: 1rem;
}

/* Modal styling (the disclaimer dialog uses these classes) */
#epilepsy-rotation .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(3px);
}

/* Remove the scoping of modal styles to just #epilepsy-rotation to fix global modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(3px);
}

.modal-content {
  background: var(--surface-1);
  padding: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  position: relative;
  transition: background var(--transition-duration), box-shadow var(--transition-duration);
}

.modal-header {
  background: var(--action-bg);
  color: var(--action-ink);
  padding: 15px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
  background: var(--surface-1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--action-ink);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* When the modal is open, prevent scrolling on the main body */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Animation for modal fade-out */
@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.fade-out {
  animation: fadeOut 0.2s ease-out forwards;
}

/* Media queries for modal responsiveness */
@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    max-height: 90vh;
    border-radius: 12px 12px 0 0;
    align-self: flex-end;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 16px 20px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

@media (max-width: 768px) {

  .page-epilepsy_rotation,
  #epilepsy-rotation {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1;
    position: relative;
  }

  #epilepsy-rotation .tab-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.75em !important;
    margin-top: 0.5em !important;
    border-bottom: 0;
  }

  #epilepsy-rotation .tab-nav-item {
    padding: 6px 12px;
    font-size: 0.9rem !important;
    min-width: 0;
    flex: 1 0 calc(33.33% - 10px);
    margin-bottom: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }

  #epilepsy-rotation .tab-nav-item.active {
    border-color: var(--accent-color);
  }

  /* Mobile quick links dropdown */
  #epilepsy-rotation .quick-links-dropdown-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    top: 72px;
  }

  #epilepsy-rotation .dropdown-label {
    font-size: 14px;
    text-align: left;
  }

  #epilepsy-rotation .quick-links-dropdown {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    /* Prevents zoom on iOS */
    padding-right: 45px;
  }

  #epilepsy-rotation .milestone-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  #epilepsy-rotation .milestone-links .table-link {
    width: 100%;
    justify-content: center;
  }

  #epilepsy-rotation .info-box {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
    box-shadow: none;
  }

  #epilepsy-rotation h2.section-header {
    font-size: 1.3rem !important;
    margin: 1.25rem 0 0.5rem !important;
  }

  #epilepsy-rotation h2.section-header:first-of-type {
    margin-top: 0.5rem !important;
  }

  #epilepsy-rotation .info-box h3 {
    font-size: 1.2rem !important;
    margin: 0.75rem 0 0.5rem !important;
  }

  #epilepsy-rotation .info-box h4 {
    font-size: 1rem !important;
    margin: 0.75rem 0 0.4rem !important;
  }

  #epilepsy-rotation .section-header {
    font-size: 1.1rem;
    padding: 0.6rem 0;
  }

  #epilepsy-rotation .custom-table {
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    box-shadow: none;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #epilepsy-rotation .schedule-table,
  #epilepsy-rotation .phrase-table {
    white-space: nowrap;
  }

  #epilepsy-rotation .custom-table thead th,
  #epilepsy-rotation .custom-table tbody td {
    padding: 8px 10px;
    font-size: 0.9rem !important;
  }
}

/* Additional styles for extra small screens */
@media (max-width: 480px) {
  #epilepsy-rotation .page-subtitle {
    font-size: 0.85rem;
  }

  #epilepsy-rotation .tab-nav {
    gap: 6px;
    margin-bottom: 0.6em !important;
    margin-top: 0.4em !important;
  }

  #epilepsy-rotation .tab-nav-item {
    padding: 5px 8px;
    font-size: 0.8rem !important;
    flex: 1 0 calc(50% - 6px);
    border-radius: var(--radius-md);
  }

  /* Small mobile dropdown */
  #epilepsy-rotation .quick-links-dropdown-container {
    padding: 0.875rem;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
  }

  #epilepsy-rotation .dropdown-label {
    font-size: 13px;
  }

  #epilepsy-rotation .quick-links-dropdown {
    padding: 12px 14px;
    font-size: 15px;
    padding-right: 40px;
  }

  #epilepsy-rotation .info-box {
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    border-radius: var(--radius-sm);
    box-shadow: none;
  }

  #epilepsy-rotation .goals-grid {
    grid-template-columns: 1fr;
  }

  #epilepsy-rotation h2.section-header {
    font-size: 1.15rem !important;
    margin: 1rem 0 0.4rem !important;
  }

  #epilepsy-rotation h2.section-header:first-of-type {
    margin-top: 0.4rem !important;
  }

  #epilepsy-rotation .info-box h3 {
    font-size: 1.1rem !important;
    margin: 0.6rem 0 0.4rem !important;
  }

  #epilepsy-rotation .info-box h4 {
    font-size: 0.9rem !important;
    margin: 0.5rem 0 0.3rem !important;
  }

  #epilepsy-rotation .custom-table {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
  }

  #epilepsy-rotation .custom-table thead th,
  #epilepsy-rotation .custom-table tbody td {
    padding: 6px 8px;
    font-size: 0.8rem !important;
  }

  #epilepsy-rotation .table-link {
    font-size: 0.7rem;
  }

  .modal-content {
    width: 100%;
    border-radius: var(--radius-sm);
  }
}
