/* ================================================================
   ROLETA DE BRINDES
   ================================================================ */

.wheel-experience{
  position:relative;
  overflow:hidden;
  max-width:820px;
  margin:0 auto;
  padding:34px 30px 38px;
  border:1px solid var(--line);
  border-radius:26px;
  background:
    radial-gradient(circle at 12% 8%,rgba(255,85,0,.12),transparent 30%),
    radial-gradient(circle at 90% 4%,rgba(102,22,216,.14),transparent 34%),
    var(--bg-card);
  box-shadow:0 24px 70px rgba(0,0,0,.10);
  text-align:center;
}
.wheel-copy{max-width:620px;margin:0 auto 22px;}
.wheel-kicker,.wheel-result-kicker,.wheel-admin-kicker{
  display:inline-flex;
  color:var(--orange);
  font-size:10px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.wheel-copy h1{margin:8px 0 8px;font-size:34px;line-height:1.08;}
.wheel-copy p{margin:0;color:var(--muted);font-size:14px;line-height:1.55;}

.wheel-stage{
  position:relative;
  width:min(390px,84vw);
  aspect-ratio:1;
  margin:24px auto 18px;
}
.wheel-pointer{
  position:absolute;
  z-index:5;
  top:-13px;
  left:50%;
  width:0;
  height:0;
  transform:translateX(-50%);
  border-left:16px solid transparent;
  border-right:16px solid transparent;
  border-top:31px solid var(--orange);
  filter:drop-shadow(0 5px 5px rgba(0,0,0,.24));
}
.wheel-disc{
  position:absolute;
  inset:0;
  border:11px solid #111;
  border-radius:50%;
  background:#ddd;
  box-shadow:
    0 0 0 5px rgba(255,255,255,.95),
    0 16px 44px rgba(0,0,0,.24);
  transition:transform 5.4s cubic-bezier(.12,.72,.08,1);
  will-change:transform;
}
.wheel-disc::after{
  content:'';
  position:absolute;
  inset:10px;
  border:1px solid rgba(255,255,255,.42);
  border-radius:50%;
  pointer-events:none;
}
.wheel-center{
  position:absolute;
  z-index:4;
  top:50%;
  left:50%;
  width:112px;
  height:112px;
  display:grid;
  place-content:center;
  transform:translate(-50%,-50%);
  border:8px solid #fff;
  border-radius:50%;
  background:#111;
  color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}
.wheel-center span{font-size:9px;font-weight:800;letter-spacing:.08em;}
.wheel-center strong{font-size:23px;line-height:1;}
.wheel-labels{position:absolute;inset:0;}
.wheel-label{
  position:absolute;
  top:50%;
  left:50%;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  margin:-15px;
  border:2px solid rgba(255,255,255,.82);
  border-radius:50%;
  background:rgba(17,17,17,.82);
  color:#fff;
  font-size:12px;
  font-weight:900;
  box-shadow:0 4px 10px rgba(0,0,0,.18);
}

.wheel-prize-legend{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  max-width:640px;
  margin:0 auto 18px;
  text-align:left;
}
.wheel-legend-item{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--bg-card);
  font-size:11px;
  font-weight:800;
}
.wheel-legend-number{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:#fff;
  font-size:10px;
  font-weight:900;
}
.wheel-legend-item span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.wheel-actions{display:grid;justify-items:center;gap:8px;}
.wheel-spin-btn{min-width:210px;font-size:14px;}
.wheel-spin-btn:disabled{opacity:.65;cursor:wait;}
.wheel-help{margin:0;color:var(--muted);font-size:10.5px;}
.wheel-error{margin:16px auto 0;max-width:560px;}

.wheel-result{
  max-width:610px;
  margin:22px auto 0;
  padding:24px;
  border:1px solid rgba(34,199,106,.38);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(34,199,106,.10),rgba(102,22,216,.08));
}
.wheel-result h2{margin:7px 0 8px;font-size:25px;}
.wheel-result p{margin:0 0 16px;color:var(--muted);line-height:1.5;}
.wheel-result-code{
  margin:0 auto 17px;
  padding:10px 14px;
  border:1px dashed var(--purple);
  border-radius:11px;
  background:var(--bg-card);
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:13px;
  font-weight:900;
}

/* Administração */
.wheel-admin-panel{margin-bottom:20px;}
.wheel-admin-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line);
}
.wheel-admin-heading h3{margin:5px 0 4px;}
.wheel-switch{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:310px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:15px;
  cursor:pointer;
  background:var(--bg-card);
}
.wheel-switch input{position:absolute;opacity:0;pointer-events:none;}
.wheel-switch-track{
  width:48px;
  height:28px;
  flex:0 0 48px;
  padding:3px;
  border-radius:999px;
  background:#b7bbc2;
  transition:.2s ease;
}
.wheel-switch-thumb{
  display:block;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 7px rgba(0,0,0,.18);
  transition:.2s ease;
}
.wheel-switch input:checked + .wheel-switch-track{background:#22c76a;}
.wheel-switch input:checked + .wheel-switch-track .wheel-switch-thumb{transform:translateX(20px);}
.wheel-switch-copy strong{display:block;font-size:11px;}
.wheel-switch-copy small{display:block;margin-top:3px;color:var(--muted);font-size:9.5px;line-height:1.35;}

.wheel-admin-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);
  gap:16px;
  margin-top:18px;
}
.wheel-admin-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--bg-card);
}
.wheel-card-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:15px;
}
.wheel-card-title h4,.wheel-list-header h4{margin:0 0 4px;font-size:14px;}
.wheel-card-title p,.wheel-list-header p{margin:0;color:var(--muted);font-size:10px;line-height:1.4;}

.wheel-prize-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
}
.wheel-field-wide{grid-column:1/-1;}
.wheel-field-note{display:block;margin-top:5px;color:var(--muted);font-size:9px;line-height:1.35;}
.wheel-color-input{
  width:100%;
  height:42px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--bg-card);
  cursor:pointer;
}
.wheel-checkbox{
  display:flex;
  align-items:center;
  gap:8px;
  align-self:end;
  min-height:42px;
  font-size:11px;
  font-weight:800;
}
.wheel-checkbox input{width:17px;height:17px;accent-color:var(--purple);}
.wheel-form-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.wheel-form-feedback{font-size:10px;font-weight:800;}
.wheel-form-feedback.success{color:#16894a;}
.wheel-form-feedback.error{color:#c0392b;}

.wheel-weight-example{display:grid;gap:9px;}
.wheel-weight-example div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:11px;
  font-size:10px;
}
.wheel-weight-example strong{color:var(--purple);}
.wheel-formula{
  margin-top:13px;
  padding:11px;
  border-radius:11px;
  background:rgba(102,22,216,.08);
  color:var(--black);
  font-size:10px;
  font-weight:900;
  text-align:center;
}
.wheel-disclaimer{margin:10px 0 0;color:var(--muted);font-size:9px;line-height:1.45;}

.wheel-admin-section{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.wheel-list-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.wheel-prize-list{display:grid;gap:9px;}
.wheel-prize-row{
  display:grid;
  grid-template-columns:minmax(170px,1fr) 90px 110px 95px auto;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:13px;
}
.wheel-prize-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.wheel-prize-swatch{
  width:12px;
  height:40px;
  flex:0 0 12px;
  border-radius:7px;
}
.wheel-prize-main strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
}
.wheel-prize-main small{display:block;margin-top:3px;color:var(--muted);font-size:9px;}
.wheel-prize-stat span{display:block;color:var(--muted);font-size:8.5px;text-transform:uppercase;font-weight:900;}
.wheel-prize-stat strong{display:block;margin-top:3px;font-size:11px;}
.wheel-prize-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;}
.wheel-status-badge{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  background:#eee;
  color:#666;
  font-size:8.5px;
  font-weight:900;
  text-transform:uppercase;
}
.wheel-status-badge.active{background:#e5f9ed;color:#16894a;}
.wheel-status-badge.out{background:#fff2db;color:#a66800;}
.wheel-winners-table select{
  min-width:120px;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--bg-card);
  color:var(--black);
  font:inherit;
  font-size:10px;
}

body.dark-mode .wheel-experience,
body.dark-mode .wheel-admin-card,
body.dark-mode .wheel-switch,
body.dark-mode .wheel-legend-item{
  background:var(--bg-card);
}
body.dark-mode .wheel-disc{
  border-color:#eef0f4;
  box-shadow:0 0 0 5px #20242c,0 16px 48px rgba(0,0,0,.46);
}
body.dark-mode .wheel-formula{color:#f2ebff;background:rgba(140,69,239,.17);}
body.dark-mode .wheel-status-badge{background:#343943;color:#c7ced8;}
body.dark-mode .wheel-status-badge.active{background:#173b29;color:#77e8aa;}
body.dark-mode .wheel-status-badge.out{background:#3b2d17;color:#ffcb72;}

@media(max-width:900px){
  .wheel-admin-grid{grid-template-columns:1fr;}
  .wheel-admin-heading{flex-direction:column;}
  .wheel-switch{width:100%;min-width:0;}
  .wheel-prize-row{grid-template-columns:minmax(150px,1fr) 80px 90px auto;}
  .wheel-prize-row .wheel-prize-stat:nth-of-type(3){display:none;}
}
@media(max-width:640px){
  .wheel-experience{padding:26px 16px 30px;border-radius:20px;}
  .wheel-copy h1{font-size:27px;}
  .wheel-stage{width:min(330px,82vw);}
  .wheel-center{width:92px;height:92px;border-width:6px;}
  .wheel-center strong{font-size:19px;}
  .wheel-prize-legend{grid-template-columns:1fr;}
  .wheel-admin-grid{display:block;}
  .wheel-admin-card + .wheel-admin-card{margin-top:14px;}
  .wheel-prize-form{grid-template-columns:1fr;}
  .wheel-field-wide{grid-column:auto;}
  .wheel-prize-row{
    grid-template-columns:1fr auto;
    align-items:start;
  }
  .wheel-prize-stat{display:none;}
  .wheel-prize-actions{grid-column:1/-1;justify-content:flex-start;}
}
