/* trainer-search.css — matches Academy site style */

#trs-app {
  font-family: inherit;
  width: 100%;
}

/* ── Search Panel ── */
.trs-search-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 28px;
}

/* Toggle */
.trs-toggle {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 18px;
}

.trs-toggle-btn {
  padding: 8px 24px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #e8f4f4;
  color: #6dbcbc;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.trs-toggle-btn.active {
  background: #1a3a5c;
  color: #fff;
}

/* Fields row */
.trs-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.trs-mode-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 200px;
}

.trs-hidden { display: none !important; }

/* Inputs */
#trs-city-input,
#trs-zip-input,
#trs-service-select {
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid #dde3e8;
  border-radius: 6px;
  outline: none;
  color: #333;
  background: #fff;
  box-sizing: border-box;
}

#trs-city-input:focus,
#trs-zip-input:focus { border-color: #6dbcbc; }

#trs-city-input  { flex: 1 1 200px; }
#trs-zip-input   { width: 130px; flex: none; }
#trs-service-select { flex: 1 1 160px; }

/* Radius */
.trs-radius-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trs-radius-group span {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}

.trs-radius-btns { display: flex; gap: 4px; }

.trs-radius-btn {
  padding: 7px 11px;
  font-size: 12px;
  font-family: inherit;
  background: #f0f3f7;
  color: #444;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.trs-radius-btn.active {
  background: #1a3a5c;
  color: #fff;
  font-weight: 700;
}

/* Search button — matches site's red button */
#trs-search-btn {
  padding: 10px 28px;
  background: #c0392b;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

#trs-search-btn:hover { background: #a93226; }

.trs-hint {
  font-size: 12px;
  color: #888;
  margin: 10px 0 0;
}

/* ── Status messages ── */
.trs-placeholder,
.trs-no-results {
  font-size: 15px;
  color: #888;
  padding: 30px 0;
  text-align: center;
}

.trs-error { color: #c0392b; font-size: 14px; padding: 20px 0; text-align: center; }

/* Loading dots */
.trs-loading {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.trs-loading span {
  width: 10px; height: 10px;
  background: #6dbcbc;
  border-radius: 50%;
  animation: trs-bounce 0.9s infinite alternate;
}

.trs-loading span:nth-child(2) { animation-delay: 0.2s; }
.trs-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes trs-bounce {
  from { opacity: 0.3; transform: translateY(0); }
  to   { opacity: 1;   transform: translateY(-8px); }
}

/* ── Trainer Card — matches existing site card style ── */
.trs-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.trs-card-media {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.trs-card-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.trs-card-initials {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #1a3a5c;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trs-card-body { flex: 1; min-width: 0; }

/* Name matches existing site — teal/blue uppercase */
.trs-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #4a9fa5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.trs-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* Distance badge */
.trs-distance {
  font-size: 12px;
  color: #fff;
  background: #6dbcbc;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
}

.trs-card-bio {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 10px;
}

.trs-card-services {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin: 0 0 14px;
  line-height: 1.5;
}

.trs-card-services span { font-weight: 400; color: #555; }

.trs-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.trs-card-location {
  font-size: 13px;
  color: #777;
}

/* Visit Website button — matches site's teal pill button */
.trs-card-btn {
  display: inline-block;
  background: #6dbcbc;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  padding: 8px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s;
  white-space: nowrap;
}

.trs-card-btn:hover { background: #5aabab; color: #fff; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .trs-card { flex-direction: column; }
  .trs-card-media { width: 60px; height: 60px; }
  .trs-card-thumb,
  .trs-card-initials { width: 60px; height: 60px; font-size: 18px; }
  #trs-search-btn { width: 100%; }
}

/* ── Force search, count and results into a reliable vertical order ── */
#trs-app {
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
}

.trainer-search-form-container {
  float: none !important;
}

#trs-app .trs-search-panel {
  order: 1;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

#trs-count-container {
  order: 2;
  width: 100%;
  margin: 25px 0 18px;
  padding: 0;
  font-size: 18px;
}

#trs-results {
  order: 3;
  clear: both;
  width: 100%;
  margin-top: 0;
}
