/* Lighthouse App Reviews
   Styling follows the supplied Elementor review section: rounded outer panel,
   three rounded summary cards, purple rating bars and gold stars. */

.lhar-reviews,
.lhar-card-rating {
  --lhar-accent: #905BFA;
  --lhar-accent-soft: rgba(144, 91, 250, 0.12);
  --lhar-star: #EFB543;
  --lhar-text: #404347;
  --lhar-muted: #7A7A7A;
  --lhar-border: rgba(64, 67, 71, 0.14);
  --lhar-panel: #F2EEFB;
  --lhar-card: #FFFFFF;
  --lhar-success: #287A3D;
  --lhar-success-bg: #EEF8F0;
  --lhar-error: #9B2C2C;
  --lhar-error-bg: #FFF1F1;
  color: var(--lhar-text);
  font-family: inherit;
  box-sizing: border-box;
}

.lhar-reviews *,
.lhar-reviews *::before,
.lhar-reviews *::after,
.lhar-card-rating *,
.lhar-card-rating *::before,
.lhar-card-rating *::after {
  box-sizing: border-box;
}

.lhar-reviews {
  background: var(--lhar-panel);
  border-radius: 32px;
  padding: 40px;
  width: 100%;
}

.lhar-reviews h2,
.lhar-reviews h3,
.lhar-reviews p {
  margin-top: 0;
}

.lhar-reviews h2 {
  margin-bottom: 0;
}

.lhar-reviews h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.lhar-eyebrow {
  display: block;
  color: var(--lhar-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.lhar-reviews__topbar,
.lhar-review-form__heading,
.lhar-member-review__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lhar-reviews__topbar {
  margin-bottom: 20px;
}

.lhar-summary-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr) minmax(320px, 1.35fr);
  gap: 10px;
}

.lhar-summary-card,
.lhar-review-form,
.lhar-member-review {
  background: var(--lhar-card);
  border-radius: 18px;
}

.lhar-summary-card {
  padding: 24px;
  min-width: 0;
}

.lhar-summary-card--score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.lhar-big-score {
  font-size: clamp(42px, 5vw, 60px);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
}

.lhar-summary-card--score p {
  color: var(--lhar-muted);
  font-size: 14px;
  margin: 10px 0 0;
}

.lhar-stars {
  display: inline-block;
  position: relative;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}

.lhar-stars__base {
  color: rgba(64, 67, 71, 0.18);
}

.lhar-stars__fill {
  color: var(--lhar-star);
  left: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.lhar-stars--small {
  font-size: 16px;
}

.lhar-stars--compact {
  font-size: 15px;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.lhar-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.lhar-card-rating__score {
  font-weight: 600;
}

.lhar-card-rating__count,
.lhar-card-rating__empty {
  color: var(--lhar-muted);
  font-size: 0.9em;
}

.lhar-distribution,
.lhar-quality {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lhar-distribution__row,
.lhar-quality__row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.lhar-distribution__row {
  grid-template-columns: 32px minmax(90px, 1fr) 36px;
}

.lhar-quality__row {
  grid-template-columns: minmax(90px, 0.8fr) minmax(130px, 1fr) 32px;
}

.lhar-distribution__label {
  font-size: 13px;
  text-align: right;
}

.lhar-distribution__label span {
  color: var(--lhar-star);
}

.lhar-distribution__count,
.lhar-quality__score {
  color: var(--lhar-muted);
  font-size: 12px;
  text-align: right;
}

.lhar-quality__label {
  font-size: 13px;
}

.lhar-progress {
  background: rgba(64, 67, 71, 0.08);
  border: 2px solid var(--lhar-card);
  border-radius: 100px;
  display: block;
  height: 13px;
  overflow: hidden;
  width: 100%;
}

.lhar-progress__fill {
  background: var(--lhar-accent);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 0;
}

.lhar-review-form-anchor {
  scroll-margin-top: 110px;
}

.lhar-review-form {
  margin-top: 10px;
  padding: 30px;
}

.lhar-review-form__status {
  background: var(--lhar-accent-soft);
  border-radius: 50px;
  color: var(--lhar-accent);
  font-size: 12px;
  padding: 7px 11px;
}

.lhar-review-form__intro {
  color: var(--lhar-muted);
  margin-bottom: 22px;
}

.lhar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lhar-form-rating {
  border: 1px solid var(--lhar-border);
  border-radius: 12px;
  margin: 0;
  min-width: 0;
  padding: 16px;
}

.lhar-form-rating legend {
  font-weight: 600;
  padding: 0 5px;
}

.lhar-form-rating__help {
  color: var(--lhar-muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.lhar-star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.lhar-star-input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lhar-star-input label {
  color: rgba(64, 67, 71, 0.18);
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
  transition: color 0.12s ease;
}

.lhar-star-input label:hover,
.lhar-star-input label:hover ~ label,
.lhar-star-input input:checked ~ label {
  color: var(--lhar-star);
}

.lhar-star-input input:focus-visible + label {
  outline: 2px solid var(--lhar-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.lhar-comment-field {
  margin-top: 18px;
}

.lhar-comment-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.lhar-comment-field textarea {
  background: #fff;
  border: 1px solid var(--lhar-border);
  border-radius: 12px;
  color: var(--lhar-text);
  display: block;
  font: inherit;
  line-height: 1.5;
  min-height: 120px;
  padding: 14px;
  resize: vertical;
  width: 100%;
}

.lhar-comment-field textarea:focus {
  border-color: var(--lhar-accent);
  box-shadow: 0 0 0 3px var(--lhar-accent-soft);
  outline: none;
}

.lhar-button {
  background: var(--lhar-accent);
  border: 1px solid var(--lhar-accent);
  border-radius: 50px;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  margin-top: 18px;
  padding: 10px 18px;
  text-decoration: none !important;
}

.lhar-button:hover,
.lhar-button:focus {
  filter: brightness(0.96);
}

.lhar-button--outline {
  background: #fff;
  color: var(--lhar-accent) !important;
  margin-top: 0;
}

.lhar-member-reviews {
  margin-top: 28px;
}

.lhar-member-reviews > h3 {
  margin-bottom: 14px;
}

.lhar-member-reviews__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lhar-member-review {
  padding: 22px;
}

.lhar-member-review__header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.lhar-member-review__date {
  color: var(--lhar-muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.lhar-member-review__content p:last-child {
  margin-bottom: 0;
}

.lhar-notice {
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 12px 15px;
}

.lhar-notice--success {
  background: var(--lhar-success-bg);
  color: var(--lhar-success);
}

.lhar-notice--error {
  background: var(--lhar-error-bg);
  color: var(--lhar-error);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@media (max-width: 1024px) {
  .lhar-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lhar-summary-card--quality {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .lhar-reviews {
    border-radius: 22px;
    padding: 20px;
  }

  .lhar-reviews__topbar,
  .lhar-review-form__heading,
  .lhar-member-review__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lhar-summary-grid,
  .lhar-form-grid,
  .lhar-member-reviews__list {
    grid-template-columns: 1fr;
  }

  .lhar-summary-card--quality {
    grid-column: auto;
  }

  .lhar-summary-card,
  .lhar-review-form {
    padding: 20px;
  }

  .lhar-quality__row {
    grid-template-columns: 1fr 1.3fr 30px;
  }
}

/* Collapsible review form */
.lhar-review-form-anchor[hidden] {
  display: none !important;
}

.lhar-review-toggle {
  appearance: none;
  -webkit-appearance: none;
}
