.flex-container
{
    display: flex;
    flex-direction: row;
}

/* ---------- Toggle positioning ---------- */

#filter-toggle-wrapper {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.filter-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
}

#all-classes textarea, #all-classes [type="text"] {
    background: white;
}

/* ---------- Collapsing behavior ---------- */

#all-classes-wrapper {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 2500px; /* must exceed full form height */
    opacity: 1;
}

/* Closed state */
#all-classes-wrapper.is-collapsed {
    max-height: 0 !important;
    opacity: 0;
}



/* ==========================
   Modals for Class List
   =========================*/

.session-summary {
  margin-top: 0.5rem;
  font-size: 0.9em;
  color: #444;
}

.session-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  margin: 5vh auto;
  border-radius: 8px;
  overflow-y: auto;
  padding: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
}

.class-cards {
  display: column;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.class-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.class-card {
  display: flex;
  flex-direction: column;

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

  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.class-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
  background-color: var(--very-light-color);
  padding: .5rem 1rem .5rem 1rem;
}

.class-card div.session-summary, .class-card p {
  padding: .5rem 1rem .5rem 1rem;
}

#advanced-search {
    display: block;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0 5px;
}

#simple-search {
    display: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0 5px;
}

@media (min-width: 1024px) {
    .only-small
    {
        display: none !important;
    }
}