/* ===========================================================
   archive-space.css - Centered-avatar space archive
   File path: css/archive-space.css
   =========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* Use body class prefix to increase specificity and avoid theme overrides */
body.post-type-archive-space {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --bg-gradient: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 14px 30px rgba(99, 102, 241, 0.12);
  --border-radius: 14px;
  --text-main: #111827;
  --text-muted: #6b7280;
}

/* Container + header */
.space-archive-main {
  background: var(--bg-gradient);
  padding: 20px 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-main);
}

.space-archive-main .archive-container {
  max-width: 1000px; /* Reduced from 1200px */
  margin: 0 auto;
  padding: 0 20px;
}


.space-archive-main .archive-header {
  margin-bottom: 6px;
}

.space-archive-main .archive-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align to top */
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 !important; /* Override parent theme padding */
}

.space-archive-main .archive-header-content {
  flex: 1; /* Expand to fill available space like Profile */
  text-align: left;
}

.space-archive-main .archive-title {
  font-size: 2.6rem !important;
  font-weight: 700;
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-left: 12px; /* Increased left padding */
  letter-spacing: -0.5px;
}

.space-archive-main .archive-subtitle {
  font-size: 1.5rem; /* Matched Profile font size */
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-secondary);
  text-align: left;
  padding-left: 12px; /* Match title padding */
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Button */
.space-archive-main .btn-add-space {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px; /* Reduced padding for pill shape */
  border-radius: 25px;
  background: var(--primary-gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  margin-right: 5px; /* Small padding on right */
}

.space-archive-main .btn-add-space svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.space-archive-main .btn-add-space:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.2);
}

/* Grid */
body.post-type-archive-space .space-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

/* Card */
body.post-type-archive-space .space-card-item {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
  border: 1px solid #eef2ff;
  overflow: hidden;
  text-align: center; /* center content */
  padding-bottom: 12px;
}

body.post-type-archive-space .space-card-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
}

/* Avatar top (centered) */
body.post-type-archive-space .space-avatar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 18px;
  padding-bottom: 8px;
}

body.post-type-archive-space .space-avatar-img,
body.post-type-archive-space .space-avatar-placeholder {
  width: 88px; /* slightly larger circle to read well */
  height: 88px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  display: inline-block;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 88px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* Placeholder specifics */
body.post-type-archive-space .space-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card content (below avatar) */
body.post-type-archive-space .space-card-content {
  padding: 8px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

body.post-type-archive-space .space-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body.post-type-archive-space .space-type {
  font-size: 0.95rem;
  color: #475569;
  font-weight: 600;
  text-transform: capitalize;
}

body.post-type-archive-space .space-location {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

body.post-type-archive-space .space-location svg {
  width: 14px;
  height: 14px;
  stroke: #94a3b8;
}

/* Pagination */
body.post-type-archive-space .archive-pagination {
  margin-top: 28px;
  text-align: center;
}

body.post-type-archive-space .archive-pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 6px;
  background: white;
  border: 1px solid #e6eef8;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

body.post-type-archive-space .archive-pagination .page-numbers.current {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
}

/* No results */
body.post-type-archive-space .no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

body.post-type-archive-space .no-results h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 1023px) {
  /* Reset container padding on mobile for edge-to-edge filter */
  body.post-type-archive-space .archive-container {
      padding: 0 !important;
      margin: 0 !important;
  }

  /* Add padding back to content elements (not the filter) */
  body.post-type-archive-space .archive-header-top,
  body.post-type-archive-space .space-grid,
  body.post-type-archive-space .archive-pagination,
  body.post-type-archive-space .no-results {
      padding-left: 15px;
      padding-right: 15px;
  }

  /* Edge-to-edge sticky filter */
  .filter-space-wrapper {
    position: sticky;
    top: 75px; 
    z-index: 99;
    background: white;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 8px 10px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Zero out ALL vertical spacing in filter area (profile archive pattern) */
  .filter-space-wrapper .filter-panel,
  .filter-space-wrapper .filter-scroll-row,
  .filter-space-wrapper .filter-col,
  .filter-space-wrapper .filter-group,
  .filter-space-wrapper .filter-group *,
  .filter-space-wrapper .multiselect-dropdown,
  .filter-space-wrapper .dropdown-header {
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
  }

  /* Restore necessary internal padding for inputs */
  .filter-space-wrapper .dropdown-header {
      padding: 8px 12px !important;
  }

  /* Webkit Scrollbar Minimal Styling (2px height, primary color) */
  .filter-space-wrapper .filter-scroll-row::-webkit-scrollbar {
      height: 2px; /* Very thin */
  }
  .filter-space-wrapper .filter-scroll-row::-webkit-scrollbar-thumb {
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
      border-radius: 2px;
  }
  .filter-space-wrapper .filter-scroll-row::-webkit-scrollbar-track {
      background: transparent;
  }
}

/* Responsive */
@media (max-width: 768px) {
  body.post-type-archive-space .archive-header-top {
    flex-wrap: nowrap; /* Keep button on the right */
  }
  body.post-type-archive-space .btn-add-space {
    flex-shrink: 0; /* Prevent button from shrinking */
    padding: 8px 14px; /* Slightly smaller padding on mobile */
    font-size: 0.9rem;
  }
  body.post-type-archive-space .space-grid {
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  body.post-type-archive-space .archive-title {
    font-size: 1.5rem; /* Slightly smaller title */
  }
  body.post-type-archive-space .space-avatar-img,
  body.post-type-archive-space .space-avatar-placeholder {
    width: 64px;
    height: 64px;
    line-height: 64px;
    font-size: 1rem;
    border-width: 3px;
  }
}

/* ============================================================================
   FILTER UI FOR SINGLE-SPACE (Material + Horizontal Scroll)
   ============================================================================ */

/* ============================================================================
   FILTER UI FOR SINGLE-SPACE (Material + Horizontal Scroll)
   ============================================================================ */

.filter-space-wrapper {
  margin: 20px 0;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e6e8ec;
  border-left: none;
  border-right: none;
  font-family: "Inter", sans-serif;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Top Bar */
.filter-space-wrapper .filter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Filter Button */
.filter-space-wrapper .filter-toggle-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.filter-space-wrapper .filter-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

/* Result Count */
.filter-space-wrapper .result-count {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: opacity 0.2s;
  margin-left: 12px;
  flex-grow: 1;
}

/* Scroll row */
.filter-space-wrapper .filter-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #6366f1 transparent;
}

.filter-space-wrapper .filter-scroll-row::-webkit-scrollbar {
  height: 4px; /* Horizontal scrollbar height */
  width: 4px;  /* Vertical scrollbar width */
}

.filter-space-wrapper .filter-scroll-row::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 4px;
}

.filter-space-wrapper .filter-scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.filter-col {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Labels */
.filter-space-wrapper label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 4px;
}

/* Inputs (Material style) */
.filter-space-wrapper input[type="number"],
.filter-space-wrapper input[type="date"],
.filter-space-wrapper select,
.filter-space-wrapper .filter-input-full {
  width: 100% !important;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  font-size: 0.95rem;
  background: #fff;
  transition: 0.25s ease;
  box-sizing: border-box; /* Ensure padding doesn't affect width */
  display: block;
}

.filter-space-wrapper input:focus,
.filter-space-wrapper select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

/* Hidden state wrapper */
.hidden-filter {
  display: none !important;
}

/* --- TOGGLE SWITCHES (New Style) --- */
.toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  color: #374151; /* text-secondary */
  padding: 8px 10px;
  border-radius: 7px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
  background: #f9fafb; /* Slight bg to make it look like a row */
  border: 1px solid #e5e7eb;
}

.toggle-switch:hover {
  background: #f3f4f6;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background-color: #d1d5db;
  border-radius: 24px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 10px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
  background: linear-gradient(
    135deg,
    #6366f1 0%,
    #8b5cf6 100%
  ); /* primary-gradient */
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.toggle-switch.active .toggle-slider::after {
  transform: translateX(20px);
}

/* --- CHECKBOX SCROLL BOX (For Certification) --- */
.checkbox-scroll-box {
  height: 140px;
  overflow-y: auto;
  border: 2px solid #e5e7eb;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
  scrollbar-width: thin;
  width: 100%;
  box-sizing: border-box;
}

.checkbox-scroll-box::-webkit-scrollbar {
  width: 4px;
}

.checkbox-scroll-box::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 3px;
}

.checkbox-item {
  font-size: 0.95rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 6px 6px;
  border-radius: 5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-item:hover {
  background: #f9fafb;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  cursor: pointer;
  flex-shrink: 0;
}

/* Buttons (Updated to match Profile Archive) */
.filter-space-wrapper .filter-actions {
  display: flex;
  gap: 10px;
}

.filter-space-wrapper .btn-apply {
  background: linear-gradient(
    135deg,
    #6366f1 0%,
    #8b5cf6 100%
  ); /* Primary gradient */
  padding: 8px 20px;
  border-radius: 25px;
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-space-wrapper .btn-apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.filter-space-wrapper .btn-reset {
  border: 2px solid #e5e7eb;
  padding: 8px 20px;
  border-radius: 25px;
  background: #fff;
  font-weight: 600;
  color: #6b7280; /* text-muted */
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-space-wrapper .btn-reset:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

/* ============================================================================
   DESKTOP SIDEBAR LAYOUT (Profile/Event Archive Style)
   ============================================================================ */
@media (min-width: 1024px) {
  /* 1. Main Grid Container */
  .space-archive-main {
    display: grid !important;
    grid-template-columns: minmax(0, 800px) 260px !important; /* Content | Sidebar */
    gap: 40px;
    justify-content: center;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 40px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
  }

  /* Flatten structure for grid */
  .space-archive-main .archive-container {
      display: contents;
  }

  .space-archive-main .archive-header {
      display: contents;
  }

  /* 2. Grid Item Placement */

  /* Header Row: Spans full width effectively via column 1 (or we can make it span 2 if we want it top-full)
     Matches Event Archive: "grid-column: 1" means it sits above content.
     If we want full width title, we'd use span 2.
     Event archive uses grid-column: 1. Let's stick to that.
  */
  .archive-header-top {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
    width: 100%;
  }

  /* Main Content (Space Grid) */
  .space-grid {
    grid-column: 1;
    grid-row: 2;
    margin-top: 10px;
    max-width: 100%;
  }

  .archive-pagination,
  .no-results {
    grid-column: 1;
    grid-row: 3;
  }

  /* 3. Filter Sidebar */
  .filter-space-wrapper {
    grid-column: 2;
    grid-row: 1 / span 10; /* Span multiple rows to stay alongside content */
    position: sticky;
    top: 80px; /* Increased to account for sticky menu */
    margin: 0;
    
    /* Layout for vertical stack */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px); /* Adjusted for new top position */
    overflow: hidden;
    padding: 10px 4px 10px 10px; /* Minimal padding: Top, Right(narrow for scrollbar), Bottom, Left */
    transition: none; /* remove transition to prevent jitter */
  }

  /* Hide Mobile Toggle */
  .filter-space-wrapper .filter-toggle-btn {
    display: none !important;
  }

  /* Ensure form takes available space */
  #space-filter-form {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
      min-height: 0; /* Important for firefox flex nesting */
      width: 100%; /* Ensure full width */
  }

  /* Always Show Panel */
  #space-filter-panel, 
  .filter-space-wrapper .filter-panel {
    display: flex !important; /* Change to flex to support child flexibility */
    flex-direction: column;
    animation: none;
    flex: 1;
    overflow: hidden;
    margin-top: 10px; /* Reduced margin */
    min-height: 0; /* Important for firefox flex nesting */
    padding: 0; /* Remove internal padding */
    width: 100%;
  }

  /* Vertical Scroll Area */
  .filter-space-wrapper .filter-scroll-row {
    flex-direction: column; /* Stack items vertically */
    overflow-x: hidden;
    overflow-y: auto;
    gap: 16px; /* Slightly reduced gap */
    padding-bottom: 10px;
    padding-right: 6px; /* Space for scrollbar */
    height: 100%;
    width: 100%;
    /* max-height: 100%; Removed - height 100% handles it if parent is flex */
  }

  /* Columns fill width */
  .filter-col {
    width: 100%;
    min-width: 0;
  }

  /* Filter Top Actions (Reset/Apply) - kept at top or moved? 
     In Event Archive they stay in .filter-top.
  */
  .filter-space-wrapper .filter-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
  }

  .filter-space-wrapper .filter-actions {
    width: 100%;
    justify-content: space-between;
  }

  .filter-space-wrapper .btn-apply,
  .filter-space-wrapper .btn-reset {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* --- CUSTOM MULTI-SELECT DROPDOWN (Ported from Profile Archive) --- */

.multiselect-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 24px; /* Increased separation */
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px; /* Larger touch area */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white; /* Changed from #f9fafb to match other inputs */
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    min-height: 48px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.dropdown-header:hover {
    border-color: #d1d5db;
    background: #fff;
}

/* Highlight header when active or has selection */
.multiselect-dropdown.active .dropdown-header {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.dropdown-header.has-selection {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05); /* Tinted bg for active filters */
    color: #4f46e5;
}

.dropdown-header .selected-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    /* match parent color */
}

.dropdown-header .arrow {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.multiselect-dropdown.active .dropdown-header .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    background: white;
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    z-index: 20; 
}

.multiselect-dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content::-webkit-scrollbar {
    width: 4px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
}
.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* --- MODERN ITEM STYLING (Hidden Checkbox) --- */

.dropdown-content .checkbox-item {
    position: relative;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent; 
}

.dropdown-content .checkbox-item:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

/* Hide native checkbox visually but keep it functional */
.dropdown-content .checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected State */
.dropdown-content .checkbox-item:has(input:checked) {
    background: rgba(99, 102, 241, 0.08); 
    color: #4f46e5; 
    font-weight: 600;
}

/* Custom Checkmark Indicator on the right using pseudo-element */
.dropdown-content .checkbox-item::after {
    content: '✓';
    font-weight: 900;
    font-size: 0.9rem;
    color: #6366f1;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.dropdown-content .checkbox-item:has(input:checked)::after {
    opacity: 1;
    transform: translateX(0);
}


/* ============================================================
   DESKTOP IMPROVEMENTS (Min Width 1025px)
   ============================================================ */

@media (min-width: 1025px) {
    /* Add spacing from top navigation */
    .space-archive-main .archive-header-top {
        margin-top: 20px;
        align-items: center; /* Center align title and button */
    }

    /* Increase Header Font Sizes for Large Screens */
    .space-archive-main .archive-title {
        font-size: 3rem; /* Significantly larger */
        padding-left: 10px; /* Desktop padding */
    }

    .space-archive-main .archive-subtitle {
        font-size: 1.8rem; /* Matched Profile font size */
        padding-left: 10px; /* Match title padding */
        margin-top: 0; /* Reduced gap */
    }

    .space-archive-main .btn-add-space {
        font-size: 1rem;
        padding: 10px 24px; /* Larger button for desktop */
        margin-top: -20px; /* Move button up */
    }
    
    /* Ensure Header Content Aligns */
    .space-archive-main .archive-header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

