/* 3 Dec 2026 (owner): the cleaner review cards on /student-review, with positive reactions, BeBrainer's official replies
   and students' short replies (App\Support\ReviewTalk, public/js/review-talk.js). Built on the glass tokens, so both themes work.
   No coloured side stripes anywhere (owner's rule). */

/* ---------- Heading summary: average rating and number of reviews ---------- */
.rvt-head { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0 !important; padding: 6px 14px;
  border-radius: 999px; background: var(--g-tile); border: 1px solid var(--g-tile-line); color: var(--g-muted) !important; font-size: 15px; }
.rvt-head b { color: var(--g-text); }
.rvt-head__avg { display: inline-flex; align-items: center; gap: 4px; color: var(--g-text); font-size: 17px; font-weight: 700; }
.rvt-head__avg svg { width: 18px; height: 18px; fill: var(--sx-gold, #f59e0b); }
.rvt-head i { width: 4px; height: 4px; border-radius: 99px; background: var(--g-muted); opacity: .6; }

/* ---------- The card: colourful, compact, the student's own photo big (3 Dec 2026, owner) ---------- */
.rv-grid.rvx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1023px) and (min-width: 641px) { .rv-grid.rvx-grid, .rv-grid.rvx-grid.rvx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Five soft colour moods in BeBrainer's green, yellow and red plus blue and violet; each card takes one by its number. */
.rvx--t0 { --tone: #16a34a; --tint: rgba(22, 163, 74, .16); }
.rvx--t1 { --tone: #f59e0b; --tint: rgba(245, 158, 11, .18); }
.rvx--t2 { --tone: #e11d48; --tint: rgba(225, 29, 72, .13); }
.rvx--t3 { --tone: #2563eb; --tint: rgba(37, 99, 235, .14); }
.rvx--t4 { --tone: #7c3aed; --tint: rgba(124, 58, 237, .13); }
/* A page of notebook paper: warm off-white, faint ruled lines behind the words, a strip of coloured tape on top. */
.rvx { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: visible; border-radius: 6px 6px 14px 14px;
  background: #fffaeb !important; border: 1px solid #eadfc2 !important; box-shadow: 0 1px 2px rgba(60, 45, 10, .08), 0 6px 16px rgba(60, 45, 10, .08);
  transition: box-shadow .18s, transform .18s; }
:root[data-theme="dark"] .rvx { background: #27222f !important; border-color: #3a3346 !important; }
.rvx:nth-child(3n+1) { transform: rotate(-.35deg); }
.rvx:nth-child(3n+3) { transform: rotate(.35deg); }
.rvq-tape { position: absolute; top: -9px; left: 50%; width: 92px; height: 22px; transform: translateX(-50%) rotate(-3deg); border-radius: 2px;
  background: color-mix(in srgb, var(--tone) 45%, #fff 30%); opacity: .75; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.rvx:nth-child(even) .rvq-tape { transform: translateX(-50%) rotate(3deg); }
.rvx:target { box-shadow: 0 14px 30px rgba(20, 16, 40, .16); }
@media (hover: hover) { .rvx:hover { transform: translateY(-3px) rotate(0deg); box-shadow: 0 2px 4px rgba(60, 45, 10, .08), 0 16px 30px rgba(60, 45, 10, .14); } }
.rvq { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px 6px; text-align: center; }
.rvq-head { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.rvq-pic { display: block; width: 92px; height: 92px; margin-bottom: 6px; border-radius: 99px; object-fit: cover; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--tone), 0 8px 18px rgba(20, 16, 40, .15); }
:root[data-theme="dark"] .rvq-pic { box-shadow: 0 0 0 4px #1c1828, 0 0 0 7px var(--tone), 0 8px 18px rgba(0, 0, 0, .3); }
.rvq-name { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.rvq-sub { font-size: 14px; line-height: 1.35; color: var(--g-muted); }
.rvq-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.rvq-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 5px; border-radius: 99px; font-style: normal; font-size: 12.5px; font-weight: 700;
  line-height: 1.7; color: var(--bc); background: color-mix(in srgb, var(--bc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--bc) 35%, transparent); }
.rvq-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rvq-badge--main { color: #fff; background: var(--bc); border-color: var(--bc); }
.rvq-badge--main svg { fill: #fff; stroke: none; }
.rvq-say { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 6px 4px 4px; }
.rvq-rate { display: inline-flex; align-items: center; gap: 8px; }
.rvq-mark { width: 20px; height: 15px; fill: var(--tone); opacity: .55; }
.rvq-stars { gap: 2px; }
.rvq-stars svg { width: 17px; height: 17px; }
.rvx .rv-text { min-height: calc(1.8em * 2); margin: 0; padding: 0 6px; font-size: 16.5px; line-height: 1.8; color: #2a2438; -webkit-line-clamp: 5; line-clamp: 5;
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(1.8em - 1px), rgba(70, 110, 190, .18) calc(1.8em - 1px), rgba(70, 110, 190, .18) 1.8em); }
:root[data-theme="dark"] .rvx .rv-text { color: #ece8f6; background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(1.8em - 1px), rgba(255, 255, 255, .08) calc(1.8em - 1px), rgba(255, 255, 255, .08) 1.8em); }
/* The yellow highlighter on the good things said about BeBrainer: uneven ends, a little lighter in the middle, like a real marker. */
.rvh { color: inherit; padding: .05em .25em; margin: 0 -.1em; border-radius: .9em .3em .8em .35em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, rgba(255, 226, 0, 0) .6%, rgba(255, 226, 0, .78) 2.2%, rgba(255, 230, 40, .6) 6%, rgba(255, 228, 20, .48) 55%, rgba(255, 224, 0, .7) 94%, rgba(255, 226, 0, 0) 98.5%); }
:root[data-theme="dark"] .rvh { color: #1b1630; }
.rvx:not(:has(.rv-toggle)) .rv-text { margin-bottom: 0; }
.rvx .rv-toggle { align-self: center; margin-top: 0; min-height: 30px; color: var(--tone); }
.rvx .rv-video { width: 100%; height: 150px; aspect-ratio: auto; margin: 0; border-radius: 14px; }

/* Heading: the bonus line */
.rvt-bonus { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0 !important; padding: 6px 14px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(245, 158, 11, .18), rgba(225, 29, 72, .14)); color: var(--g-text) !important; font-size: 15px; font-weight: 700; }
.rvt-bonus svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #e11d48; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rvs-bonus { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(245, 158, 11, .14); font-size: 14.5px; line-height: 1.55; }
.rvs-bonus a { color: #16a34a; font-weight: 700; text-decoration: underline; }

/* A shared link (/student-review?r=ID): that review on top, a little larger. */
.rvx-shared { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rvx-shared__label { margin: 0; padding: 4px 14px; border-radius: 99px; background: rgba(22, 163, 74, .12); color: var(--g-green-text, #15803d); font-size: 14px; font-weight: 700; }
.rvx--featured { width: 100%; max-width: 520px; box-shadow: 0 16px 34px rgba(20, 16, 40, .12); }
.rvx--featured .rv-text { font-size: 18px; }
.rvt-root { display: flex; flex-direction: column; gap: var(--g-gap, 14px); margin-top: -18px; }
.rvt-root > section { padding-top: 6px !important; margin-top: 0 !important; }

/* Phones: the cards slide sideways one at a time; the buttons under them step through. */
.rvc-nav { display: none; }
@media (max-width: 640px) {
  .rv-grid.rvx-grid { position: relative; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 4px 16px 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rv-grid.rvx-grid::-webkit-scrollbar { display: none; }
  .rv-grid.rvx-grid > .rvx { flex: 0 0 88%; scroll-snap-align: center; transform: none; }
  .rv-grid.rvx-grid { padding-top: 14px !important; }
  .rvx:hover { transform: none; }
  .rvc-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 0; }
  .rvc-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 99px; border: 1px solid var(--g-tile-line); background: var(--g-tile); color: var(--g-text); cursor: pointer; }
  .rvc-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .rvc-btn:disabled { opacity: .35; }
  .rvc-pos { min-width: 70px; text-align: center; font-size: 16px; color: var(--g-muted); }
  .rvc-pos b { color: var(--g-text); font-size: 18px; }
  .rvq { padding: 14px 12px 6px; }
}

/* ---------- Reactions and actions ---------- */
.rvt { display: flex; flex-direction: column; gap: 4px; margin: 0 14px; padding: 4px 0 10px; border-top: 1px solid var(--g-line); }
@media (max-width: 640px) { .rvt { margin: 0 12px; } }
.rvt [hidden] { display: none !important; }
.rvt-stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; font-size: 14px; color: var(--g-muted); }
.rvt-stats { min-height: 22px; } /* always the same height, so the name line lines up across a row */
.rvt-sum { display: inline-flex; align-items: center; gap: 6px; }
.rvt-stack { display: inline-flex; }
.rvt-stack i { display: grid; place-items: center; width: 24px; height: 24px; margin-left: -6px; border-radius: 99px; background: var(--g-tile);
  border: 2px solid var(--g-field); font-style: normal; font-size: 13px; line-height: 1; }
.rvt-stack i:first-child { margin-left: 0; }
.rvt-total { font-weight: 700; color: var(--g-text); }
.rvt-count { margin-left: auto; padding: 4px 0; border: 0; background: none; color: var(--g-muted); font: inherit; font-size: 14px; cursor: pointer; }
.rvt-count:hover { color: var(--g-accent); text-decoration: underline; }

.rvt-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.rvt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; padding: 0 6px; border: 0;
  border-radius: 12px; background: transparent; color: var(--g-muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rvt-btn:hover { background: var(--g-tile-hover, var(--g-tile)); color: var(--g-text); }
.rvt-btn:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 1px; }
.rvt-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rvt-emo { font-size: 18px; line-height: 1; filter: grayscale(1); opacity: .75; }
.rvt-react.on { color: var(--g-accent); }
.rvt-react.on .rvt-emo { filter: none; opacity: 1; }
.rvt-reactwrap { position: relative; }

.rvt-picker { position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 0; display: none; gap: 2px; padding: 6px;
  border-radius: 999px; background: #211c33; border: 1px solid var(--g-tile-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .rvt-picker { background: #fff; }
.rvx.picking .rvt-picker { display: flex; animation: rvt-pop .16s ease-out; }
@keyframes rvt-pop { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
.rvt-pick { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 99px; background: none; cursor: pointer; }
.rvt-pick i { font-style: normal; font-size: 26px; line-height: 1; transition: transform .12s; }
.rvt-pick small { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px;
  background: #111; color: #fff; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.rvt-pick:hover i, .rvt-pick:focus-visible i { transform: scale(1.25) translateY(-3px); }
.rvt-pick:hover small, .rvt-pick:focus-visible small { opacity: 1; }
.rvt-pick.on { background: var(--g-tile); }

/* ---------- Replies ---------- */
.rvt-replies { display: flex; flex-direction: column; gap: 8px; }
.rvt-replies:empty { display: none; }
.rvt-reply { display: flex; align-items: flex-start; gap: 8px; }
.rvt-fold { display: none; }
.rvx.all .rvt-fold { display: flex; }
.rvt-av { flex: none; width: 32px; height: 32px; border-radius: 99px; object-fit: cover; overflow: hidden; }
.rvt-av--team { display: grid; place-items: center; background: #5b2be0; color: #fff; font-family: system-ui, sans-serif; font-size: 15px; font-weight: 800; }
.rvt-bubble { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--g-field); font-size: 15px; line-height: 1.55; }
.rvt-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 14px; }
.rvt-tag { margin-left: 4px; padding: 0 8px; border-radius: 99px; background: rgba(22, 163, 74, .14); color: var(--g-green-text, #15803d); font-size: 12px; font-weight: 700; line-height: 1.7; }
.rvt-bubble p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--g-text); }
.rvt-reply--team .rvt-bubble { background: rgba(22, 163, 74, .09); border: 1px solid rgba(22, 163, 74, .28); }
.rvt-del { margin-top: 2px; padding: 2px 0; border: 0; background: none; color: var(--g-muted); font: inherit; font-size: 13px; cursor: pointer; }
.rvt-del:hover, .rvt-del.sure { color: var(--g-pink-text, #db2777); }
.rvt-more { align-self: flex-start; padding: 2px 0; border: 0; background: none; color: var(--g-accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rvx.all .rvt-more { display: none; }

.rvt-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; }
.rvt-form textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 140px; padding: 10px 14px; border-radius: 21px; border: 1px solid var(--g-line);
  background: var(--g-field); color: var(--g-text); font: inherit; font-size: 16px; line-height: 1.4; resize: none; }
.rvt-form textarea:focus { outline: none; border-color: var(--g-accent); }
.rvt-send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 99px; background: var(--g-brand); cursor: pointer; }
.rvt-send svg { width: 19px; height: 19px; fill: #fff; }
.rvt-send:disabled { opacity: .5; cursor: default; }
.rvt-err { flex-basis: 100%; color: var(--g-pink-text, #db2777); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) { .rvx, .rvt-pick i, .rvt-pick small { transition: none; } .rvx.picking .rvt-picker { animation: none; } .rvx:hover { transform: none; } }

/* ---------- Share sheet: a bottom sheet on phones, a small window on computers ---------- */
.rvs { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.rvs[hidden] { display: none; }
.rvs-back { position: absolute; inset: 0; background: rgba(10, 8, 20, .45); }
.rvs-panel { position: relative; width: 100%; max-width: 460px; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  background: #fff; color: #1b1630; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); animation: rvs-up .2s ease-out; }
:root[data-theme="dark"] .rvs-panel { background: #1c1828; color: #f1eefb; }
@keyframes rvs-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 641px) { .rvs { align-items: center; } .rvs-panel { border-radius: 22px; } }
.rvs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rvs-head b { font-size: 19px; }
.rvs-x { width: 40px; height: 40px; border: 0; border-radius: 99px; background: rgba(127, 127, 127, .12); color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.rvs-sub { margin: 2px 0 14px; font-size: 15px; opacity: .7; }
.rvs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rvs-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 14px; color: inherit; font-size: 13.5px; font-weight: 700;
  text-align: center; text-decoration: none; line-height: 1.3; }
.rvs-opt:hover { background: rgba(127, 127, 127, .10); }
.rvs-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 99px; }
.rvs-ic svg { width: 26px; height: 26px; fill: #fff; }
.rvs-ic--fb { background: #1877f2; }
.rvs-ic--grp { background: #1877f2; }
.rvs-ic--grp svg { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.rvs-ic--wa { background: #25d366; }
.rvs-ic--ms { background: linear-gradient(135deg, #0a7cff, #a033ff 70%, #ff5280); }
.rvs-hint { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(24, 119, 242, .10); font-size: 14px; }
.rvs-row { display: flex; gap: 8px; margin-top: 14px; }
.rvs-row button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px;
  border: 1px solid rgba(127, 127, 127, .3); background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.rvs-row svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rvs-row .done { border-color: #16a34a; color: #16a34a; }
@media (prefers-reduced-motion: reduce) { .rvs-panel { animation: none; } }

/* ---------- Home page section (home/reviews.blade.php): two columns, compact heading ---------- */
.rv-grid.rvx-grid.rvx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hm-rv { display: flex; flex-direction: column; gap: 14px; }
.hm-rv__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hm-rv__head h2 { margin: 0; font-size: clamp(22px, 5.4vw, 30px); line-height: 1.3; }
.hm-rv__head h2 svg { display: inline-block; width: 26px; height: 26px; margin-right: 8px; vertical-align: -5px; color: var(--g-accent); }
.hm-rv__head .rvt-head { margin-top: 6px !important; }
.hm-rv__all { flex: none; }
.hm-rv .rvt-root { margin-top: 0; }
@media (max-width: 640px) { .hm-rv__all { width: 100%; justify-content: center; } }
