:root {
  --line: #e9eef3;
  --azureish-white-soft: #f4fbfa;
}

/* ---------- Search bar ---------- */

.custom-search-bar {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
}

.smdm-syl-search .wp-block-search__inside-wrapper {
  max-width: unset !important;
}

.smdm-syl-search__input {
  flex: 1 1 320px;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-sizing: border-box;
}

/* ---------- Empty state ---------- */

.smdm-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* ---------- Grid ---------- */

.smdm-syllabi-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

@media (max-width: 1100px) {
  .smdm-syllabi-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}
@media (max-width: 720px) {
  .smdm-syllabi-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Cards ---------- */

.smdm-card {
  background-color: var(--azureish-white-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(10, 92, 131, .08);
  padding: 18px 20px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.smdm-card__event {
  margin: 10px 0;  
}
.smdm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(10, 92, 131, .12);
}

.smdm-card__links {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.smdm-btn-members-only {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
}

/* ---------- Pager ---------- */

.smdm-syl-pager {
  margin-top: 32px !important;
  justify-self: center;
}

/* ---------- Mobile tweaks ---------- */

@media (max-width: 600px) {
  /* Let items wrap (keeps desktop row behavior unchanged) */
  .custom-search-bar {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
  }

  /* Input row: full width */
  .smdm-syl-search .wp-block-search__inside-wrapper {
    flex: 0 0 100%;
    width: 100%;
  }

  /* As requested: kill any max-width limit on the input */
  .smdm-syl-search .wp-block-search__input {
    max-width: unset !important;
    width: 100%;
  }

  /* Second row: Search + Clear share the row */
  .custom-search-bar > .wp-block-button {
    flex: 1 1 0;
  }

  .custom-search-bar .wp-block-button__link {
    width: 100%;
    text-align: center;
  }
}
