body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #faecee7a;
  margin: 0;
  padding: 40px 20px;
}

/* PAGE ALIGNMENT */
#container,
h1,
.topbar,
input,
.filter-wrapper {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* TITLE */
h1 {
  color: #111;
  font-weight: 600;
  margin-bottom: 20px;
}

/* TOP BAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.status {
  font-size: 14px;
  color: #777;
}

/* RIGHT SIDE BUTTON GROUP */
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* SEARCH */
input {
  display: block;
  width: 100%;
  padding: 10px;

  border: 1px solid #ddd;
  border-radius: 8px;

  margin-bottom: 15px;
  box-sizing: border-box;
}


/* FILTER WRAPPER */
.filter-wrapper {
  position: relative;
}

/* FILTER BUTTON */
.filter-btn {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.filter-btn:active {
  transform: scale(0.97);
}


/* FILTER DROPDOWN */
.filter-menu {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;

  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;

  padding: 8px;

  width: 220px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 100;

  max-height: 280px;
  overflow-y: auto;

  text-align: left;

  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(-5px);
  opacity: 0;
  pointer-events: none;
}

.filter-menu.show {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* FILTER ITEMS */
.filter-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 6px;
  padding: 4px 6px;

  font-size: 13.5px;
  cursor: pointer;

  white-space: nowrap;
}

.filter-item input {
  width: 14px;
  height: 14px;
  margin: 0;

  accent-color: #f0dde8;
}

/* hover */
.filter-item:hover {
  background: #f5f5f5;
  border-radius: 6px;
}

/* CARD */
.card {
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 18px;
  margin: 15px 0;
  position: relative;
  background-color: #fff;
  display: flex;
  gap: 20px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
   position: relative;
   z-index: 1;
  box-shadow: 0 10px 25px rgba(214, 105, 172, 0.18);
}


/* LEFT */
.left {
  flex: 0 1 360px;
  max-width: 360px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.left h3 {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 15px;
  margin-top: 0px;
  color: #75084c;
}

/* RIGHT */
.right {
  flex: 1;
  min-width: 0;

  border-left: 1px solid #f0f0f0;
  padding-left: 25px;

  display: flex;
  flex-direction: column;

  font-size: 14.5px;
  line-height: 1.6;
  color: #444;

  overflow-wrap: break-word;

  position: relative;
  z-index: 0;
}

/* IMAGE */
.card-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

/* BOTTOM */
.bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* TAGS */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f1f1f1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
   user-select: none;
}

.tag:hover {
  background: #eee;
}

.tag:active {
  transform: scale(0.97);
}

/* MORE TAGS */
.hidden-tags {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hidden-tags.show {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag.more {
  background: #ddd;
}

/* DOWNLOAD */
.download {
  font-weight: bold;
  color: #af277b;
  text-decoration: none;
}

/* GLOBAL LINK */
.right a,
.assignment-card a,
.card a {
  color: #af277b;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.right a:hover,
.assignment-card a:hover,
.card a:hover {
  text-decoration: underline;
  color: #75084c;
}

.right a:visited,
.assignment-card a:visited,
.card a:visited {
  color: #75084c;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .card {
    flex-direction: column;
  }

  .right {
    border-left: none;
    padding-left: 0;
    margin-top: 10px;
  }
}

/* PAGE WRAPPER */
.page {
  max-width: 900px;
  margin: 0 auto;
}

/* ASSIGNMENT CARDS */
.assignment-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;

  padding: 18px;
  margin: 15px 0;

  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* HEADINGS */
.assignment-card h2 {
  margin-top: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

/* TEXT */
.assignment-card p,
.assignment-card li {
  color: #444;
  line-height: 1.6;
  font-size: 14.5px;
}

/* LISTS */
.assignment-card ul {
  padding-left: 18px;
}

/* CLICKABLE CARD */
.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(214, 105, 172, 0.15);
}

/* BACK LINK */
.back-link {
  display: inline-block;
  margin-top: 25px;
  margin-bottom: 10px;

  color: #ac618f;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

/* STEPS (assignment screenshots) */
.step {
  display: flex;
  gap: 15px;
  align-items: center;

  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.step:last-child {
  border-bottom: none;
}

.step img {
  width: 300px;
  height: auto;
  border-radius: 10px;

  border: 1px solid #eee;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);

  flex-shrink: 0;
}

.step-text h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #111;
}

.step-text p {
  margin: 0;
  color: #444;
  font-size: 14.5px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .step {
    flex-direction: column;
    align-items: flex-start;
  }

  .step img {
    width: 100%;
  }
}

.btn {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;

  font-size: 13px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #f5f5f5;
}

.btn:active {
  transform: scale(0.97);
}

.btn.secondary {
  background: #fff;
  color: #666;
}


#basicFiltersPanel {
  display: flex;
  flex-direction: column;

  height: 100%;
  min-height: 0;

  overflow: hidden;
}


#sideFilterMenu {
  flex: 1;
  min-height: 0;

  overflow-y: auto;
}

/* FOOTER */
#basicFiltersPanel .advanced-footer {
  flex-shrink: 0;

  position: sticky;
  bottom: 0;

  background: white;
  z-index: 10;
}

/*ADVANCED FILTERING*/
/*close button*/
.panel-close-btn {
  background: transparent;
  border: none;
  color: #666;
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  font-size: 14px;
  font-weight: 400;

  padding: 0;
  margin: 0;

  line-height: 1;
}

.panel-close-btn:active {
  transform: scale(0.97);
  transform: translateY(-4px); 
}

/* TITLE */
.advanced-title {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 15px;
  color: #111;
}

.advanced-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 20px;

  line-height: 1;
}

.advanced-body {
  padding: 10px 0 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.adv-values {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.advanced-add {
  background: #fff;
  border: 1px solid #e0e0e0;

  padding: 6px 12px;
  border-radius: 8px;

  cursor: pointer;
  font-size: 13px;

  transition: background 0.15s ease;
  margin-bottom: 10px;
  margin-top: 10px;
  align-self: flex-start;
}

.advanced-divider {
  border-top: 1px solid #b6b6b6;
}


.advanced-add:hover {
  background: #f5f5f5;
}

.advanced-add:active {
  transform: scale(0.97);
}


.advanced-row {
  display: grid;
  gap: 10px;

  align-items: start;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 10px;
  max-width: 100%;
  overflow: visible;
  z-index: 1;
  position: relative;
}

.advanced-row:last-child {
  border-bottom: none;
}

.advanced-row > div:nth-child(2) {
  min-width: 0;
}

#advancedRows {
  flex: 1;           
  overflow-y: auto;   
  min-height: 0;
  padding-right: 4px;  
}



/* footer inline */
.advanced-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #fff;

  display: flex;
  flex-direction: column;
  gap: 10px;
  
}

#advancedFiltersPanel {
  display: flex;
  flex-direction: column;

  height: 100%;
  min-height: 0;

  overflow: hidden;
}

/*TAG DROPDOWN*/

.tag-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  width: 260px;
  z-index: 9999999;

  max-height: 280px; 
  overflow-y: auto;   

}

.tag-dropdown.hidden {
  display: none;
}

.tag-search {
  width: 100%;
  padding: 6px;
  margin-bottom: 8px;
}

.adv-selected-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;

  align-items: center;
  min-width: 0;
}

.add-tag-btn {
  background: #fff;
  border: 1px dashed #bbb;

  padding: 4px 10px;
  border-radius: 999px; /* pill shape */

  font-size: 12px;
  color: #555;

  cursor: pointer;
  white-space: nowrap;

  display: inline-block;
  width: auto;

  transition: all 0.15s ease;
}

.add-tag-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}
.add-tag-btn:active {
  transform: scale(0.98);
}

.tag-option {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
}

.tag-option:hover {
  background: #f3f3f3;
}

.tag-x {
  font-size: 11px;
  color: #aaa;
  display: none;
}
 
.tag-option.selected .tag-x {
  display: inline;
}

.adv-chip {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f3f3;

  cursor: pointer;
  user-select: none;
  border: none;

  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;

  flex-wrap: wrap;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  width: auto;
  white-space: nowrap;

  flex: 0 0 auto;

  transition: background 0.15s ease;
}

.adv-chip:hover {
  background: #e7e7e7;
}

.adv-chip-x {
  font-size: 10px;
  opacity: 0.6;

  pointer-events: none;
}

.tag-category {
  margin-bottom: 10px;
}

.tag-category-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #999;
  margin: 6px 6px 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-group {
  margin-bottom: 8px;
}


#advancedEntryBtn {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 6px;
  padding: 4px 6px;

  font-size: 13.5px;
  cursor: pointer;

  white-space: nowrap;

  border-radius: 6px;
}

#advancedEntryBtn:hover {
  background: #f5f5f5;
}

#advancedEntryBtn {
  cursor: pointer;
  user-select: none;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;

  display: block; /* default = CLOSED state */
}

/* =========================
   OPEN STATE (ONLY WHEN PANEL OPEN)
========================= */

.layout.filters-open {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

/* PANEL hidden by default */
.advanced-panel {
  display: none;
  min-width: 0;
  position: sticky;
  position: sticky;
  flex-direction: column;
  z-index: 1000;
  overflow: visible;
}

/* PANEL visible only when open */
.layout.filters-open .advanced-panel {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;

  padding: 12px;

  position: sticky;
  z-index: 1000;
  top: 20px;

  margin-top: 15px;

  max-height: min(750px, 65vh);
  min-height: 230px;
  overflow: visible;
}

/* CARD AREA */
.main-content {
  min-width: 0;
}

/* =========================
   ONLY WHEN OPEN → TIGHTER UI
========================= */

.layout.filters-open .card {
  padding: 14px;
  gap: 15px;
}

.layout.filters-open .left h3 {
  font-size: 20px;
}

/*EXIT BUTTONS/DELETE BUTTONS*/
.icon-btn {
  background: #fff;
  border: 0px;

  width: 28px;
  height: 28px;

  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  font-size: 14px;
  color: #666;

  transition: background 0.15s ease, transform 0.1s ease;
}

.icon-btn:hover {
  background: #f5f5f5;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* SCROLL TO TOP BUTTON */
.scroll-top-btn {
  position: fixed;
  bottom: 50px;
  right: 100px;

  background: none;
  border: 1px solid #75084c;
  border-radius: 50%;

  color: #75084c;
  font-size: 25px;
  aspect-ratio: 1 / 1;
  font-weight: 600;
  line-height: 1;    

  cursor: pointer;

  padding: 5px 15px 10px;
  box-sizing: border-box;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease, color 0.2s ease;
  z-index: 9999;
}

.scroll-top-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  box-shadow: 0 0px 25px rgba(214, 105, 172, 0.5);
}
.scroll-top-btn:active {
  transform: scale(0.95);
}

/*DELETE ROW BUTTON*/
.delete-row-btn {
  background: rgba(158, 158, 158, 0.060);
  border: 1px solid #bbb;
  color: #555;


  padding: 4px 10px;
  border-radius: 999px;

  font-size: 12px;
  cursor: pointer;

  white-space: nowrap;

  transition: all 0.15s ease;
}

.row-actions {
  position: relative;
  z-index: 1;
}

.delete-row-btn:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
}

.delete-row-btn:active {
  transform: scale(0.98);
}

/*AND/NOT Dropdown*/
.adv-op-wrap {
  position: relative;
  display: inline-block;
  width: 80px; 
}

.adv-op-btn {
  width: 100%;            
  min-width: 80px;

  display: flex;
  justify-content: space-between; 

  align-items: center;

  background: #fff;
  border: 1px solid #ddd;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
}

.adv-op-btn:hover {
  background: #f5f5f5;
}

.adv-op-btn:active {
  transform: scale(0.97);
}

/* arrow */
.adv-op-arrow {
  font-size: 10px;
  transition: transform 0.15s ease;
}

/* rotated state */
.adv-op-wrap.open .adv-op-arrow {
  transform: rotate(180deg);
}

/* dropdown menu */
.adv-op-menu {
  display:none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;

  width: 100%; 

  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;

  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 999999;
  
}

.adv-op-wrap.open .adv-op-menu {
  display: block;
}

/* options */
.adv-op-option {

  padding: 6px 12px;  
  font-size: 14px; 
  cursor: pointer;

  display: flex;
  align-items: center;

  border-radius: 6px;
}

.adv-op-option:hover {
  background: #f5f5f5;
}

.adv-op-btn:focus {
  outline: none;
}

.adv-op-btn:focus-visible {
  outline: none;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: none;
}

.adv-op-wrap.disabled {
  pointer-events: none;
  opacity: 0.4;
}

/* =========================
   HEADER ACTIONS
========================= */

.advanced-header-actions {
  display: flex;
  align-items: center;
  transform: translateY(-5px); 
}

/* wrapper becomes positioning anchor */
.help-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 8px;
}

/* hover show */
.help-wrapper:hover .help-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* =========================
   ? BUTTON
========================= */

.help-btn {
  width: 26px;
  height: 26px;

  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;

  font-size: 14px;
  font-weight: 600;
  color: #666;


  display: flex;
  align-items: center;
  justify-content: center;


  cursor: pointer;

  transition: background 0.15s ease, transform 0.1s ease;

}

.help-btn:hover {
  background: #f5f5f5;
}

.help-btn:active {
  transform: scale(0.95);
}

/* =========================
   TOOLTIP 
========================= */

.help-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 20px);

  transform: translateX(-50%) translateY(6px);

  width: 200px;

  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;

  padding: 10px 12px;

  font-size: 12.5px;
  line-height: 1.4;
  color: #444;

  box-shadow: 0 5px 10px rgba(0,0,0,0.12);

  z-index: 9999999;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* SHOW STATE */
.help-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* bold styling */
.help-tooltip b {
  color: #111;
}

/*SIDE PANEL*/
.panel-mode.hidden {
  display: none;
}

#sideFilterMenu {
  overflow-y: auto;
  max-height: 100%;
}

.hidden {
  display: none !important;
}




.panel-mode {
  flex: 1;
  min-height: 0;  
  overflow-y: auto;  /* enables scroll */
  padding-right: 6px;
}

#sideFilterMenu {
  padding-right: 4px;
}


/*toggle button*/
.mode-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* hide checkbox */
.mode-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* track */
.slider {
  position: absolute;
  cursor: pointer;

  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background-color: #ddd;
  transition: 0.2s;

  border-radius: 999px;
}

/* knob */
.slider::before {
  position: absolute;
  content: "";

  height: 18px;
  width: 18px;

  left: 3px;
  bottom: 3px;

  background-color: white;
  transition: 0.2s;

  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* checked state */
.mode-toggle input:checked + .slider {
  background-color: #af277b;
}

.mode-toggle input:checked + .slider::before {
  transform: translateX(22px);
}

.slider::after {
  content: "Advanced Filtering:";
  position: absolute;

  right: 55px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 12px;
  color: #777;
}

/* when checked */
.mode-toggle input:checked + .slider::after {
  content: "";
}


/* =========================
   SCROLLBAR
========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.178) transparent;
}

/* Chrome / Edge / Safari */
*::-webkit-scrollbar {
  width: 5px;
  height: 6px;
}

/* track (background) */
*::-webkit-scrollbar-track {
  background: transparent;
}

/* thumb (the actual bar) */
*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  transition: background 0.2s ease;
}

/* hover = slightly darker */
*::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.13);
}

/* active drag */
*::-webkit-scrollbar-thumb:active {
  background: rgba(0, 0, 0, 0.13);
}

 .slide-section-title {
  margin-top: 35px;
  margin-bottom: 10px;
  padding-left: 5px;

  font-size: 20px;
  font-weight: 450;
  color: #75084c;
}

/*PDF VIEWER FOR SLIDES*/
.pdf-layout {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

/* LEFT = MAIN CONTENT */
.pdf-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: left;
  gap: 10px;
}

/* RIGHT = INFO PANEL */
.pdf-right {
  width: 500px;
  padding: 16px;
  border-left: 1px solid #ddd;

  overflow-wrap: break-word;
  word-break: break-word;
  overflow-y: auto;
}

/* TITLE spacing */
.subtitle {
  opacity: 0.7;
  margin-top: -8px;
}

/* PDF container */
.pdf-container {
  width: 250px;
  max-width: 100%;
}

/* canvas */
#pdfCanvas {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* controls */
.pdf-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.page-info {
  font-size: 14px;
  opacity: 0.7;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .pdf-layout {
    flex-direction: column;
  }

  .pdf-right {
    border-left: none;
    border-top: 1px solid #ddd;
    width: 100%;
  }
}

.banner {
  font-size: 16px;
  color: #444;
  transform: translateY(-15px);
  padding-left: 10px;
}

#assignmentsContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

.assignment-card {
  display: flex;
  flex-direction: column;
}

.assignment-card.pdf-layout {
  flex-direction: row;
}

.image-wrapper {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
}

.cheat-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#CheatSheetsContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

#ExamsQuizzesContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}


/* =========================
   SORT WRAPPER
   (matches your tag-dropdown system)
========================= */

.sort-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* MAIN SORT BUTTON */
.sort-btn {
  background: #fff;
  border: 1px solid #ddd;

  padding: 6px 12px;
  border-radius: 8px;

  font-size: 13px;
  color: #333;

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  white-space: nowrap;

  transition: background 0.15s ease, transform 0.1s ease;
}

/* hover like your buttons */
.sort-btn:hover {
  background: #f5f5f5;
}

/* click feel */
.sort-btn:active {
  transform: scale(0.97);
}

/* arrow */
.sort-arrow {
  font-size: 16px;
  color: #777;
  transition: transform 0.15s ease;
}

/* rotate arrow when open */
.sort-wrapper.open .sort-arrow {
  transform: rotate(180deg);
}

/* =========================
   SORT DROPDOWN MENU
========================= */

.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;

  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;

  padding: 6px;
  width: 220px;

  box-shadow: 0 6px 20px rgba(0,0,0,0.08);

  z-index: 9999;

  max-height: 260px;
  overflow-y: auto;

  display: none;
}

/* open state */
.sort-wrapper.open .sort-menu {
  display: block;
}

/* =========================
   SORT OPTIONS
========================= */

.sort-option {
  padding: 6px 8px;
  border-radius: 6px;

  font-size: 13px;
  color: #333;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* hover */
.sort-option:hover {
  background: #f5f5f5;
}

/* active state */
.sort-option.active {
  background: #f3f3f3;
  font-weight: 500;
}

.sort-check {
  font-size: 11px;
  color: #999;
}

.sort-option:active {
  transform: scale(0.98);
}