/* static/css/pages/reviews.css */

/* ==========================================================
   Layout
   ========================================================== */

.d25-revPage { padding: 18px 0 40px; }
.d25-revShell { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

.d25-revTopbar { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:20px; }
.d25-revTopTitle { font-size:22px; font-weight:700; }
.d25-revTopSub { margin-top:6px; font-size:.9rem; opacity:.8; }
.d25-revBack { text-decoration:none; }
.d25-revDot { padding:0 8px; }

.d25-revGrid2 { display:grid; grid-template-columns:340px 1fr; gap:40px; 
align-items:start;}

.d25-revLeft,
.d25-revRight{
  min-width:0;
  background:#fff;
  border-radius:12px;
align-self:start;
}

.d25-revLeft { padding:32px; }
.d25-revRight { padding:40px; }

/* keep left form controls inside the card */
.d25-revLeft textarea,
.d25-revLeft input[type="text"],
.d25-revLeft input[type="file"],
.d25-revLeft select{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  display:block;
}

/* ==========================================================
   Left: summary, histogram, aspects, write form
   ========================================================== */

.d25-revScore { padding-bottom:20px; border-bottom:1px solid var(--grey-02); }
.d25-revAvgNum { font-size:3rem; font-weight:800; line-height:1; }
.d25-revStarsRow { margin-top:6px; }
.d25-revBased { margin-top:2px; font-size:.9rem; opacity:.5; }

.d25-revDist { padding:20px 0; border-bottom:1px solid var(--grey-02); }

.d25-revBarRow{
  display:grid;
  grid-template-columns:50px 1fr 20px;
  gap:20px;
  align-items:center;
  margin:6px 0;
}

.d25-revBarStars { font-size:13px; letter-spacing:1px; white-space:nowrap; }
.d25-revBarTrack { height:10px; border-radius:999px; background:var(--grey-02); overflow:hidden; }
.d25-revBarFill { height:100%; width:0%; background:var(--logo-green); }
.d25-revBarCount { text-align:right; opacity:.8; }

.d25-revAspects { padding:16px 0; border-bottom:1px solid var(--grey-02); }
.d25-revAspRow { display:flex; align-items:center; justify-content:space-between; padding:8px 0; font-size:14px; }
.d25-revAspLabel { opacity:.85; }
.d25-revAspVal { font-weight:700; }

/* write form */
.d25-revWriteBox{ margin-top:20px; }
.d25-reviewRating{ margin:16px 0 12px; }

.d25-reviewText textarea{
  resize:vertical;
  margin:14px 0 18px;
  padding:12px;
  border:1px solid var(--grey-02);
  border-radius:12px;
  background:#fff;
}

/* aspects form */
.d25-revAspectForm{
  margin:14px 0 16px;
  padding:12px;
  border:1px solid var(--grey-02);
  border-radius:12px;
  background:var(--grey-01);
}

.d25-revAspectTitle{ font-weight:800; margin-bottom:10px; }
.d25-revAspectRow{ display:flex; align-items:center; justify-content:space-between; padding:8px 0; gap:10px; }
.d25-revAspectLabel{ font-size:14px; opacity:.9; }

.d25-revAspectPick select{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--grey-03);
  background:#fff;
}

/* ==========================================================
   Unified buttons (reviews page only)
   ========================================================== */

.d25-revBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:40px;
  padding:0 18px;

  border-radius:999px;
  border:1px solid var(--grey-02);
  background:#fff;

  font-size:13px;
  font-weight:600;
  color:var(--grey-09);

  cursor:pointer;
  text-decoration:none;
  user-select:none;

  transition:transform .08s ease, border-color .12s ease, box-shadow .12s ease;
}

.d25-revBtn:hover{
  border-color:var(--grey-04);
  transform:translateY(-1px);
}

.d25-revBtn:active{
  transform:translateY(0);
  box-shadow:none;
}

.d25-revBtn:focus-visible{
  outline:2px solid rgba(170,196,45,.35);
  outline-offset:2px;
}

.d25-revBtn--primary{
  height:44px;
  padding:0 22px;
  border:0;
  background:var(--logo-green);
  color:#fff;
  font-weight:700;
}

.d25-revBtn--primary:hover{
  transform:translateY(-1px);
}

/* button spacing on left */
.d25-revLeft > .d25-revBtn{ width:100%; margin-top:26px; }
.d25-revWriteBox .d25-revBtn--primary{ margin-top:6px; }

/* ==========================================================
   Right: header + list
   ========================================================== */

.d25-revRightTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:12px;
}

.d25-revRightTitle{ font-weight:800; }
.d25-revRightCtrls{ display:flex; gap:10px; }

.d25-revList{ padding-top:14px; }

.d25-revItemCard{
  padding:14px;
  border:1px solid var(--grey-02);
  border-radius:14px;
  background:#fff;
  margin-bottom:12px;
}

.d25-revItemTop{ display:flex; align-items:center; justify-content:space-between; }
.d25-revItemDate{ font-size:12px; opacity:.7; }
.d25-revItemText{ margin-top:10px; font-size:14px; }

.d25-revItemMeta{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
  gap:10px;
}

.d25-revItemUser{ font-weight:700; }
.d25-revBadge{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--grey-03);
  font-size:12px;
  background:#fff;
}

.d25-revAspGrid{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.d25-revAspChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--grey-02);
  background:var(--grey-01);
  font-size:12px;
}
.d25-revAspChipVal{ font-weight:800; }

.d25-revAISummary{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--grey-02);
  border-radius:12px;
  background:var(--grey-01);
}
.d25-revAISummaryTitle{ font-weight:800; margin-bottom:6px; }
.d25-revAISummaryText{ font-size:13px; opacity:.9; }

.d25-revOwnerReply{ margin-top:12px; padding-top:12px; border-top:1px solid var(--grey-02); }
.d25-revOwnerReplyTitle{ font-weight:800; margin-bottom:8px; }

.d25-revOwnerReply textarea{
  width:100%;
  border:1px solid var(--grey-03);
  border-radius:12px;
  padding:10px 12px;
  margin-bottom:10px;
  box-sizing:border-box;
}

/* ==========================================================
   Star picker (edit review) - correct visual order
   ========================================================== */

.d25-starPick{
  display:flex;
  flex-direction:row-reverse;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:0;
  direction:ltr;
}

.d25-starPick input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

/* kill pseudo stars from any global form styles */
.d25-starPick label::before,
.d25-starPick label::after,
.d25-starOpt::before,
.d25-starOpt::after{
  content:none !important;
}

.d25-starOpt{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid var(--grey-03);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  background:#fff;
  user-select:none;
  transition:transform .08s ease, border-color .12s ease;
}

.d25-starGlyph{
  font-size:16px;
  line-height:1;
  color:var(--grey-05);
  transform:translateY(-.5px);
  opacity:.45;
}

.d25-starOpt.is-on{ border-color:var(--logo-green); }
.d25-starOpt.is-on .d25-starGlyph{ color:var(--logo-green); opacity:1; }

.d25-starOpt:hover{
  border-color:var(--logo-green);
  transform:translateY(-1px);
}

.d25-starSR{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ==========================================================
   Dropdowns (positioned by JS using position: fixed)
   ========================================================== */

.d25-dd{
  position:fixed;
  width:320px;
  background:#fff;
  border:1px solid var(--grey-02);
  border-radius:14px;
  padding:14px;
  z-index:999;
}

.d25-ddTitle{ font-weight:800; margin-bottom:10px; }

.d25-ddRow{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 8px;
  border-radius:10px;
  cursor:pointer;
}

.d25-ddRow:hover{ background:var(--grey-01); }
.d25-ddStars{ letter-spacing:1px; }

.d25-ddActions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--grey-02);
}

/* ==========================================================
   Display stars 
   ========================================================== */

.d25-stars{
  --pct: 0%;
  display:inline-block;
  position:relative;
  font-size:1.5rem;
  letter-spacing:1px;
  line-height:1;
  vertical-align:middle;
}

.d25-stars::before{
  content:"★★★★★";
  color:var(--grey-08);
  opacity:.2;
}

.d25-stars::after{
  content:"★★★★★";
  position:absolute;
  left:0;
  top:0;
  width:var(--pct);
  overflow:hidden;
  color:var(--logo-green);
}

.d25-stars--sm{ font-size:1.2rem; }

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 980px){
  .d25-revGrid2{ grid-template-columns:1fr; }
}

/* ==========================================================
   Detail page: mini reviews summary (uses same atoms)
   ========================================================== */

.d25-revMini{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:60px;
}

/* Left score block */
.d25-revMiniScore{
  margin:0;
  padding:40px;
  border:0;
}

/* Middle histogram */
.d25-revMiniDist{
  flex:0 1 40%;
  max-width:40%;
  min-width:220px;
  margin:0;
  padding:0;
  border:0;
}

/* Remove any separators coming from shared styles */
.d25-revMiniDist hr{
  display:none;
}

.d25-revMiniDist .d25-revBarRow:last-child{
  border-bottom:0;
}

.d25-revMiniDist{
  border-bottom:0;
}

/* Ensure bars follow reduced width */
.d25-revMiniDist .d25-revBarTrack{
  width:100%;
}

/* CTA button area */
.d25-revMiniCta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:40px;
}

.d25-revMiniCta .d25-revBtn{
  white-space:nowrap;
  font-size:1.1rem;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width: 860px){

  .d25-revMini{
    flex-direction:column;
    align-items:flex-start;
    gap:18px;
  }

  .d25-revMiniScore{
    padding:22px 0 0;
  }

  .d25-revMiniDist{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .d25-revMiniCta{
    width:100%;
    padding:0;
    justify-content:flex-start;
  }

}