/*
 * FH Reviews — Frontend CSS v1.0.0
 * Scoped to .fhr-* | Montserrat | Brand: #f16a22
 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --fhr-primary:       #f16a22;
  --fhr-primary-light: #fef0e6;
  --fhr-font:          'Montserrat', sans-serif;
  --fhr-text:          #0f172a;
  --fhr-text-muted:    #64748b;
  --fhr-text-light:    #94a3b8;
  --fhr-bg:            #ffffff;
  --fhr-bg-subtle:     #f8fafc;
  --fhr-border:        #e2e8f0;
  --fhr-radius:        10px;
  --fhr-shadow:        0 1px 3px rgba(0,0,0,.06),0 4px 20px rgba(0,0,0,.07);
  --fhr-transition:    0.15s ease;
}
.fhr-hidden { display: none !important; }

/* ── Stars display ───────────────────────────────────────────────────────────── */
.fhr-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}
.fhr-star svg { display: block; }
.fhr-rating-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--fhr-text);
  margin-left: 4px;
  vertical-align: middle;
}
.fhr-rating-count {
  font-size: 12px;
  color: var(--fhr-text-muted);
  margin-left: 2px;
  vertical-align: middle;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.fhr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--fhr-radius);
  font-size: 13px; font-weight: 600; font-family: var(--fhr-font);
  cursor: pointer; border: 2px solid transparent; text-decoration: none;
  white-space: nowrap; line-height: 1;
  transition: background var(--fhr-transition), color var(--fhr-transition);
}
.fhr-btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.fhr-btn-primary  { background: #f16a22; color: #fff; border-color: #f16a22; }
.fhr-btn-primary:hover { background: #d4561a; border-color: #d4561a; }
.fhr-btn-outline  { background: transparent; color: #f16a22; border-color: #f16a22; }
.fhr-btn-outline:hover { background: var(--fhr-primary-light); }
.fhr-btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.fhr-btn-spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: fhr-spin .65s linear infinite;
}
@keyframes fhr-spin { to { transform: rotate(360deg); } }

/* ── Star picker (review form) ───────────────────────────────────────────────── */
.fhr-star-picker {
  display: flex;
  flex-direction: row-reverse; /* CSS-only hover trick */
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 4px;
}
.fhr-star-input { display: none; }
.fhr-star-label {
  cursor: pointer;
  color: #e2e8f0;
  transition: color var(--fhr-transition), transform var(--fhr-transition);
}
.fhr-star-label svg { fill: currentColor; stroke: currentColor; display: block; }

/* Hover: colour this star and all stars after it (which come before in DOM) */
.fhr-star-label:hover,
.fhr-star-label:hover ~ .fhr-star-label,
.fhr-star-input:checked ~ .fhr-star-label {
  color: #f16a22;
}
.fhr-star-label:hover { transform: scale(1.15); }

.fhr-star-hint {
  font-size: 12px;
  color: var(--fhr-text-muted);
  margin-bottom: 14px;
  min-height: 18px;
}

/* ── Review form ─────────────────────────────────────────────────────────────── */
.fhr-form-wrap {
  background: var(--fhr-bg);
  border: 1px solid var(--fhr-border);
  border-radius: var(--fhr-radius);
  padding: 18px 20px;
  box-shadow: var(--fhr-shadow);
}
.fhr-form-title {
  font-size: 14px; font-weight: 600; color: var(--fhr-text);
  margin: 0 0 4px; font-family: var(--fhr-font);
}
.fhr-form-job {
  font-size: 12px; color: var(--fhr-text-muted); margin: 0 0 14px;
}
.fhr-form-field { margin-bottom: 12px; }
.fhr-label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.fhr-optional { font-weight: 400; color: var(--fhr-text-light); }
.fhr-textarea {
  width: 100%; border: 1px solid var(--fhr-border); border-radius: 7px;
  padding: 8px 12px; font-size: 13px; font-family: var(--fhr-font);
  color: var(--fhr-text); resize: vertical; background: #fff;
  transition: border-color var(--fhr-transition);
}
.fhr-textarea:focus { border-color: #f16a22; outline: none; box-shadow: 0 0 0 3px rgba(241,106,34,.12); }
.fhr-form-messages {
  font-size: 12px; min-height: 18px; margin-bottom: 10px;
}
.fhr-form-messages.success { color: #16a34a; }
.fhr-form-messages.error   { color: #dc2626; }

/* ── Pending reviews widget ──────────────────────────────────────────────────── */
.fhr-pending-wrap {
  background: var(--fhr-bg);
  border: 1px solid var(--fhr-border);
  border-radius: var(--fhr-radius);
  overflow: hidden;
  margin-top: 20px;
  box-shadow: var(--fhr-shadow);
}
.fhr-pending-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--fhr-primary-light);
  border-bottom: 1px solid rgba(241,106,34,.15);
  font-size: 13px; font-weight: 700; font-family: var(--fhr-font); color: var(--fhr-text);
}
.fhr-pending-count {
  background: #f16a22; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; min-width: 18px; text-align: center;
  margin-left: auto;
}
.fhr-pending-list { padding: 8px 0; }
.fhr-pending-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--fhr-bg-subtle, #f8fafc);
}
.fhr-pending-item:last-of-type { border-bottom: none; }
.fhr-pending-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.fhr-pending-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fhr-pending-name { font-size: 13px; font-weight: 600; color: var(--fhr-text); }
.fhr-pending-job  { font-size: 11px; color: var(--fhr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.fhr-inline-form  { padding: 0 16px 14px; }

/* ── Profile reviews section ─────────────────────────────────────────────────── */
.fhr-profile-reviews {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--fhr-border);
}
.fhr-profile-reviews-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.fhr-profile-reviews-title {
  font-size: 16px; font-weight: 700; color: var(--fhr-text);
  margin: 0; font-family: var(--fhr-font);
}
.fhr-profile-summary { display: flex; align-items: center; gap: 6px; }

.fhr-review-list { display: flex; flex-direction: column; gap: 0; }
.fhr-review-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--fhr-bg-subtle, #f8fafc);
}
.fhr-review-item:last-child { border-bottom: none; }
.fhr-review-top {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px;
}
.fhr-review-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fhr-review-meta { flex: 1; min-width: 0; }
.fhr-review-author    { font-size: 13px; font-weight: 600; color: var(--fhr-text); }
.fhr-review-job-title { font-size: 11px; color: var(--fhr-text-muted); }
.fhr-review-stars-date {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0;
}
.fhr-review-date { font-size: 11px; color: var(--fhr-text-light); }
.fhr-review-comment {
  font-size: 13px; color: #475569; line-height: 1.65;
  margin: 0; padding-left: 52px;
}

/* ── Listing card stars ──────────────────────────────────────────────────────── */
.fhr-card-stars { margin-top: 4px; }

/* ── Nav badge ───────────────────────────────────────────────────────────────── */
.fhr-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #f16a22; color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 99px; min-width: 18px; line-height: 1.4;
}
