/* Panel mount */
[data-ag-reviews="panel"] {
  display: block;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 4px 0 8px;
  box-sizing: border-box;
}

/* AG Store — product reviews widget styles */

/* Stars under the H1 */
[data-ag-reviews="stars"] { margin: 6px 0 2px; }

/* Product-page loading skeleton: hide real stars and show a shimmer bar so
   reviews don't peek through while title/price are still placeholders. */
@keyframes agrvSkelShimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
#agp.agp-loading [data-ag-reviews="stars"],
#agp.agp-loading .agp-combo-rating {
  display: block !important;
  min-height: 18px;
  max-width: 200px;
  width: 55%;
  margin: 8px 0 4px !important;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 400px 100%;
  animation: agrvSkelShimmer 1.4s ease infinite;
  pointer-events: none !important;
  overflow: hidden;
  color: transparent !important;
}
#agp.agp-loading [data-ag-reviews="stars"] > *,
#agp.agp-loading .agp-combo-rating > * {
  opacity: 0 !important;
  visibility: hidden !important;
}

.agrv-h1 {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.agrv-h1-stars { display: inline-flex; gap: 2px; }
.agrv-h1-star {
  background: none; border: 0; padding: 0; margin: 0; line-height: 0; cursor: pointer;
  transition: transform .1s;
}
.agrv-h1-star .agrv-star { width: 19px; height: 19px; display: block; }
.agrv-h1-star:hover { transform: scale(1.14); }
.agrv-h1-avg { font-size: 14px; font-weight: 700; color: #1d1d1f; }
.agrv-h1-none { font-size: 13.5px; font-weight: 600; color: #86868b; }
.agrv-h1-details {
  position: relative; background: none; border: 0; padding: 0 0 0 11px; cursor: pointer;
  font: 600 13.5px/1 Inter, system-ui, sans-serif; color: #0071e3;
  transition: color .15s;
}
.agrv-h1-details::before {
  content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: #c7c7cc;
}
.agrv-h1-details:hover { color: #0062c4; text-decoration: underline; }
@media (max-width: 640px) {
  .agrv-h1-details { display: none; }
}

.agrv-star--on { color: #F5B300; }
.agrv-star--off { color: #e2e2e6; }

/* Panel */
.agrv-root {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1d1d1f; -webkit-font-smoothing: antialiased;
  max-width: 820px;
}
.agrv-summary {
  display: flex; gap: 32px; align-items: center; flex-wrap: wrap;
  padding: 4px 0 18px; border-bottom: 1px solid #ececee; margin-bottom: 18px;
}
.agrv-sum-score { text-align: center; min-width: 96px; }
.agrv-sum-avg { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; }
.agrv-sum-stars { display: inline-flex; gap: 2px; margin: 6px 0 4px; }
.agrv-sum-stars .agrv-star { width: 16px; height: 16px; }
.agrv-sum-count { font-size: 12px; color: #86868b; font-weight: 500; }

.agrv-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 5px; }
.agrv-bar { display: flex; align-items: center; gap: 9px; }
.agrv-bar-lbl { width: 10px; font-size: 12px; font-weight: 600; color: #86868b; text-align: right; }
.agrv-bar-track { flex: 1; height: 6px; background: #ececee; border-radius: 4px; overflow: hidden; }
.agrv-bar-fill { display: block; height: 100%; background: #F5B300; border-radius: 4px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.agrv-bar-n { width: 22px; font-size: 12px; color: #86868b; text-align: right; }

/* Empty state — compact product reviews card (Google store reviews sit below) */
.agrv-hero {
  max-width: 820px; margin: 2px auto 4px;
  background: #fff; border: 1px solid #ececee; border-radius: 22px;
  padding: 34px 40px; box-shadow: 0 10px 30px rgba(11,15,24,.045);
}
.agrv-hero--compact {
  max-width: 520px; padding: 40px 32px 36px;
  box-shadow: 0 6px 18px rgba(11,15,24,.04);
}
.agrv-hero-intro { text-align: center; }
.agrv-hero-ic {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #fff8e8; color: #F5B300;
}
.agrv-hero--compact .agrv-hero-ic { width: 52px; height: 52px; border-radius: 15px; margin-bottom: 18px; }
.agrv-hero-title { font-size: 19px; font-weight: 700; line-height: 1.3; color: #1d1d1f; letter-spacing: -.3px; }
.agrv-hero-sub {
  margin: 10px auto 0; max-width: 340px;
  font-size: 13.5px; line-height: 1.5; color: #86868b;
}
.agrv-hero .agrv-cta { margin: 16px 0 0; }
.agrv-hero .agrv-write-btn { width: 100%; max-width: 260px; }
.agrv-hero-sep { height: 1px; background: #ececee; margin: 20px 0; }
.agrv-auth-actions.agrv-auth-actions--compact {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin: 24px auto 0;
}
.agrv-auth-actions--compact .agrv-auth-btn { min-width: 150px; padding: 14px 20px; }

/* Benefits gate (mirrors /klient) */
.agrv-gate { text-align: left; }
.agrv-gate-head {
  text-align: center; font-size: 14px; font-weight: 700; color: #1d1d1f;
  margin-bottom: 16px; letter-spacing: -.2px;
}
.agrv-bens {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px;
  max-width: 720px; margin: 0 auto 22px;
}
.agrv-ben { display: flex; align-items: flex-start; gap: 13px; }
.agrv-ben-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e9edf3; color: #0071e3;
  box-shadow: 0 2px 6px rgba(11,15,24,.04);
}
.agrv-ben-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agrv-ben-title { font-size: 14.5px; font-weight: 700; color: #1d1d1f; letter-spacing: -.2px; }
.agrv-ben-sub { font-size: 13px; line-height: 1.4; color: #86868b; }

/* CTA + form */
.agrv-cta { margin-bottom: 18px; }
.agrv-write-btn {
  appearance: none; border: 0; background: #0071e3; color: #fff;
  font: 600 14.5px/1 Inter, system-ui, sans-serif; padding: 13px 26px; border-radius: 12px;
  cursor: pointer; transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(0,113,227,.22);
}
.agrv-write-btn:hover { background: #0062c4; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,113,227,.28); }
.agrv-write-btn:active { transform: translateY(0); }

.agrv-form-wrap { margin-bottom: 22px; }
.agrv-form {
  background: #fafafc; border: 1px solid #ececee; border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.agrv-form-lbl { font-size: 13px; font-weight: 600; color: #1d1d1f; }
.agrv-rate { display: inline-flex; gap: 4px; }
.agrv-rate-star { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.agrv-rate-star .agrv-star { width: 30px; height: 30px; transition: transform .1s; }
.agrv-rate-star:hover .agrv-star { transform: scale(1.08); }

.agrv-input {
  width: 100%; box-sizing: border-box; border: 1px solid #d2d2d7; border-radius: 11px;
  padding: 11px 13px; font: 400 14px/1.5 Inter, system-ui, sans-serif; color: #1d1d1f;
  background: #fff; outline: none; transition: border-color .15s;
}
.agrv-input:focus { border-color: #0071e3; }
textarea.agrv-input { min-height: 96px; resize: vertical; }

.agrv-submit {
  align-self: flex-start; appearance: none; border: 0; border-radius: 11px;
  background: #0071e3; color: #fff; font: 600 14px/1 Inter, system-ui, sans-serif;
  padding: 12px 26px; cursor: pointer; transition: background .15s;
}
.agrv-submit:hover { background: #0062c4; }
.agrv-submit:disabled { opacity: .6; cursor: default; }

.agrv-form-msg { font-size: 13px; font-weight: 500; }
.agrv-form-msg--err { color: #d0361c; }
.agrv-form-msg--ok { color: #22a06b; }

/* Register / login actions */
.agrv-auth-actions { display: flex; gap: 12px; max-width: 440px; margin: 0 auto; }
.agrv-auth-btn {
  flex: 1; appearance: none; cursor: pointer; border-radius: 12px;
  font: 600 14px/1 Inter, system-ui, sans-serif; padding: 13px 18px;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.agrv-auth-btn--primary {
  border: 0; background: #0071e3; color: #fff; box-shadow: 0 4px 14px rgba(0,113,227,.24);
}
.agrv-auth-btn--primary:hover { background: #0062c4; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,113,227,.3); }
.agrv-auth-btn--primary:active { transform: translateY(0); }
.agrv-auth-btn--ghost { border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f; }
.agrv-auth-btn--ghost:hover { background: #f7f7f9; border-color: #c2c2c8; }

/* When the gate is shown inline in the reviews list (reviews already exist) */
.agrv-form-wrap .agrv-gate {
  background: #fff; border: 1px solid #ececee; border-radius: 18px;
  padding: 22px; box-shadow: 0 8px 24px rgba(11,15,24,.05); max-width: 560px;
}

@media (max-width: 620px) {
  .agrv-bens { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 480px) {
  .agrv-hero { padding: 24px 18px; }
  .agrv-auth-actions { flex-direction: column; }
  .agrv-hero .agrv-write-btn { max-width: none; }
}

.agrv-thanks { text-align: center; padding: 22px 0; }
.agrv-thanks p { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: #1d1d1f; }

/* List */
.agrv-list { display: flex; flex-direction: column; }
.agrv-item { padding: 18px 0; border-top: 1px solid #ececee; }
.agrv-item:first-child { border-top: 0; }
.agrv-item-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.agrv-item-stars { display: inline-flex; gap: 1px; }
.agrv-item-stars .agrv-star { width: 14px; height: 14px; }
.agrv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eef6ff; color: #0071e3; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
}
.agrv-item-title { font-size: 14px; font-weight: 700; color: #1d1d1f; margin-bottom: 3px; }
.agrv-item-body { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: #424245; white-space: pre-line; }
.agrv-item-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #86868b; }
.agrv-item-author { font-weight: 600; color: #1d1d1f; }
.agrv-reply {
  margin-top: 10px; background: #f5f5f7; border-radius: 12px; padding: 11px 14px;
  font-size: 13px; line-height: 1.5; color: #424245;
}
.agrv-reply-lbl { display: block; font-weight: 700; color: #1d1d1f; margin-bottom: 3px; }

/* Pagination — always visible on phone, tablet and desktop (never hide on small screens) */
.agrv-pager {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin: 8px 0 4px; padding: 16px 0 6px; border-top: 1px solid #ececee;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.agrv-pager-meta {
  font-size: 13px; font-weight: 600; color: #86868b; letter-spacing: -.01em;
}
.agrv-pager-controls {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 520px; flex-wrap: wrap;
}
.agrv-page-nums {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center;
}
.agrv-page-btn,
.agrv-page-nav {
  appearance: none; -webkit-appearance: none; border: 1px solid #e5e7eb; background: #fff;
  color: #1d1d1f; cursor: pointer; font: 600 14px/1 Inter, system-ui, sans-serif;
  border-radius: 11px; min-height: 40px; padding: 0 14px;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.agrv-page-btn { min-width: 40px; padding: 0; }
.agrv-page-btn.is-on {
  background: #0071e3; border-color: #0071e3; color: #fff;
  box-shadow: 0 2px 8px rgba(0,113,227,.22);
}
.agrv-page-btn:hover:not(.is-on):not(:disabled),
.agrv-page-nav:hover:not(:disabled) { background: #f5f9ff; border-color: #cfe1fb; color: #0071e3; }
.agrv-page-btn:active:not(:disabled),
.agrv-page-nav:active:not(:disabled) { transform: translateY(1px); }
.agrv-page-nav:disabled,
.agrv-page-btn:disabled {
  opacity: .38; cursor: default; transform: none; background: #fff; color: #86868b;
}
.agrv-page-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; color: #c7c7cc; font: 700 14px/1 Inter, system-ui, sans-serif;
}

@media (max-width: 640px) {
  .agrv-summary { gap: 20px; }
  .agrv-sum-avg { font-size: 38px; }
  .agrv-pager-controls { gap: 6px; }
  .agrv-page-nav { flex: 1 1 auto; min-width: 0; max-width: 140px; padding: 0 12px; font-size: 13.5px; }
  .agrv-page-btn { min-width: 38px; min-height: 38px; border-radius: 10px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  /* Tablet: keep pager prominent and tappable */
  .agrv-page-btn,
  .agrv-page-nav { min-height: 42px; }
  .agrv-page-btn { min-width: 42px; }
}
