/* Front Porch Business Consulting — reviews and the leave-a-review form */

.testimonials-empty {
  text-align: center;
  padding: 2.4rem 1.5rem;
  border-radius: 20px;
}

.testimonials-empty p {
  margin: 0 0 1.15rem;
  font-family: var(--display, "Space Grotesk", "Manrope", sans-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.testimonials-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: rgba(77, 163, 255, 0.14);
  border: 1px solid var(--glass-border, rgba(140, 190, 255, 0.22));
  color: var(--cyan, #7cc7ff);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

.testimonial-card {
  margin: 0;
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.testimonial-stars {
  display: inline-flex;
  gap: 0.15rem;
  color: var(--electric, #4da3ff);
}

.testimonial-stars svg { width: 1.05rem; height: 1.05rem; display: block; }
.testimonial-stars .is-empty { color: rgba(160, 190, 230, 0.35); }

.testimonial-card blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--slate, #b9c5d6);
}

.testimonial-card footer {
  margin-top: auto;
  padding: 0;
  background: none;
  border: 0;
}

.testimonial-card cite {
  display: block;
  font-style: normal;
  font-family: var(--display, "Space Grotesk", "Manrope", sans-serif);
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  color: #fff;
}

.testimonial-title {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--muted, #a3b0c2);
}

.testimonials-cta {
  margin-top: 1.4rem;
  text-align: center;
}

/* Review modal */
.review-modal[hidden] { display: none !important; }

.review-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: end center;
  padding: 0;
}

@media (min-width: 641px) {
  .review-modal:not([hidden]) {
    place-items: center;
    padding: 1.25rem;
  }
}

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.review-dialog {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
  max-height: min(92vh, 52rem);
  overflow: auto;
  margin: 0;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(16, 28, 52, 0.98) 0%, rgba(8, 14, 28, 0.98) 100%);
  border: 1px solid var(--glass-border, rgba(140, 190, 255, 0.22));
  box-shadow: 0 -12px 48px -8px rgba(0, 0, 0, 0.7);
  animation: review-in 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

@media (min-width: 641px) {
  .review-dialog {
    border-radius: 22px;
    padding: 1.7rem 1.8rem 1.7rem;
    box-shadow: 0 28px 70px -18px rgba(0, 0, 0, 0.8), 0 0 80px -24px rgba(59, 140, 255, 0.4);
  }
}

@keyframes review-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.review-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.review-dialog-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.review-dialog .lede {
  margin: 0.35rem 0 1.15rem;
  color: var(--slate, #b9c5d6);
}

.review-close {
  flex-shrink: 0;
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--slate, #b9c5d6);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.review-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.review-close:focus-visible {
  outline: 2px solid var(--cyan, #7cc7ff);
  outline-offset: 2px;
}

.star-picker {
  display: flex;
  flex-direction: row;
  gap: 0.2rem;
  margin: 0.25rem 0 0.15rem;
}

.star-option {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  cursor: pointer;
}

.star-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.star-option svg {
  width: 2.1rem;
  height: 2.1rem;
  display: block;
  margin: 0.12rem auto 0;
  color: rgba(160, 190, 230, 0.35);
  transition: color 0.15s, transform 0.15s;
  pointer-events: none;
}

.star-picker[data-value="1"] .star-option:nth-child(-n+1) svg,
.star-picker[data-value="2"] .star-option:nth-child(-n+2) svg,
.star-picker[data-value="3"] .star-option:nth-child(-n+3) svg,
.star-picker[data-value="4"] .star-option:nth-child(-n+4) svg,
.star-picker[data-value="5"] .star-option:nth-child(-n+5) svg,
.star-picker[data-hover="1"] .star-option:nth-child(-n+1) svg,
.star-picker[data-hover="2"] .star-option:nth-child(-n+2) svg,
.star-picker[data-hover="3"] .star-option:nth-child(-n+3) svg,
.star-picker[data-hover="4"] .star-option:nth-child(-n+4) svg,
.star-picker[data-hover="5"] .star-option:nth-child(-n+5) svg {
  color: #4da3ff;
}

.star-option:hover svg { transform: scale(1.08); }

.star-option input:focus-visible + svg {
  outline: 2px solid var(--cyan, #7cc7ff);
  outline-offset: 2px;
  border-radius: 4px;
}

.review-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 0.35rem;
  color: #e8eef8;
  font-weight: 600;
  cursor: pointer;
}

.review-consent input[type="checkbox"] {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  border: 1px solid var(--line-strong, rgba(160, 190, 230, 0.38));
  border-radius: 4px;
  background: rgba(5, 10, 22, 0.55);
  cursor: pointer;
}

.review-consent input[type="checkbox"]:checked {
  background: var(--blue, #3b8cff);
  border-color: var(--electric, #4da3ff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' d='M3 8.5l3.2 3.2L13 4.5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.review-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--cyan, #7cc7ff);
  outline-offset: 2px;
}

#review-form .form-help { margin-top: 0.25rem; }

.review-thanks {
  text-align: center;
  padding: 1.5rem 0.5rem 0.75rem;
}

.review-thanks h3 {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
}

.review-thanks p {
  margin: 0 0 1.2rem;
  color: var(--slate, #b9c5d6);
}

@media (prefers-reduced-motion: reduce) {
  .review-dialog { animation: none !important; }
  .star-option svg { transition: none !important; }
}

@media print {
  .review-modal { display: none !important; }
}


#review-form fieldset.field {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  min-inline-size: 0;
}

#review-form legend {
  color: #e8eef8;
  padding: 0;
  margin: 0 0 0.35rem;
}

@media (max-width: 640px) {
  .review-dialog {
    padding-bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }
  .review-dialog .lede {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
  }
  #review-form textarea {
    min-height: 6.25rem;
  }
}
