/* ==========================================================================
   SBGS Reviews — review cards (default card, no photo), review form,
   star picker and popup. Base card / carousel / form / button styles come
   from the theme (components.css: .form-grid, .form-field, .form-control, .btn …).

   SB Global Solution design tokens (theme global.css), with fallbacks:
     --navy-900, --blue-600, --line, --text, --muted, --white, --font-head,
     --shadow-2 / --shadow-3.
   Colours — the theme sets them once (style.css):
     --sbgsr-accent  stars, step numbers, icons     (default: orange)
     --sbgsr-dark    floating button background     (default: navy)
   A theme card ({theme}/sbgs_reviews/card.php) is styled by the theme; the
   .sbgsr-card rules below style only the plugin's default card.
   ========================================================================== */

/* Icons (the theme sprite, <use href="#i-…">) */
.sbgsr-card .icon, .sbgsr-btn-wrap .icon, .sbgsr-form .icon, .sbgsr-modal .icon, .sbgsr-float .icon, .sbgsr-carousel .icon {
  width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sbgsr-card .icon-fill, .sbgsr-form .icon-fill, .sbgsr-float .icon-fill { fill: currentColor; stroke: none; }
.sbgsr-form .visually-hidden, .sbgsr-float .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Review card ([sbgs_reviews]) — default card */
.sbgsr-card { display: flex; flex-direction: column; padding: 32px; gap: 0; background: var(--white, #FFFFFF); border: 1px solid var(--line, #E5E9F2); border-radius: 20px; }
.sbgsr-card .testimonial__top { display: flex; align-items: center; justify-content: space-between; }
.sbgsr-card .testimonial__quote { width: 40px; height: 40px; color: var(--sbgsr-accent, #FF7A1A); }
.sbgsr-card .stars { display: flex; gap: 3px; color: var(--sbgsr-accent, #FF7A1A); }
.sbgsr-card .stars .icon { width: 16px; height: 16px; }
.sbgsr-card .testimonial__text { margin: 22px 0 28px; font-size: 1.0625rem; line-height: 1.7; color: var(--text, #475569); }
.sbgsr-card .testimonial__person { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line, #E5E9F2); }
.sbgsr-card .testimonial__name { margin: 0; font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--navy-900, #141C55); }
.sbgsr-card .testimonial__loc { display: flex; align-items: center; gap: 4px; margin: 0; font-size: .875rem; color: var(--muted, #64748B); }
.sbgsr-card .testimonial__loc .icon { width: 14px; height: 14px; }
.sbgsr-carousel { --btn-top: 50%; }

/* "Write a Review" button */
.sbgsr-btn-wrap { margin-top: 32px; }
.sbgsr-btn-wrap--center { text-align: center; }
.sbgsr-btn-wrap .btn .icon { width: 18px; height: 18px; }

/* Form */
.sbgsr-form [hidden] { display: none !important; } /* Theme classes (e.g. .form-field) set display. */
.sbgsr-form { max-width: 760px; margin-inline: auto; }
.sbgsr-form--page { padding: 40px; background: var(--white, #FFFFFF); border: 1px solid var(--line, #E5E9F2); border-radius: 20px; box-shadow: var(--shadow-2, 0 22px 44px -22px rgba(30, 42, 120, .32)); }
.sbgsr-form__title { margin: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--navy-900, #141C55); }
.sbgsr-form__intro { margin: 6px 0 24px; color: var(--muted, #64748B); }
.sbgsr-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.sbgsr-step__title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 0; font-family: var(--font-head); font-weight: 700; color: var(--navy-900, #141C55); }
.sbgsr-step__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sbgsr-accent, #FF7A1A); color: var(--white, #FFFFFF); font-size: .8125rem; }
.sbgsr-step__text { margin: 0 0 16px; font-size: .9375rem; color: var(--muted, #64748B); }
fieldset.sbgsr-step .sbgsr-step__title { margin-bottom: 18px; }
.sbgsr-inline { display: flex; gap: 10px; }
.sbgsr-inline .form-control { flex: 1; min-width: 0; }
.sbgsr-inline .btn { flex-shrink: 0; }
.sbgsr-code { margin-top: 16px; }
.sbgsr-code__input { letter-spacing: .5em; font-weight: 700; }
.sbgsr-note { font-size: .875rem; color: #067647; }
.sbgsr-link { justify-self: start; padding: 0; border: 0; background: none; font-size: .875rem; font-weight: 600; color: var(--blue-600, #3B4FD8); cursor: pointer; text-decoration: underline; }
.sbgsr-link:disabled { color: var(--muted, #64748B); cursor: default; text-decoration: none; }
.sbgsr-verified { background: #F1F5F9; color: var(--muted, #64748B); }
.sbgsr-textarea { min-height: 130px; resize: vertical; }
.sbgsr-count { margin: 0; font-size: .8125rem; color: var(--muted, #64748B); text-align: right; }
.sbgsr-consent { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; color: var(--muted, #64748B); cursor: pointer; }
.sbgsr-consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--navy-900, #141C55); }
.sbgsr-submit { width: 100%; margin-top: 22px; }
.sbgsr-general { margin-top: 10px; text-align: center; }
.sbgsr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sbgsr-form .form-error { margin: 0; font-size: .8125rem; color: #B42318; }
.sbgsr-form .form-error:empty { display: none; }
.sbgsr-form .form-label > span { color: var(--sbgsr-accent, #FF7A1A); }

/* Star picker (5 → 1 in the markup, shown 1 → 5) */
.sbgsr-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.sbgsr-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sbgsr-stars label { cursor: pointer; color: #D5DDE6; transition: color .2s, transform .2s; }
.sbgsr-stars label .icon { width: 34px; height: 34px; }
.sbgsr-stars label:hover,
.sbgsr-stars label:hover ~ label,
.sbgsr-stars input:checked ~ label { color: var(--sbgsr-accent, #FF7A1A); }
.sbgsr-stars label:hover { transform: scale(1.1); }
.sbgsr-stars input:focus-visible + label { outline: 2px solid var(--blue-600, #3B4FD8); outline-offset: 2px; border-radius: 4px; }

/* Thank you */
.sbgsr-done { padding: 28px 10px; text-align: center; }
.sbgsr-done .icon { display: block; width: 56px; height: 56px; margin: 0 auto; color: #12B76A; }
.sbgsr-done h3 { margin: 12px 0 0; font-family: var(--font-head); font-size: 1.375rem; color: var(--navy-900, #141C55); }
.sbgsr-done p { margin: 6px 0 0; color: var(--muted, #64748B); }

/* Popup */
.sbgsr-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.sbgsr-modal[hidden] { display: none; }
.sbgsr-modal__backdrop { position: absolute; inset: 0; background: rgba(14, 20, 64, .6); }
.sbgsr-modal__box { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 36px 32px 32px; background: var(--white, #FFFFFF); border-radius: 20px; box-shadow: var(--shadow-3, 0 20px 60px rgba(0, 0, 0, .25)); }
.sbgsr-modal__close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #F1F5F9; color: var(--navy-900, #141C55); cursor: pointer; }
.sbgsr-modal__close .icon { width: 18px; height: 18px; }

/* Floating button (Settings → Floating Button) */
.sbgsr-float {
  position: fixed;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--sbgsr-dark, var(--navy-900, #141C55));
  color: var(--white, #FFFFFF);
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(14, 20, 64, .3);
  transition: transform .2s, background .2s;
}
.sbgsr-float--right { right: 24px; }
.sbgsr-float--left { left: 24px; }
.sbgsr-float .icon { width: 20px; height: 20px; color: var(--sbgsr-accent, #FF7A1A); }
.sbgsr-float:hover { color: var(--white, #FFFFFF); filter: brightness(.9); transform: translateY(-3px); }
.sbgsr-float:focus-visible { outline: 3px solid var(--sbgsr-accent, #FF7A1A); outline-offset: 3px; }
.sbgsr-float--icon { justify-content: center; width: 56px; height: 56px; min-height: 0; padding: 0; }
.sbgsr-float--icon .icon { width: 24px; height: 24px; }
body.no-scroll .sbgsr-float { display: none; } /* Hidden while the popup / menu is open. */

@media (max-width: 767px) {
  .sbgsr-float { bottom: 16px; min-height: 46px; padding: 0 18px 0 14px; font-size: .875rem; }
  .sbgsr-float--right { right: 16px; }
  .sbgsr-float--left { left: 16px; }
  .sbgsr-float--icon { width: 50px; height: 50px; padding: 0; }
}

@media (max-width: 767px) {
  .sbgsr-card { padding: 26px 22px; }
  .sbgsr-form--page { padding: 24px 18px; }
  .sbgsr-modal { padding: 0; place-items: end center; }
  .sbgsr-modal__box { max-height: 92vh; padding: 30px 18px 22px; border-radius: 20px 20px 0 0; }
  .sbgsr-inline { flex-direction: column; }
}
