/* Prevent page CSS from overriding the HTML hidden attribute */
[hidden] { display: none !important; }

/* ═══════════════════════════════════════
   FINDER HERO
════════════════════════════════════════ */
.finder-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding-block: 3.5rem 2.5rem;
}

.finder-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.finder-hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-bottom: 2rem;
}

/* ── Search bar ─────────────────────── */
.finder-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  max-width: 780px;
}

.finder-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 160px;
}

.finder-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.finder-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.finder-icon {
  position: absolute;
  left: 0.7rem;
  color: var(--muted-light);
  pointer-events: none;
  flex-shrink: 0;
}

.finder-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem 0.55rem 2.2rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  min-height: 44px;
}

.finder-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 122, 60, 0.12);
}

.finder-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237a9888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
}

.finder-search-btn {
  align-self: flex-end;
  min-height: 44px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   RESULTS SECTION
════════════════════════════════════════ */
.finder-results-section {
  padding-block: 2.5rem 4rem;
}

.finder-results-header {
  margin-bottom: 1.5rem;
}

.finder-results-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

/* ── Coach grid ─────────────────────── */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* ── Coach card ─────────────────────── */
.coach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.1s;
}

.coach-card:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}

.coach-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.25rem;
  cursor: default;
}

.coach-card-top {
  position: relative;
  margin-bottom: 0.85rem;
}

.coach-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: var(--green-light);
}

.coach-avatar--initials {
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--green-dark);
  background: var(--green-light);
}

.dbs-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  border: 1px solid rgba(26, 122, 60, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.coach-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.coach-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.coach-sports {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0;
}

.coach-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.coach-fee {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-mid);
  background: var(--green-xlight);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* ── Stars ──────────────────────────── */
.coach-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.82rem;
}

.star { color: #d4d4d4; }
.star--on { color: #f59e0b; }

.rating-count {
  color: var(--muted);
  font-weight: 600;
  margin-left: 0.3rem;
}

/* ── Skeletons ──────────────────────── */
.coach-card--skeleton {
  padding: 1.25rem;
  pointer-events: none;
}

.skel {
  background: linear-gradient(90deg, #e8f0ec 25%, #f2faf5 50%, #e8f0ec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-avatar  { width: 64px; height: 64px; border-radius: 999px; margin-bottom: 0.85rem; }
.skel-line    { height: 14px; margin-bottom: 0.5rem; }
.skel-name    { width: 70%; }
.skel-short   { width: 40%; }
.skel-med     { width: 55%; }

/* ── Input error state ──────────────── */
.finder-input--error {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.finder-input--shake {
  animation: shake 0.35s ease;
}

/* ── Idle state ─────────────────────── */
.finder-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding-block: 3rem;
  text-align: center;
}

.finder-idle-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-mid);
  margin: 0;
}

.finder-idle-sub {
  font-size: 0.9rem;
  color: var(--muted-light);
  margin: 0;
}

/* ── See more nudge ─────────────────── */
.coaches-more-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--green-xlight);
  border: 1px solid rgba(26, 122, 60, 0.18);
  border-radius: var(--radius);
}

.coaches-more-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mid);
  margin: 0;
}

/* ── Empty / error states ───────────── */
.finder-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-block: 3rem;
  text-align: center;
}

.finder-empty-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

.finder-empty-sub {
  color: var(--muted);
  margin: 0;
}
.finder-empty-sub a { color: var(--green); font-weight: 600; }

.finder-error {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   PROFILE PAGE — HERO
════════════════════════════════════════ */
.profile-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding-block: 2.5rem 2rem;
}

.profile-hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: flex-start;
}

.profile-avatar-wrap { flex-shrink: 0; }

.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: var(--green-light);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-avatar--initials {
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--green-dark);
  background: var(--green-light);
}

.profile-back-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  margin-bottom: 0.6rem;
}
.profile-back-link:hover { text-decoration: underline; }

.profile-name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.profile-meta-sep { color: var(--muted-light); }
.profile-meta-item { display: flex; align-items: center; gap: 0.3rem; }

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
}

.trust-chip--dbs   { background: var(--green-light); color: var(--green-dark); border-color: rgba(26,122,60,0.22); }
.trust-chip--top   { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ── Profile details grid ───────────── */
.profile-details-section {
  padding-block: 2.5rem 4rem;
}

.profile-details-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.profile-block {
  margin-bottom: 2rem;
}

.profile-block-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.5rem;
}

.profile-bio-text {
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-wrap;
  margin: 0;
}

/* ── Badge list ─────────────────────── */
.badge-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-mid);
}

.badge-icon { font-size: 1rem; }

/* ── Reviews ────────────────────────── */
.reviews-summary { margin-bottom: 1.25rem; }

.star-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
}

.rating-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.4rem;
}

.reviews-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-item {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.review-stars { color: #f59e0b; letter-spacing: 0.05em; font-size: 0.9rem; }
.review-date  { font-size: 0.8rem; color: var(--muted-light); margin-left: auto; }

.review-comment {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 0 0 0.35rem;
}

.review-author {
  font-size: 0.82rem;
  color: var(--muted-light);
  font-style: italic;
  margin: 0;
}

/* ── Sidebar ────────────────────────── */
.profile-sidebar-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
}

.profile-sidebar-sub {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 1.1rem;
  line-height: 1.6;
}

.profile-sidebar-free {
  font-size: 0.78rem;
  color: var(--muted-light);
  text-align: center;
  margin: 0.6rem 0 0;
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 1rem 0;
}

.profile-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-fee-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.profile-fee-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Profile loading skeleton ───────── */
.profile-loading-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

.skel-profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── Sticky bottom CTA (mobile) ─────── */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(12, 26, 16, 0.1);
  padding-block: 0.75rem;
}

.sticky-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-cta-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-mid);
  margin: 0;
}

/* ═══════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (min-width: 680px) {
  .profile-hero-grid {
    grid-template-columns: auto 1fr;
    gap: 2rem;
  }
}

@media (min-width: 960px) {
  .profile-details-grid {
    grid-template-columns: 1fr 340px;
  }

  .sticky-cta { display: none; }

  .finder-bar {
    flex-wrap: nowrap;
  }
}

@media (max-width: 959px) {
  .profile-sidebar { order: -1; }

  .profile-sidebar-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .finder-bar { flex-direction: column; }
  .finder-field { min-width: 0; width: 100%; }
  .finder-search-btn { width: 100%; }
}
