/* SyC Valoraciones con Insignia Animada - Frontend */

.syc-qr-widget{
  --syc-blue:#153e75;
  --syc-blue2:#0f2f5f;
  --syc-gold:#f4b740;
  --syc-gold2:#ff9900;
  --syc-green:#18a058;
  --syc-green2:#0f7a42;
  --syc-ink:#152033;
  --syc-muted:#64748b;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 92% 10%,rgba(244,183,64,.28),transparent 26%),
    radial-gradient(circle at 4% 12%,rgba(21,62,117,.16),transparent 28%),
    linear-gradient(135deg,#ffffff 0%,#f5f9fd 56%,#eef7f1 100%);
  border:1px solid #dbe7f3;
  border-radius:28px;
  padding:26px;
  margin:32px 0;
  box-shadow:0 20px 58px rgba(21,62,117,.14);
  color:var(--syc-ink);
}

.syc-qr-widget *{box-sizing:border-box}

.syc-qr-bg-orb{
  position:absolute;
  border-radius:999px;
  pointer-events:none;
  filter:blur(.2px);
}

.syc-qr-bg-orb-one{
  width:180px;
  height:180px;
  right:-70px;
  top:-70px;
  background:rgba(244,183,64,.14);
}

.syc-qr-bg-orb-two{
  width:150px;
  height:150px;
  left:-65px;
  bottom:-80px;
  background:rgba(24,160,88,.10);
}

.syc-qr-head{
  display:flex;
  gap:18px;
  align-items:center;
  position:relative;
  z-index:1;
}

.syc-qr-kicker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:#fff;
  border:1px solid rgba(21,62,117,.14);
  border-radius:999px;
  padding:6px 10px;
  color:var(--syc-blue);
  font-size:12px;
  font-weight:950;
  box-shadow:0 8px 20px rgba(21,62,117,.08);
}

.syc-qr-kicker:before{
  content:"";
  width:8px;
  height:8px;
  border-radius:99px;
  background:var(--syc-green);
  box-shadow:0 0 0 5px rgba(24,160,88,.12);
}

.syc-qr-head h2{
  margin:9px 0 5px!important;
  color:var(--syc-blue)!important;
  font-size:clamp(24px,3.6vw,38px)!important;
  line-height:1.1!important;
  letter-spacing:-.9px;
  font-weight:950!important;
}

.syc-qr-head p{
  margin:0;
  color:#475569;
  font-size:15px;
  font-weight:750;
  line-height:1.5;
}

.syc-qr-badge{
  width:92px;
  height:92px;
  border-radius:999px;
  flex:0 0 92px;
  display:grid;
  place-items:center;
  position:relative;
  background:radial-gradient(circle at 35% 25%,#fff 0%,#e9fff3 31%,#18a058 100%);
  box-shadow:
    inset 0 5px 13px rgba(255,255,255,.74),
    inset 0 -12px 20px rgba(0,0,0,.12),
    0 0 0 9px rgba(24,160,88,.10),
    0 18px 34px rgba(24,160,88,.22);
}

.syc-qr-badge:before,
.syc-qr-badge:after{
  content:"";
  position:absolute;
  inset:-9px;
  border-radius:999px;
  border:2px solid rgba(24,160,88,.22);
  animation:sycQrPulse 2.4s ease-out infinite;
}

.syc-qr-badge:after{
  border-color:rgba(244,183,64,.34);
  animation-delay:.8s;
}

.syc-qr-badge-orbit{
  position:absolute;
  inset:-5px;
  border-radius:999px;
  border-top:4px solid rgba(244,183,64,.95);
  border-right:4px solid transparent;
  border-bottom:4px solid rgba(21,62,117,.18);
  border-left:4px solid transparent;
  animation:sycQrSpin 3.1s linear infinite;
}

.syc-qr-badge-core{
  width:48px;
  height:48px;
  border-radius:999px;
  background:#fff;
  color:var(--syc-blue);
  display:grid;
  place-items:center;
  font-size:16px;
  font-weight:950;
  position:relative;
  z-index:2;
  box-shadow:0 8px 18px rgba(0,0,0,.13);
}

.syc-qr-badge-check{
  position:absolute;
  right:13px;
  bottom:13px;
  width:25px;
  height:25px;
  border-radius:999px;
  background:#fff8e8;
  border:1px solid rgba(244,183,64,.55);
  color:#0f7a42;
  display:grid;
  place-items:center;
  font-size:15px;
  font-weight:950;
  z-index:3;
}

.syc-qr-widget.is-clicked .syc-qr-badge{
  animation:sycQrBadgePop .62s ease both;
}

.syc-qr-widget.is-clicked .syc-qr-badge-orbit{
  animation:sycQrFastSpin .7s ease both;
}

.syc-qr-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:22px;
  position:relative;
  z-index:1;
}

.syc-qr-panel{
  background:#fff;
  border:1px solid #dbe7f3;
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 28px rgba(21,62,117,.08);
}

.syc-qr-panel-title strong{
  display:block;
  color:#111827;
  font-size:17px;
  line-height:1.2;
  font-weight:950;
  margin-bottom:4px;
}

.syc-qr-panel-title span{
  display:block;
  color:#64748b;
  font-size:13px;
  line-height:1.35;
  font-weight:750;
}

.syc-qr-stars{
  display:flex;
  gap:5px;
  margin:13px 0 6px;
}

.syc-qr-star{
  appearance:none;
  border:0;
  background:transparent;
  color:#cbd5e1;
  cursor:pointer;
  font-size:34px;
  line-height:1;
  padding:0 2px;
  transition:transform .16s ease,color .16s ease,text-shadow .16s ease;
}

.syc-qr-star:hover,
.syc-qr-star.is-on{
  color:var(--syc-gold2);
  text-shadow:0 8px 18px rgba(255,153,0,.24);
}

.syc-qr-star:hover{
  transform:translateY(-2px) scale(1.07);
}

.syc-qr-star.is-pop{
  animation:sycQrStarPop .28s ease both;
}

.syc-qr-live-label{
  color:#64748b;
  font-size:12px;
  font-weight:850;
}


.syc-qr-comment-toggle-wrap{
  position:relative;
  z-index:1;
  margin-top:15px;
}

.syc-qr-comment-toggle{
  appearance:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid #dbe7f3;
  background:#fff;
  color:#153e75;
  border-radius:999px;
  padding:10px 13px;
  font-size:13px;
  font-weight:950;
  box-shadow:0 8px 22px rgba(21,62,117,.07);
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}

.syc-qr-comment-toggle:before{
  content:"+";
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:999px;
  background:#f5f8fc;
  color:#153e75;
  font-weight:950;
}

.syc-qr-comment-toggle[aria-expanded="true"]:before{
  content:"−";
}

.syc-qr-comment-toggle:hover,
.syc-qr-comment-toggle:focus{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(21,62,117,.10);
}

.syc-qr-comment-panel{
  margin-top:12px;
  animation:sycQrCommentSlide .28s ease both;
}

.syc-qr-captcha{
  position:absolute!important;
  left:-99999px!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

@keyframes sycQrCommentSlide{
  from{opacity:0;transform:translateY(-6px)}
  to{opacity:1;transform:translateY(0)}
}

.syc-qr-comment-wrap{
  position:relative;
  z-index:1;
  margin-top:15px;
}

.syc-qr-comment-wrap label{
  display:block;
  color:#153e75;
  font-size:13px;
  font-weight:950;
  margin-bottom:6px;
}

.syc-qr-comment{
  width:100%;
  min-height:92px;
  resize:vertical;
  border:1px solid #dbe7f3;
  border-radius:16px;
  padding:13px 14px;
  font-size:14px;
  line-height:1.5;
  background:#fff;
  color:#152033;
  box-shadow:0 8px 22px rgba(21,62,117,.06);
}

.syc-qr-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  margin-top:15px;
  position:relative;
  z-index:1;
}

.syc-qr-submit{
  appearance:none;
  border:0;
  cursor:pointer;
  background:linear-gradient(135deg,#ffb84d 0%,#ff9900 100%);
  color:#111;
  border-radius:14px;
  padding:13px 20px;
  font-size:15px;
  line-height:1;
  font-weight:950;
  box-shadow:0 14px 30px rgba(255,153,0,.26);
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}

.syc-qr-submit:hover,
.syc-qr-submit:focus{
  transform:translateY(-2px);
  box-shadow:0 18px 38px rgba(255,153,0,.34);
  filter:saturate(1.08);
}

.syc-qr-submit:disabled{
  opacity:.7;
  cursor:not-allowed;
  transform:none;
}

.syc-qr-privacy{
  color:#64748b;
  font-size:12px;
  line-height:1.35;
  font-weight:750;
}

.syc-qr-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:17px;
  position:relative;
  z-index:1;
}

.syc-qr-summary div{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(219,231,243,.9);
  border-radius:16px;
  padding:12px;
}

.syc-qr-summary strong{
  display:block;
  color:#153e75;
  font-size:20px;
  line-height:1.1;
  font-weight:950;
}

.syc-qr-summary span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:850;
  margin-top:3px;
}

.syc-qr-message{
  display:none;
  position:relative;
  z-index:1;
  margin-top:14px;
  border-radius:15px;
  padding:12px 13px;
  font-size:14px;
  font-weight:850;
}

.syc-qr-message.is-visible{
  display:block;
}

.syc-qr-message.success{
  background:#ecfdf5;
  color:#047857;
  border:1px solid #a7f3d0;
}

.syc-qr-message.error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}

@keyframes sycQrPulse{
  0%{opacity:.7;transform:scale(.82)}
  70%{opacity:0;transform:scale(1.28)}
  100%{opacity:0;transform:scale(1.28)}
}

@keyframes sycQrSpin{
  to{transform:rotate(360deg)}
}

@keyframes sycQrFastSpin{
  from{transform:rotate(0deg)}
  to{transform:rotate(720deg)}
}

@keyframes sycQrBadgePop{
  0%{transform:scale(.94)}
  60%{transform:scale(1.08)}
  100%{transform:scale(1)}
}

@keyframes sycQrStarPop{
  0%{transform:scale(.88)}
  70%{transform:scale(1.18)}
  100%{transform:scale(1)}
}

@media(max-width:760px){
  .syc-qr-widget{
    padding:19px;
    border-radius:22px;
  }

  .syc-qr-head{
    align-items:flex-start;
    gap:13px;
  }

  .syc-qr-badge{
    width:70px;
    height:70px;
    flex-basis:70px;
  }

  .syc-qr-badge-core{
    width:38px;
    height:38px;
    font-size:13px;
  }

  .syc-qr-badge-check{
    width:21px;
    height:21px;
    right:8px;
    bottom:8px;
    font-size:12px;
  }

  .syc-qr-grid{
    grid-template-columns:1fr;
  }

  .syc-qr-star{
    font-size:31px;
  }

  .syc-qr-summary{
    grid-template-columns:1fr;
  }

  .syc-qr-actions{
    display:block;
  }

  .syc-qr-submit{
    width:100%;
  }

  .syc-qr-privacy{
    display:block;
    margin-top:10px;
  }
}


/* ==========================================================
   FIX v1.2 — Comentario compacto e invisible hasta click
   ========================================================== */

html body .syc-qr-widget .syc-qr-captcha,
html body .syc-qr-widget .syc-qr-captcha *,
.syc-qr-widget .syc-qr-captcha,
.syc-qr-widget .syc-qr-captcha *{
  position:absolute!important;
  left:-99999px!important;
  top:auto!important;
  width:1px!important;
  height:1px!important;
  max-width:1px!important;
  max-height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
  padding:0!important;
  margin:0!important;
}

html body .syc-qr-widget .syc-qr-comment-compact{
  position:relative!important;
  z-index:2!important;
  margin-top:12px!important;
  margin-bottom:0!important;
}

html body .syc-qr-widget .syc-qr-comment-link{
  appearance:none!important;
  -webkit-appearance:none!important;
  border:0!important;
  background:transparent!important;
  color:#153e75!important;
  padding:0!important;
  margin:0!important;
  font-size:13px!important;
  line-height:1.25!important;
  font-weight:950!important;
  text-decoration:underline!important;
  text-underline-offset:3px!important;
  cursor:pointer!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
}

html body .syc-qr-widget .syc-qr-comment-link:before{
  content:"+";
  display:inline-grid!important;
  place-items:center!important;
  width:18px!important;
  height:18px!important;
  border-radius:999px!important;
  background:#eef5fb!important;
  border:1px solid #dbe7f3!important;
  color:#153e75!important;
  font-size:13px!important;
  font-weight:950!important;
  text-decoration:none!important;
}

html body .syc-qr-widget .syc-qr-comment-link[aria-expanded="true"]:before{
  content:"−";
}

html body .syc-qr-widget .syc-qr-comment-panel{
  margin-top:10px!important;
  animation:sycQrCommentSlide .22s ease both!important;
}

html body .syc-qr-widget .syc-qr-comment-panel[hidden]{
  display:none!important;
}

html body .syc-qr-widget .syc-qr-comment{
  width:100%!important;
  min-height:78px!important;
  resize:vertical!important;
  border:1px solid #dbe7f3!important;
  border-radius:14px!important;
  padding:11px 12px!important;
  font-size:14px!important;
  line-height:1.45!important;
  background:#fff!important;
  color:#152033!important;
  box-shadow:0 8px 22px rgba(21,62,117,.06)!important;
}

html body .syc-qr-widget .syc-qr-stars{
  gap:3px!important;
}

html body .syc-qr-widget .syc-qr-star{
  font-size:30px!important;
}

html body .syc-qr-widget .syc-qr-actions{
  margin-top:14px!important;
}

@media(max-width:760px){
  html body .syc-qr-widget .syc-qr-star{
    font-size:28px!important;
  }
}


/* ==========================================================
   FIX v1.3 — Resultados públicos por porcentajes + comentario premium
   ========================================================== */

html body .syc-qr-widget .syc-qr-results{
  display:none;
  position:relative;
  z-index:2;
  margin-top:16px;
  padding:16px;
  border-radius:20px;
  background:linear-gradient(135deg,#ffffff 0%,#f7fbff 58%,#fff8e8 100%);
  border:1px solid #dbe7f3;
  box-shadow:0 12px 30px rgba(21,62,117,.08);
}

html body .syc-qr-widget .syc-qr-results.is-visible{
  display:block;
  animation:sycQrResultsIn .34s ease both;
}

html body .syc-qr-widget .syc-qr-results-head{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:14px;
}

html body .syc-qr-widget .syc-qr-results-trophy{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg,#fff8e8,#f4b740);
  box-shadow:0 10px 24px rgba(244,183,64,.22);
  font-size:24px;
}

html body .syc-qr-widget .syc-qr-results-head strong{
  display:block;
  color:#153e75;
  font-size:17px;
  line-height:1.2;
  font-weight:950;
}

html body .syc-qr-widget .syc-qr-results-head span{
  display:block;
  color:#64748b;
  font-size:12.5px;
  line-height:1.35;
  font-weight:750;
  margin-top:2px;
}

html body .syc-qr-widget .syc-qr-results-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

html body .syc-qr-widget .syc-qr-results-panel{
  background:#fff;
  border:1px solid #e6eef7;
  border-radius:17px;
  padding:13px;
}

html body .syc-qr-widget .syc-qr-results-panel h3{
  margin:0 0 10px!important;
  color:#111827!important;
  font-size:14px!important;
  line-height:1.2!important;
  font-weight:950!important;
}

html body .syc-qr-widget .syc-qr-result-row{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 42px 28px;
  gap:8px;
  align-items:center;
  margin:7px 0;
}

html body .syc-qr-widget .syc-qr-result-stars{
  color:#153e75;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}

html body .syc-qr-widget .syc-qr-result-row em{
  display:block;
  height:10px;
  overflow:hidden;
  border-radius:999px;
  background:#edf2f7;
}

html body .syc-qr-widget .syc-qr-result-row i{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#18a058,#f4b740,#ff9900);
  transition:width .5s ease;
}

html body .syc-qr-widget .syc-qr-result-row b{
  color:#153e75;
  font-size:12px;
  font-weight:950;
  text-align:right;
}

html body .syc-qr-widget .syc-qr-result-row small{
  color:#94a3b8;
  font-size:11px;
  font-weight:850;
  text-align:right;
}

html body .syc-qr-widget .syc-qr-comment-inner{
  position:relative;
  overflow:hidden;
  border:1px solid #dbe7f3;
  border-radius:18px;
  padding:14px;
  background:
    radial-gradient(circle at 92% 8%,rgba(244,183,64,.22),transparent 22%),
    linear-gradient(135deg,#ffffff 0%,#f7fbff 58%,#eefaf3 100%);
  box-shadow:0 10px 28px rgba(21,62,117,.08);
}

html body .syc-qr-widget .syc-qr-comment-prize{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg,#fff8e8,#f4b740);
  box-shadow:0 10px 24px rgba(244,183,64,.22);
  font-size:23px;
  margin-bottom:8px;
}

html body .syc-qr-widget .syc-qr-comment-copy{
  margin-bottom:10px;
  max-width:760px;
}

html body .syc-qr-widget .syc-qr-comment-copy strong{
  display:block;
  color:#153e75;
  font-size:15px;
  line-height:1.2;
  font-weight:950;
}

html body .syc-qr-widget .syc-qr-comment-copy span{
  display:block;
  color:#64748b;
  font-size:12.5px;
  line-height:1.4;
  font-weight:750;
  margin-top:3px;
}

html body .syc-qr-widget .syc-qr-fly{
  position:absolute;
  display:grid;
  place-items:center;
  color:#f4b740;
  font-size:18px;
  opacity:.75;
  pointer-events:none;
  animation:sycQrFly 3.8s ease-in-out infinite;
}

html body .syc-qr-widget .syc-qr-fly-one{
  right:22px;
  top:14px;
}

html body .syc-qr-widget .syc-qr-fly-two{
  right:72px;
  top:34px;
  color:#18a058;
  animation-delay:.7s;
}

html body .syc-qr-widget .syc-qr-fly-three{
  right:38px;
  bottom:18px;
  color:#153e75;
  animation-delay:1.25s;
}

@keyframes sycQrResultsIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

@keyframes sycQrFly{
  0%,100%{transform:translateY(0) rotate(0deg);opacity:.48}
  50%{transform:translateY(-8px) rotate(14deg);opacity:.9}
}

@media(max-width:760px){
  html body .syc-qr-widget .syc-qr-results-grid{
    grid-template-columns:1fr;
  }

  html body .syc-qr-widget .syc-qr-result-row{
    grid-template-columns:40px minmax(0,1fr) 40px 24px;
    gap:6px;
  }

  html body .syc-qr-widget .syc-qr-results{
    padding:13px;
  }
}


/* ==========================================================
   FIX v1.5 — Resultados ocultos hasta valorar + copy SyC
   ========================================================== */

html body .syc-qr-widget .syc-qr-summary[hidden],
html body .syc-qr-widget .syc-qr-results[hidden]{
  display:none!important;
}

html body .syc-qr-widget .syc-qr-summary.is-visible{
  display:grid!important;
  animation:sycQrResultsIn .34s ease both;
}

html body .syc-qr-widget .syc-qr-kicker{
  text-transform:none!important;
  letter-spacing:.1px!important;
  max-width:100%!important;
  white-space:normal!important;
}

html body .syc-qr-widget .syc-qr-head p{
  max-width:940px!important;
}

html body .syc-qr-widget .syc-qr-panel-title span{
  font-weight:800!important;
}

@media(max-width:760px){
  html body .syc-qr-widget .syc-qr-kicker{
    font-size:11.5px!important;
    line-height:1.25!important;
  }

  html body .syc-qr-widget .syc-qr-head h2{
    font-size:clamp(23px,7.4vw,31px)!important;
  }

  html body .syc-qr-widget .syc-qr-head p{
    font-size:14px!important;
    line-height:1.45!important;
  }
}
