/* ==========================================================================
   Talarpartner Speaker Search v1.9
   Component styles only. Theme owns page shell, width and footer alignment.
   ========================================================================== */

.tm-speaker-search {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.tm-speaker-search-form {
  width: 100%;
  max-width: none;
  margin: 0;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 36px rgba(17,17,17,.08);
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(160px, .75fr) minmax(190px, .85fr) auto auto;
  gap: 12px;
  align-items: end;
}

.tm-speaker-search-form--compact {
  grid-template-columns: minmax(240px, 1fr) auto;
  width: min(760px, 100%);
}

.tm-speaker-search-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 800;
  font-size: .85rem;
}

.tm-speaker-search-form input,
.tm-speaker-search-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 14px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

.tm-speaker-search-form button,
.tm-speaker-search-reset {
  min-height: 46px;
  min-width: 150px;
  border-radius: 999px;
  border: 0;
  padding: 0 18px;
  background: #111;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.tm-speaker-search-reset {
  min-width: 130px;
  background: #f6f1ea;
  color: #111;
  border: 1px solid rgba(17,17,17,.12);
}

.tm-speaker-search-count {
  margin: 22px 0;
  font-weight: 800;
}

.tm-speaker-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.tm-speaker-search--cols-3 .tm-speaker-search-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tm-speaker-search-card {
  height: 100%;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(17,17,17,.08);
  display: flex;
  flex-direction: column;
}

.tm-speaker-search-image {
  display: grid;
  aspect-ratio: 4 / 5;
  background: #eee;
  place-items: center;
  color: #777;
  text-decoration: none;
  overflow: hidden;
}

.tm-speaker-search-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-speaker-search-body {
  padding: 20px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tm-speaker-search-role {
  color: #c49a5a;
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 8px;
}

.tm-speaker-search-body h2 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0 0 14px;
  min-height: 0;
}

.tm-speaker-search-body h2 a {
  color: inherit;
  text-decoration: none;
}

.tm-speaker-search-body p:not(.tm-speaker-search-role) {
  margin: 0 0 18px;
  line-height: 1.5;
  flex: 1 1 auto;
}

.tm-speaker-search-link {
  margin-top: auto;
  color: #111;
  font-weight: 800;
  text-decoration: none;
  align-self: flex-start;
}

.tm-speaker-search-pagination {
  margin-top: 34px;
}

.tm-speaker-search-pagination ul {
  display: flex;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tm-speaker-search-pagination a,
.tm-speaker-search-pagination span {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
  color: #111;
  box-shadow: 0 6px 18px rgba(17,17,17,.08);
}

.tm-speaker-search-pagination .current {
  background: #111;
  color: #fff;
}

@media (max-width: 1180px) {
  .tm-speaker-search-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tm-speaker-search-form button,
  .tm-speaker-search-reset {
    min-width: 0;
  }

  .tm-speaker-search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tm-speaker-search-form,
  .tm-speaker-search-form--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tm-speaker-search-grid,
  .tm-speaker-search--cols-3 .tm-speaker-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tm-speaker-search-form,
  .tm-speaker-search-form--compact,
  .tm-speaker-search-grid,
  .tm-speaker-search--cols-3 .tm-speaker-search-grid {
    grid-template-columns: 1fr;
  }

  .tm-speaker-search-form {
    padding: 14px;
    border-radius: 18px;
  }
}

/* v2.1.0: Mobile filter polish. Theme colors + compact labels. */
.tm-speaker-search-form button[type="submit"] {
  background: var(--tp-ref-gold, #c99243);
  border: 1px solid var(--tp-ref-gold, #c99243);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  line-height: 1;
  appearance: none;
}

.tm-speaker-search-form button[type="submit"]:hover,
.tm-speaker-search-form button[type="submit"]:focus-visible {
  background: var(--tp-ref-deep, #07313c);
  border-color: var(--tp-ref-deep, #07313c);
  color: #fff;
}

.tm-speaker-search-reset {
  font-size: .95rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .tm-speaker-search-form .tm-speaker-search-tax-label > span {
    display: none;
  }
}

/* v2.3.0: Load more replaces classic pagination on /sok-talare/. */
.tm-speaker-search-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.tm-speaker-search-load-more {
  min-height: 48px;
  min-width: 190px;
  border-radius: 999px;
  border: 1px solid var(--tp-ref-gold, #c99243);
  padding: 0 24px;
  background: var(--tp-ref-gold, #c99243);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

.tm-speaker-search-load-more:hover,
.tm-speaker-search-load-more:focus-visible {
  background: var(--tp-ref-deep, #07313c);
  border-color: var(--tp-ref-deep, #07313c);
  color: #fff;
}

.tm-speaker-search-load-more:disabled {
  cursor: wait;
  opacity: .7;
}
