/* Oipinion — SKNWRLD look (box, gray, SKNVAR accent) */
:root{
  --oip-border:#e8e8e8;
  --oip-bg:#fafafa;
  --oip-text:#222;
  --oip-muted:#777;
  --oip-gray:#efefef;
  --oip-accent:var(--skn-accent, #d11d2d); /* SKNVAR */
}

.oip{
  border:1px solid var(--oip-border);
  background:#fff;
  border-radius:14px;
  padding:16px;
  box-shadow:0 6px 24px rgba(0,0,0,.06);
  color:var(--oip-text);
  width:100%;
  max-width:100%;
  margin:16px auto;
  display:block;
}

.oip .oip-title{
  font-weight:700;
  margin:0 0 12px;
  font-size:18px;
}

/* Options container: tidy spacing between choices */
.oip .oip-options{
  display:grid;
  gap:16px;                 /* nice gap between options */
  margin:12px 0 8px;
}

/* Option card */
.oip .oip-option{
  border:1px solid var(--oip-border);
  border-radius:12px;
  background:var(--oip-bg);
  display:flex;
  flex-direction:column;
  transition:border-color .15s ease, background-color .15s ease;
}

/* Minimal hover/focus feedback (no heavy effects) */
.oip .oip-option:has(.oip-btn:hover),
.oip .oip-option:has(.oip-btn:focus-visible){
  border-color:color-mix(in oklab, var(--oip-border) 60%, var(--oip-accent) 40%);
  background:#fff;
}

/* Before voting: make the whole option a centered big button */
.oip:not(.oip-voted) .oip-option{
  min-height:64px;                 /* stable height, easy to tap */
  justify-content:center;
  align-items:center;
  cursor:pointer;
}

/* Button inside option */
.oip .oip-btn{
  appearance:none;
  border:0;
  background:transparent;
  width:100%;
  padding:14px 16px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:16px;
}

/* Center perfectly BEFORE voting */
.oip:not(.oip-voted) .oip-btn{
  padding:18px;                    /* bit larger feel */
  align-items:center;
  text-align:center;
}

/* Row with label + percentage */
.oip .oip-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Center the row BEFORE voting (percentage is hidden anyway) */
.oip:not(.oip-voted) .oip-row{
  justify-content:center;
}

/* Label/percentage typography */
.oip .oip-label{ font-weight:600; }
.oip .oip-perc{ font-size:12px; color:var(--oip-muted); }

/* Hide bars, percentages and avatar strips BEFORE voting */
.oip .oip-bar,
.oip .oip-perc,
.oip:not(.oip-voted) .oip-avatars{
  display:none;
}

/* Reveal bars + percentages AFTER voted */
.oip.oip-voted .oip-bar,
.oip.oip-voted .oip-perc{
  display:block;
}

/* Progress bar */
.oip .oip-bar{
  height:8px;
  background:var(--oip-gray);
  border-radius:999px;
  overflow:hidden;
  margin:6px 0 6px;
}
.oip .oip-bar > span{
  display:block;
  height:100%;
  background:linear-gradient(90deg, var(--oip-accent), var(--oip-accent));
  width:0%;
  transition:width .2s ease;
}

/* Chosen option highlight */
.oip .oip-option.oip-chosen{
  outline:2px solid var(--oip-accent);
  background:#fff;
}
.oip .oip-option.oip-chosen .oip-label{
  font-weight:700;
  color:var(--oip-text);
}

/* Public voter avatars per option */
.oip .oip-avatars{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px 2px 10px;
  flex-wrap:wrap;
}
.oip .oip-avatar-wrap{
  width:22px;
  height:22px;
  border-radius:50%;
  overflow:hidden;
  border:1px solid var(--oip-border);
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  background:none;
}
.oip .oip-avatar-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Footer/meta */
.oip .oip-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:8px;
  color:var(--oip-muted);
  font-size:12px;
}

.oip .oip-you{
  display:flex;
  align-items:center;
  gap:6px;
}
.oip .oip-avatar.me{
  width:22px;
  height:22px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--oip-border);
}

.oip .oip-note{
  font-size:12px;
  color:var(--oip-muted);
  margin-top:8px;
}

/* Small screens */
@media (max-width:520px){
  .oip{ padding:14px; border-radius:12px; }
  .oip .oip-title{ font-size:16px; }
  .oip .oip-btn{ font-size:15px; padding:14px; }
  .oip:not(.oip-voted) .oip-option{ min-height:58px; }
}
