/* ===== Internal reviews & rating form =====
 * Requires ld-primitives.css.
 * =========================================== */

/* ===== Section wrapper ===== */
.ld-reviews {
  margin: var(--ld-space-6) 0;
}

.ld-reviews__heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--ld-space-4);
  color: var(--ld-text);
}

/* ===== Stars display (read-only) ===== */
.ld-stars-display {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
  font-size: 16px;
}

.ld-star { color: var(--ld-star-empty, #d1d5db); }
.ld-star--full { color: var(--ld-star, #f59e0b); }
.ld-star--half { color: var(--ld-star, #f59e0b); opacity: .6; }

/* Larger stars in the summary */
.ld-reviews__stars--lg .ld-star { font-size: 22px; }

/* ===== Summary row ===== */
.ld-reviews__summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--ld-space-4);
}

.ld-reviews__avg {
  font-size: 22px;
  font-weight: 700;
  color: var(--ld-text);
}

.ld-reviews__count {
  font-size: 14px;
  color: var(--ld-muted);
}

.ld-reviews__empty {
  font-size: 15px;
  color: var(--ld-muted);
  font-style: italic;
  margin: 0 0 var(--ld-space-4);
}

/* ===== Review list ===== */
.ld-reviews__list {
  list-style: none;
  margin: 0 0 var(--ld-space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ld-space-3);
}

.ld-review-item {
  padding: var(--ld-space-3);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius-sm);
  background: var(--ld-surface);
}

.ld-review-item__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 6px;
}

.ld-review-item__author {
  font-weight: 600;
  font-size: 14px;
  color: var(--ld-text);
}

.ld-review-item__date {
  font-size: 12px;
  color: var(--ld-muted);
  margin-left: auto;
}

.ld-review-item__text {
  font-size: 14px;
  color: var(--ld-muted);
  line-height: 1.6;
  margin: 0;
}

/* ===== Star picker (input form) ===== */
/* Stars rendered 5→1 in DOM, reversed by flex so visually 1→5 */
.ld-star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
  margin-bottom: var(--ld-space-3);
}

.ld-star-picker__radio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.ld-star-picker__label {
  font-size: 32px;
  color: var(--ld-star-empty, #d1d5db);
  cursor: pointer;
  line-height: 1;
  transition: color .1s, transform .1s;
  user-select: none;
}

.ld-star-picker__label:hover {
  transform: scale(1.1);
}

/* Pure-CSS: checked radio → color it and all DOM-later labels (visually lower stars) */
.ld-star-picker__radio:checked ~ .ld-star-picker__label {
  color: var(--ld-star, #f59e0b);
}

/* JS-enhanced hover: is-hovered class added by ld-stars.js */
.ld-star-picker__label.is-hovered {
  color: var(--ld-star, #f59e0b);
}

/* ===== Review form ===== */
.ld-review-form-wrap {
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius-md);
  padding: var(--ld-space-4);
  margin-top: var(--ld-space-4);
  background: var(--ld-surface);
}

.ld-review-form__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 var(--ld-space-3);
  color: var(--ld-text);
}

.ld-review-form__fields {
  display: flex;
  flex-direction: column;
  gap: var(--ld-space-2);
  margin-bottom: var(--ld-space-3);
}

.ld-review-form__input,
.ld-review-form__textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ld-text);
  background: var(--ld-surface);
  box-sizing: border-box;
  transition: border-color .15s;
}

.ld-review-form__input:focus,
.ld-review-form__textarea:focus {
  outline: none;
  border-color: var(--ld-primary);
  box-shadow: 0 0 0 3px rgba(30, 100, 255, .08);
}

.ld-review-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.ld-review-form__submit {
  margin-top: var(--ld-space-2);
}

/* ===== Nearby bureaus ===== */
.ld-nearby {
  margin: var(--ld-space-6) 0;
}

.ld-nearby__heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--ld-space-4);
  color: var(--ld-text);
}

/* ===== Logo in bureau hero ===== */
.ld-bureau__logo-wrap {
  flex-shrink: 0;
  align-self: stretch;
  width: 90px;
  min-height: 80px;
  border-radius: var(--ld-radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-decoration: none;
}

@media (min-width: 640px) {
  .ld-bureau__logo-wrap {
    width: 120px;
    border-radius: var(--ld-radius-md);
    padding: 10px;
  }
}

.ld-bureau__logo {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.ld-bureau__logo-placeholder {
  font-size: 28px;
  color: rgba(255,255,255,.5);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}
