/* ═══════════════════════════════════════════════
   EDD Star Rating — Frontend Styles
   Design: Luxury dark modal with amber gold stars
═══════════════════════════════════════════════ */

:root {
  --edd-sr-accent: #f59e0b;
  --edd-sr-star:   #f59e0b;
  --edd-sr-bg:     #0f0f13;
  --edd-sr-surface:#1a1a24;
  --edd-sr-border: rgba(255,255,255,.08);
  --edd-sr-text:   #f1f0ee;
  --edd-sr-muted:  rgba(241,240,238,.5);
  --edd-sr-radius: 20px;
  --edd-sr-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}

/* ── Overlay ── */
.edd-sr-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.4,0,.2,1);
}
.edd-sr-overlay.edd-sr-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ── */
.edd-sr-modal {
  position: relative;
  background: var(--edd-sr-bg);
  border-radius: var(--edd-sr-radius);
  border: 1px solid var(--edd-sr-border);
  box-shadow: var(--edd-sr-shadow);
  max-width: 520px;
  width: 100%;
  padding: 48px 44px 40px;
  transform: translateY(32px) scale(.96);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.edd-sr-modal::-webkit-scrollbar { display:none; }
.edd-sr-overlay.edd-sr-visible .edd-sr-modal {
  transform: translateY(0) scale(1);
}

/* Glow accent */
.edd-sr-modal-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(245,158,11,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Close ── */
.edd-sr-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--edd-sr-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--edd-sr-muted);
  transition: all .2s;
  padding: 0;
}
.edd-sr-close:hover {
  background: rgba(255,255,255,.12);
  color: var(--edd-sr-text);
  transform: scale(1.1);
}
.edd-sr-close svg { width:14px; height:14px; }

/* ── Icon ── */
.edd-sr-icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edd-sr-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,158,11,.3), rgba(245,158,11,.05));
  border: 1px solid rgba(245,158,11,.3);
  animation: edd-sr-pulse 2.5s ease infinite;
}
@keyframes edd-sr-pulse {
  0%,100% { transform: scale(1); opacity:1; }
  50%      { transform: scale(1.08); opacity:.7; }
}
.edd-sr-trophy {
  width: 30px;
  height: 30px;
  color: var(--edd-sr-accent);
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.edd-sr-header { text-align: center; margin-bottom: 24px; }
.edd-sr-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--edd-sr-text);
  margin: 0 0 8px;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.edd-sr-subtitle {
  font-size: .9rem;
  color: var(--edd-sr-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Product info ── */
.edd-sr-product-info {
  text-align: center;
  font-size: .82rem;
  color: var(--edd-sr-muted);
  margin-bottom: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--edd-sr-border);
  border-radius: 8px;
  padding: 10px 16px;
  display: none;
}
.edd-sr-product-info.visible { display: block; }

/* ── Stars ── */
.edd-sr-stars-wrap {
  text-align: center;
  margin-bottom: 24px;
}
.edd-sr-stars {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.edd-sr-star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
.edd-sr-star:hover { transform: scale(1.22); }
.edd-sr-star:active { transform: scale(.95); }
.edd-sr-star svg {
  width: 44px;
  height: 44px;
  fill: rgba(255,255,255,.08);
  stroke: rgba(255,255,255,.15);
  stroke-width: 1;
  transition: fill .2s, stroke .2s, filter .2s;
}
.edd-sr-star.hovered svg,
.edd-sr-star.selected svg {
  fill: var(--edd-sr-star);
  stroke: var(--edd-sr-star);
  filter: drop-shadow(0 0 10px rgba(245,158,11,.5));
}
.edd-sr-star.hovered svg { animation: edd-sr-bounce .25s ease; }
@keyframes edd-sr-bounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.edd-sr-star-label {
  font-size: .67rem;
  color: var(--edd-sr-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
}
.edd-sr-star:hover .edd-sr-star-label,
.edd-sr-star.selected .edd-sr-star-label {
  opacity: 1;
  color: var(--edd-sr-accent);
}
.edd-sr-star-hint {
  font-size: .82rem;
  color: var(--edd-sr-accent);
  margin: 10px 0 0;
  height: 18px;
  font-style: italic;
}

/* ── Fields ── */
.edd-sr-fields { display: flex; flex-direction: column; gap: 14px; }
.edd-sr-field { display: flex; flex-direction: column; gap: 6px; }
.edd-sr-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--edd-sr-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.edd-sr-optional { font-weight: 400; opacity: .6; }
.edd-sr-input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--edd-sr-border);
  border-radius: 10px;
  color: var(--edd-sr-text);
  font-size: .9rem;
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s, background .2s;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
}
.edd-sr-input::placeholder { color: rgba(255,255,255,.25); }
.edd-sr-input:focus {
  border-color: rgba(245,158,11,.5);
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}
.edd-sr-textarea { resize: vertical; min-height: 100px; }

/* ── Error ── */
.edd-sr-error {
  font-size: .82rem;
  color: #f87171;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: none;
  margin-top: 12px;
}
.edd-sr-error.visible { display: block; }

/* ── Actions ── */
.edd-sr-actions { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.edd-sr-btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--edd-sr-accent), #d97706);
  color: #000;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  letter-spacing: .01em;
  font-family: inherit;
}
.edd-sr-btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
}
.edd-sr-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245,158,11,.4);
}
.edd-sr-btn-submit:active { transform: translateY(0); }
.edd-sr-btn-submit:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}
.edd-sr-btn-arrow { width:18px; height:18px; transition: transform .2s; }
.edd-sr-btn-submit:hover .edd-sr-btn-arrow { transform: translateX(3px); }

.edd-sr-btn-skip {
  background: none;
  border: none;
  color: var(--edd-sr-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  transition: color .2s;
}
.edd-sr-btn-skip:hover { color: var(--edd-sr-text); }

/* ── Thank you state ── */
.edd-sr-thanks {
  display: none;
  text-align: center;
  padding: 20px 0 10px;
  animation: edd-sr-fadein .4s ease;
}
.edd-sr-thanks.visible { display: block; }
@keyframes edd-sr-fadein { from {opacity:0;transform:translateY(12px)} to {opacity:1;transform:none} }

.edd-sr-thanks-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(52,211,153,.2), rgba(16,185,129,.05));
  border: 1px solid rgba(52,211,153,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.edd-sr-thanks-icon svg {
  width: 32px; height: 32px;
  color: #34d399;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: edd-sr-draw .6s .1s ease forwards;
}
@keyframes edd-sr-draw { to { stroke-dashoffset: 0; } }

.edd-sr-thanks h3 {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  color: var(--edd-sr-text);
  margin: 0 0 8px;
}
.edd-sr-thanks p {
  color: var(--edd-sr-muted);
  margin: 0 0 24px;
}
.edd-sr-btn-close-thanks {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--edd-sr-border);
  border-radius: 10px;
  color: var(--edd-sr-text);
  padding: 12px 24px;
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  transition: all .2s;
}
.edd-sr-btn-close-thanks:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
}

/* ── Multi-product nav ── */
.edd-sr-product-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.edd-sr-product-tab {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--edd-sr-border);
  border-radius: 8px;
  color: var(--edd-sr-muted);
  padding: 6px 12px;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.edd-sr-product-tab:hover,
.edd-sr-product-tab.active {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.3);
  color: var(--edd-sr-accent);
}

/* ── Average stars (product page) ── */
.edd-sr-avg-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.edd-sr-avg-stars { display: flex; gap: 3px; }
.edd-sr-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--edd-sr-star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.edd-sr-dot-half { opacity: .5; }
.edd-sr-dot-empty {
  background: transparent;
  border: none;
  clip-path: none;
  position: relative;
}
.edd-sr-dot-empty::before {
  content: '★';
  font-size: 16px;
  color: rgba(0,0,0,.2);
  position: absolute;
  top: -1px;
  left: 1px;
}
.edd-sr-avg-number { font-weight: 700; font-size: .95rem; color: var(--edd-sr-accent, #f59e0b); }
.edd-sr-avg-count { font-size: .85rem; color: #888; }

/* ── Inline form ── */
.edd-sr-inline-wrap {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 32px;
  margin: 32px 0;
  font-family: inherit;
}
.edd-sr-inline-header { margin-bottom: 20px; }
.edd-sr-inline-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.edd-sr-inline-product { font-size: .85rem; color: #666; margin: 0; }

.edd-sr-inline-form .edd-sr-stars { display: flex; gap: 4px; margin-bottom: 16px; }
.edd-sr-inline-form .edd-sr-star svg {
  width: 36px; height: 36px;
  fill: #e5e5e5;
  stroke: #d4d4d4;
  stroke-width: 1;
}
.edd-sr-inline-form .edd-sr-star.hovered svg,
.edd-sr-inline-form .edd-sr-star.selected svg {
  fill: var(--edd-sr-star, #f59e0b);
  stroke: var(--edd-sr-star, #f59e0b);
}
.edd-sr-inline-form .edd-sr-input {
  background: #fff;
  border: 1px solid #e5e5e5;
  color: #111;
  border-radius: 8px;
}
.edd-sr-inline-form .edd-sr-input:focus {
  border-color: var(--edd-sr-accent, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

/* ── Rating summary block ── */
.edd-sr-summary {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 24px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #ebebeb;
  margin: 24px 0;
}
.edd-sr-summary-score { text-align: center; min-width: 100px; }
.edd-sr-summary-big {
  font-size: 3rem;
  font-weight: 800;
  color: #111;
  line-height: 1;
}
.edd-sr-summary-stars { display: flex; justify-content: center; gap: 2px; margin: 6px 0; }
.edd-sr-summary-star { width: 16px; height: 16px; fill: #e5e5e5; }
.edd-sr-summary-star.filled { fill: var(--edd-sr-star, #f59e0b); }
.edd-sr-summary-count { font-size: .8rem; color: #888; }
.edd-sr-summary-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.edd-sr-bar-row { display: flex; align-items: center; gap: 10px; font-size: .83rem; }
.edd-sr-bar-label { width: 28px; color: #555; text-align: right; flex-shrink: 0; }
.edd-sr-bar-track { flex: 1; height: 8px; background: #e5e5e5; border-radius: 4px; overflow: hidden; }
.edd-sr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--edd-sr-star, #f59e0b), #f97316);
  border-radius: 4px;
  transition: width .6s ease;
}
.edd-sr-bar-pct { width: 32px; color: #888; font-size: .78rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .edd-sr-modal { padding: 32px 24px 28px; }
  .edd-sr-title { font-size: 1.35rem; }
  .edd-sr-star svg { width: 38px; height: 38px; }
  .edd-sr-summary { flex-direction: column; gap: 20px; }
}

/* ── Star shake animation (validation feedback) ── */
@keyframes edd-sr-shake {
  0%,100% { transform: translateX(0); }
  15%     { transform: translateX(-6px); }
  30%     { transform: translateX(6px); }
  45%     { transform: translateX(-5px); }
  60%     { transform: translateX(5px); }
  75%     { transform: translateX(-3px); }
  90%     { transform: translateX(3px); }
}
.edd-sr-stars.shake { animation: edd-sr-shake .55s ease; }

/* ── Inline success message ── */
.edd-sr-inline-success {
  padding: 24px;
  text-align: center;
  color: #16a34a;
  font-weight: 600;
  font-size: 1.05rem;
}

/* ── Progress dots (multi-product) ── */
.edd-sr-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}
.edd-sr-dot-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: background .3s, transform .3s;
}
.edd-sr-dot-step.active {
  background: var(--edd-sr-accent);
  transform: scale(1.3);
}

/* ── Shake animation ── */
@keyframes edd-sr-shake {
  0%,100%{transform:translateX(0)} 15%{transform:translateX(-6px)}
  30%{transform:translateX(6px)}   45%{transform:translateX(-4px)}
  60%{transform:translateX(4px)}   75%{transform:translateX(-2px)}
  90%{transform:translateX(2px)}
}
.edd-sr-stars.shake { animation: edd-sr-shake .55s ease; }

/* ── Inline success ── */
.edd-sr-inline-success {
  padding: 24px;
  text-align: center;
  color: #16a34a;
  font-weight: 600;
  font-size: 1.05rem;
  background: #f0fdf4;
  border-radius: 12px;
}
