/**
 * ETechFlow_AdvancedProductReviews — storefront styles (Luma)
 * @author ETechFlow <etechflow0@gmail.com>
 */

/* Summary */
.etf-review-summary { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px solid #e8e8e8; margin-bottom: 16px; }
.etf-summary-score .etf-avg { font-size: 2.4rem; font-weight: 700; }
.etf-summary-score .etf-avg-of { color: #777; margin-left: 4px; }
.etf-summary-count { color: #777; font-size: 1.2rem; }
.etf-recommend-rate strong { font-size: 1.6rem; color: #1a7f37; }

/* Filters */
.etf-review-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.etf-review-filters .etf-filter { background: #f4f4f4; border: 1px solid #d6d6d6; border-radius: 16px; padding: 6px 14px; cursor: pointer; font-size: 1.2rem; }
.etf-review-filters .etf-filter.active { background: #1979c3; color: #fff; border-color: #1979c3; }
.etf-review-filters .etf-sort { margin-left: auto; }

/* Items */
.etf-review-item { padding: 16px 0; border-bottom: 1px solid #eee; list-style: none; }
.etf-review-item .review-title strong { font-size: 1.5rem; }

/* Badges */
.etf-badge { display: inline-block; font-size: 1.1rem; padding: 2px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.etf-badge-verified { background: #e6f4ea; color: #1a7f37; }
.etf-badge-recommend { background: #e8f0fe; color: #1967d2; }
.etf-badge-store { background: #fff4e5; color: #b06000; }

/* Pros & Cons */
.etf-proscons { display: flex; gap: 24px; margin: 10px 0; flex-wrap: wrap; }
.etf-proscons-title { font-weight: 700; display: block; margin-bottom: 4px; }
.etf-pros .etf-proscons-title { color: #1a7f37; }
.etf-cons .etf-proscons-title { color: #c5221f; }
.etf-proscons ul { margin: 0; padding-left: 18px; }

/* Media gallery */
.etf-media-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.etf-media-item { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; overflow: hidden; display: inline-block; }
.etf-media-item img { width: 100%; height: 100%; object-fit: cover; }
video.etf-media-item { background: #000; }

/* Helpful */
.etf-helpful { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.etf-helpful button { background: #f4f4f4; border: 1px solid #d6d6d6; border-radius: 14px; padding: 4px 12px; cursor: pointer; }
.etf-helpful-label { color: #777; font-size: 1.2rem; }

/* Comments (Luma) */
.etf-comments { margin-top: 12px; padding-left: 16px; border-left: 3px solid #eee; }
.etf-comment { margin-bottom: 8px; }
.etf-comment-admin { background: #fafafa; padding: 8px; border-radius: 6px; }
.etf-comment-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.etf-comment-input { flex: 1; min-width: 200px; }

/* Media preview (form) */
.etf-media-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.etf-preview-item { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }

/* Q&A */
.etf-qa-list { margin: 0 0 16px; padding: 0; }
.etf-qa-item { list-style: none; padding: 12px 0; border-bottom: 1px solid #eee; }
.etf-q-mark { display: inline-block; font-weight: 700; color: #1979c3; margin-right: 8px; }
.etf-q-meta { color: #777; font-size: 1.2rem; margin-top: 4px; }
.etf-qa-form { margin-top: 16px; }
.etf-qa-input { width: 100%; }
.etf-qa-message.etf-success { color: #1a7f37; margin-top: 8px; }
.etf-qa-message.etf-error { color: #c5221f; margin-top: 8px; }

/* Translation (Claude) */
.etf-translate { margin-top: 8px; }
.etf-translate-btn {
    background: none; border: 1px solid #d1d1d1; border-radius: 16px;
    padding: 3px 12px; font-size: 1.2rem; color: #1979c3; cursor: pointer;
}
.etf-translate-btn:hover { border-color: #1979c3; }
.etf-translate-btn[disabled] { opacity: .6; cursor: default; }
.etf-translate-btn:before { content: "\1F310"; margin-right: 5px; }
.etf-translate-status { margin-left: 8px; font-size: 1.2rem; color: #777; }

/* Video reviews — poster tile + lightbox */
.etf-media-video {
    position: relative; width: 90px; height: 90px; border: none; cursor: pointer;
    border-radius: 8px; overflow: hidden;
    background: #1d1d1d radial-gradient(circle at center, #333 0%, #111 100%);
    display: inline-flex; align-items: center; justify-content: center;
}
.etf-media-video:hover { outline: 2px solid #1979c3; }
.etf-play-icon {
    color: #fff; font-size: 22px; line-height: 1;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center;
    padding-left: 3px;
}
.etf-video-lightbox {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .8);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.etf-video-lightbox-inner { position: relative; max-width: 880px; width: 100%; }
.etf-video-player { width: 100%; max-height: 80vh; border-radius: 8px; background: #000; display: block; }
.etf-video-close {
    position: absolute; top: -38px; right: 0; background: none; border: none;
    color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.etf-image-lightbox {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .85);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.etf-image-lightbox-inner { position: relative; max-width: 880px; width: auto; }
.etf-image-full {
    max-width: 100%; max-height: 85vh; border-radius: 8px; background: #000;
    display: block; box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
.etf-image-close {
    position: absolute; top: -38px; right: 0; background: none; border: none;
    color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.etf-media-image { cursor: pointer; }

/* Per-review star rating — paints the .rating-result width overlay as stars.
   Markup: <div class="rating-result"><span style="width:NN%"></span></div> */
.etf-stars { display: inline-block; line-height: 1; margin: 4px 0; }
.etf-stars .rating-result {
    position: relative;
    display: inline-block;
    font-size: 16px;
    letter-spacing: 2px;
    font-family: Arial, Helvetica, sans-serif;
    color: #d6d6d6;
    white-space: nowrap;
}
.etf-stars .rating-result::before {
    content: "\2605\2605\2605\2605\2605";
}
.etf-stars .rating-result > span {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    overflow: hidden;
    width: 0;
    color: #ffb503;
    white-space: nowrap;
}
.etf-stars .rating-result > span::before {
    content: "\2605\2605\2605\2605\2605";
}


/* "Write a review" CTA in the reviews summary */
.etf-write-review-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.etf-write-review-btn { background: #1979c3; color: #fff; border: none; border-radius: 3px; padding: 10px 20px; font-size: 1.4rem; font-weight: 600; line-height: 1.2; cursor: pointer; }
.etf-write-review-btn:hover { background: #16689e; }
.etf-write-review-hint { color: #777; font-size: 1.2rem; max-width: 180px; line-height: 1.3; }
@media (max-width: 640px) { .etf-write-review-cta { margin-left: 0; margin-top: 12px; } }

/* ==========================================================================
   Hyvä-scoped review form styling
   --------------------------------------------------------------------------
   The review form template (review/form.phtml) uses Luma CSS classes (.field,
   .control, .input-text, .fieldset, …). Luma styles these; Hyvä does not, so
   under Hyvä the inputs render narrow/cramped and labels run together. These
   rules — scoped to .etf-review-add--hyva, added only under Hyvä — give the
   form full-width, spaced, Tailwind-matching styling. Luma is untouched.
   ========================================================================== */
/* Centered form column (matches the centered reviews column) */
.etf-review-add--hyva { max-width: 44rem; margin: 2.5rem auto 3rem; padding: 0 1rem; box-sizing: border-box; }
.etf-review-add--hyva * { box-sizing: border-box; }
.etf-review-add--hyva .block-title { margin: 0 0 1rem; }
.etf-review-add--hyva .block-title strong {
    font-size: 1.5rem; font-weight: 700; color: #111827; line-height: 1.3; letter-spacing: -.01em;
}
/* The form body is a white card */
.etf-review-add--hyva .block-content {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 1.75rem 1.85rem;
}

/* "You're reviewing: Product" — its own line with breathing room */
.etf-review-add--hyva .review-fieldset { border: 0; padding: 0; margin: 0; }
.etf-review-add--hyva .review-legend {
    display: block; margin: 0 0 1.5rem; padding: 0 0 1rem; float: none; width: 100%;
    border-bottom: 1px solid #f0f0f4;
}
.etf-review-add--hyva .review-legend span { color: #6b7280; font-size: .85rem; }
.etf-review-add--hyva .review-legend strong { display: block; margin-top: .15rem; font-size: 1.05rem; font-weight: 700; color: #111827; }
.etf-review-add--hyva .review-legend + br { display: none; }

/* Every field is a full-width stacked block */
.etf-review-add--hyva .field { margin: 0 0 1.15rem; width: 100%; }
.etf-review-add--hyva .field > .label,
.etf-review-add--hyva .field > .legend.label,
.etf-review-add--hyva fieldset.review-field-ratings > .label {
    display: block; margin: 0 0 .4rem; padding: 0;
    font-size: .85rem; font-weight: 600; color: #374151; float: none;
}
.etf-review-add--hyva .field > .label + br { display: none; }
.etf-review-add--hyva .control { width: 100%; }

/* Text inputs + textareas: full-width, padded, bordered, rounded */
.etf-review-add--hyva input.input-text,
.etf-review-add--hyva input[type="text"],
.etf-review-add--hyva input[type="email"],
.etf-review-add--hyva textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #d1d5db; border-radius: .6rem;
    font-size: .9rem; line-height: 1.4; color: #111827; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.etf-review-add--hyva textarea { min-height: 6rem; resize: vertical; }
.etf-review-add--hyva .etf-pros textarea,
.etf-review-add--hyva .etf-cons textarea { min-height: 4rem; }
.etf-review-add--hyva input.input-text:focus,
.etf-review-add--hyva input[type="text"]:focus,
.etf-review-add--hyva input[type="email"]:focus,
.etf-review-add--hyva textarea:focus {
    outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.etf-review-add--hyva .note { margin-top: .25rem; font-size: .75rem; color: #6b7280; }

/* Ratings block */
.etf-review-add--hyva fieldset.review-field-ratings { border: 0; padding: 0; margin: 0 0 1.15rem; }
.etf-review-add--hyva .review-field-rating { display: flex; align-items: center; gap: .75rem; margin: 0 0 .5rem; }
.etf-review-add--hyva .review-field-rating > .label { margin: 0; min-width: 5.5rem; font-weight: 500; }
.etf-review-add--hyva .review-control-vote { display: inline-flex; gap: .25rem; }

/* Radios / checkboxes: consistent accent + explicit size (kills the stray bar) */
.etf-review-add--hyva input[type="checkbox"],
.etf-review-add--hyva input[type="radio"] {
    width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin: 0; accent-color: #4f46e5; cursor: pointer;
}

/* Recommend checkbox — inline with its label, in a subtle pill */
.etf-review-add--hyva .field.choice.etf-recommend {
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem .8rem; background: #f9fafb; border: 1px solid #eef0f4; border-radius: .6rem;
}
.etf-review-add--hyva .field.choice.etf-recommend > .label { margin: 0; font-weight: 500; color: #374151; cursor: pointer; }

/* Media upload — style the native file control into a button */
.etf-review-add--hyva .etf-media .control { display: flex; flex-direction: column; gap: .5rem; }
.etf-review-add--hyva .etf-media input[type="file"] { font-size: .85rem; color: #6b7280; }
.etf-review-add--hyva .etf-media input[type="file"]::file-selector-button {
    margin-right: .75rem; padding: .5rem .95rem; border: 1px solid #d1d5db; border-radius: .5rem;
    background: #fff; color: #374151; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
.etf-review-add--hyva .etf-media input[type="file"]::file-selector-button:hover { background: #f3f4f6; border-color: #9ca3af; }
.etf-review-add--hyva .etf-media-preview { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Submit */
.etf-review-add--hyva .additional_info { border: 0; padding: 0; margin: 0; }
.etf-review-add--hyva .actions-toolbar { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #f0f0f4; display: flex; justify-content: flex-end; }
.etf-review-add--hyva .action.submit.primary {
    display: inline-block; background: #4f46e5; color: #fff;
    border: 0; border-radius: .6rem; padding: .7rem 1.6rem;
    font-size: .9rem; font-weight: 600; line-height: 1.2; cursor: pointer;
    box-shadow: 0 1px 2px rgba(79,70,229,.25); transition: background .15s;
}
.etf-review-add--hyva .action.submit.primary:hover { background: #4338ca; }

@media (max-width: 700px) {
    .etf-review-add--hyva .block-content { padding: 1.25rem 1.15rem; }
    .etf-review-add--hyva .actions-toolbar { justify-content: stretch; }
    .etf-review-add--hyva .action.submit.primary { width: 100%; }
}


/* ==========================================================================
   Hyvä reviews — self-contained design system
   --------------------------------------------------------------------------
   The Hyvä theme ships a *precompiled* styles.css: Tailwind purges every
   utility class the theme's own templates never use, so many of the layout /
   sizing utilities in this module's reviews template (max-w-5xl, p-5, card
   borders, the star SVG w-4/h-4, …) get dropped on a store whose Hyvä build
   didn't scan this module — the list then renders flat and full-bleed.

   reviews.css is a plain module stylesheet (never Tailwind-processed / purged),
   so the whole reviews UI is styled here against stable `etf-*` hook classes.
   This makes the look identical on every Hyvä store regardless of its Tailwind
   build, and gives the widget a polished, card-based design.
   ========================================================================== */
#etf-reviews {
    --etf-accent: #4f46e5;
    --etf-ring: rgba(79, 70, 229, .12);
    --etf-border: #e5e7eb;
    --etf-bg: #ffffff;
    --etf-muted: #6b7280;
    max-width: 66rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    box-sizing: border-box;
    width: 100%;
    color: #1f2937;
}
#etf-reviews * { box-sizing: border-box; }
#etf-reviews > h2 {
    font-size: 1.75rem; font-weight: 700; color: #111827;
    margin: 0 0 1.5rem; letter-spacing: -.01em;
}

/* Star SVGs (w-4/h-4 get purged → force a sane size) */
#etf-reviews svg { width: 1rem; height: 1rem; display: inline-block; flex-shrink: 0; }
#etf-reviews .etf-stars { display: inline-flex; gap: 1px; }

/* ---- Summary card ---- */
#etf-reviews .etf-summary {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 1.75rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.75rem;
    background: linear-gradient(180deg, #fbfbff 0%, #f7f7fb 100%);
    border: 1px solid #ececf5;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
#etf-reviews .etf-summary-score {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding-right: 1.75rem;
    border-right: 1px solid #ececf5;
}
#etf-reviews .etf-summary-avg { font-size: 3.25rem; font-weight: 800; line-height: 1; color: #111827; }
#etf-reviews .etf-summary-stars { margin: .5rem 0; }
#etf-reviews .etf-summary-stars svg { width: 1.15rem; height: 1.15rem; }
#etf-reviews .etf-summary-score span:last-child { font-size: .85rem; color: var(--etf-muted); }
#etf-reviews .etf-summary-dist { display: flex; flex-direction: column; gap: .35rem; }
#etf-reviews .etf-dist-row {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    background: none; border: 0; padding: .1rem 0; cursor: pointer;
}
#etf-reviews .etf-dist-label { width: 3.25rem; text-align: right; font-size: .8rem; color: #4b5563; }
#etf-reviews .etf-dist-track {
    flex: 1; height: .55rem; background: #e9e9f0; border-radius: 999px; overflow: hidden;
}
#etf-reviews .etf-dist-fill {
    display: block; height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 999px; transition: width .4s ease;
}
#etf-reviews .etf-dist-row:hover .etf-dist-fill { filter: brightness(1.05); }
#etf-reviews .etf-dist-count { width: 2.25rem; font-size: .8rem; color: var(--etf-muted); }
#etf-reviews .etf-summary-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; font-size: .85rem; }
#etf-reviews .etf-meta-recommend { color: #15803d; font-weight: 600; }
#etf-reviews .etf-meta-verified { color: #1d4ed8; font-weight: 600; }

/* ---- Toolbar: filter chips + sort ---- */
#etf-reviews .etf-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1.25rem;
}
#etf-reviews .etf-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
#etf-reviews .etf-chip {
    padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 500;
    background: #fff; color: #374151; border: 1px solid #d1d5db; cursor: pointer;
    transition: all .15s;
}
#etf-reviews .etf-chip:hover { border-color: #9ca3af; background: #f9fafb; }
#etf-reviews .etf-chip--active { color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
#etf-reviews .etf-chip--active:not(.etf-chip--blue):not(.etf-chip--purple) { background: #111827; }
#etf-reviews .etf-chip--blue { background: #1d4ed8; }
#etf-reviews .etf-chip--purple { background: #7c3aed; }
#etf-reviews .etf-sort {
    padding: .45rem .8rem; border: 1px solid #d1d5db; border-radius: .6rem;
    font-size: .82rem; background: #fff; color: #374151; cursor: pointer;
}
#etf-reviews .etf-sort:focus { outline: none; border-color: var(--etf-accent); box-shadow: 0 0 0 3px var(--etf-ring); }

/* ---- Review cards ---- */
#etf-reviews .space-y-5 { display: flex; flex-direction: column; gap: 1.1rem; }
#etf-reviews .etf-rvw-card {
    padding: 1.5rem;
    background: var(--etf-bg);
    border: 1px solid var(--etf-border);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
#etf-reviews .etf-rvw-card:hover {
    box-shadow: 0 10px 24px -10px rgba(16, 24, 40, .18);
    border-color: #dcdce6;
    transform: translateY(-1px);
}
#etf-reviews .etf-rvw-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
#etf-reviews .etf-rvw-card-head-left { display: flex; align-items: flex-start; gap: .85rem; }

/* Reviewer avatar (initial) */
#etf-reviews .etf-avatar {
    flex-shrink: 0;
    width: 2.6rem; height: 2.6rem;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
    text-transform: uppercase;
}
#etf-reviews .etf-rvw-card-titlerow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
#etf-reviews .etf-rvw-card-title { font-weight: 700; color: #111827; font-size: 1.02rem; }
#etf-reviews .etf-rvw-card-byline { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; font-size: .85rem; color: var(--etf-muted); }
#etf-reviews .etf-author { font-weight: 600; color: #374151; }
/* Reviewer badges. Deliberately named `etf-rvw-badge` (NOT `etf-badge`): the
   Etechflow_Blog module ships a `.etf-badge` blog-post ribbon
   (position:absolute; text-transform:uppercase) in a stylesheet that also loads
   on product pages, and it was hijacking these inline review badges. A unique
   name avoids the collision entirely — no specificity/load-order dependency.
   position/text-transform are still reset defensively. */
#etf-reviews .etf-rvw-badge {
    display: inline-flex; align-items: center;
    position: static; top: auto; left: auto; right: auto; bottom: auto; float: none;
    margin: 0; vertical-align: baseline; text-transform: none; letter-spacing: normal;
    padding: .12rem .55rem; border-radius: 999px; font-size: .7rem; line-height: 1.4; font-weight: 600;
}
#etf-reviews .etf-rvw-badge--verified { background: #dbeafe; color: #1e40af; }
#etf-reviews .etf-rvw-badge--recommends { background: #dcfce7; color: #166534; }
#etf-reviews .etf-rvw-card-date { font-size: .75rem; color: #9ca3af; white-space: nowrap; }
#etf-reviews .etf-rvw-card-body { margin-top: .9rem; color: #374151; line-height: 1.6; white-space: pre-line; }

/* ---- Pros / cons blocks ---- */
#etf-reviews .etf-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }
#etf-reviews .etf-pros, #etf-reviews .etf-cons {
    margin: 0; padding: .75rem .9rem; border-radius: .75rem; list-style: none; font-size: .85rem;
}
#etf-reviews .etf-pros { background: #f0fdf4; border: 1px solid #dcfce7; }
#etf-reviews .etf-cons { background: #fef2f2; border: 1px solid #fee2e2; }
#etf-reviews .etf-pros li, #etf-reviews .etf-cons li {
    display: flex; gap: .4rem; align-items: flex-start; padding: .12rem 0; line-height: 1.4;
}
#etf-reviews .etf-pros li { color: #15803d; }
#etf-reviews .etf-cons li { color: #b91c1c; }
#etf-reviews .etf-pc-mark { font-weight: 700; }

/* ---- Media thumbnails ---- */
#etf-reviews .etf-media-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
#etf-reviews .etf-media-thumb {
    display: block; width: 5rem; height: 5rem; border-radius: .6rem; overflow: hidden;
    background: #f3f4f6; border: 1px solid var(--etf-border); position: relative;
    transition: transform .15s ease, box-shadow .15s ease;
}
#etf-reviews .etf-media-thumb:hover { transform: scale(1.04); box-shadow: 0 6px 16px -6px rgba(0,0,0,.3); }
#etf-reviews .etf-media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Card footer: helpful / translate ---- */
#etf-reviews .etf-rvw-card-foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
    margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #f0f0f4; font-size: .85rem;
}
#etf-reviews .etf-rvw-card-foot > span:first-child { color: var(--etf-muted); }
#etf-reviews .etf-rvw-card-foot button {
    display: inline-flex; align-items: center; gap: .35rem; background: none; border: 0;
    color: #4b5563; cursor: pointer; padding: .2rem .4rem; border-radius: .5rem; transition: background .12s, color .12s;
}
#etf-reviews .etf-rvw-card-foot button:hover { background: #f3f4f6; }
#etf-reviews .etf-rvw-card-foot button[x-show] { margin-left: auto; color: var(--etf-accent); }
#etf-reviews .etf-rvw-card-foot button[x-show]:hover { text-decoration: underline; background: none; }

/* ---- Store / customer comments ---- */
#etf-reviews .etf-rvw-comments {
    margin-top: 1rem; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .4rem;
    background: #f9fafb; border-left: 3px solid #e5e7eb; border-radius: 0 .5rem .5rem 0; font-size: .85rem;
}

/* ---- Q&A ---- */
#etf-reviews .etf-rvw-qa { margin-top: 3rem; }
#etf-reviews .etf-rvw-qa-title { font-size: 1.35rem; font-weight: 700; color: #111827; margin: 0 0 1rem; }
#etf-reviews .etf-rvw-qa-list { display: flex; flex-direction: column; gap: .85rem; }
#etf-reviews .etf-rvw-qa-card {
    padding: 1.15rem 1.35rem; background: #fff; border: 1px solid var(--etf-border);
    border-radius: .85rem; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
/* Question row */
#etf-reviews .etf-rvw-qa-q { display: flex; align-items: flex-start; gap: .6rem; }
#etf-reviews .etf-rvw-qa-qtext { font-weight: 600; color: #111827; line-height: 1.5; padding-top: .1rem; }
/* Answer rows — aligned under the question text */
#etf-reviews .etf-rvw-qa-a { display: flex; align-items: flex-start; gap: .6rem; margin-top: .7rem; padding-left: 2.05rem; }
#etf-reviews .etf-rvw-qa-atext { color: #4b5563; line-height: 1.55; padding-top: .1rem; }
/* Round Q / A markers */
#etf-reviews .etf-rvw-qa-mark {
    flex-shrink: 0; width: 1.45rem; height: 1.45rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: #fff; line-height: 1;
}
#etf-reviews .etf-rvw-qa-mark--q { background: #4f46e5; }
#etf-reviews .etf-rvw-qa-mark--a { background: #10b981; }
/* Store answer pill */
#etf-reviews .etf-rvw-qa-store {
    display: inline-flex; align-items: center; margin-left: .4rem; padding: .05rem .45rem;
    border-radius: 999px; background: #dbeafe; color: #1e40af; font-size: .68rem; font-weight: 600;
    vertical-align: middle;
}
#etf-reviews .etf-rvw-qa-empty { color: var(--etf-muted); font-size: .85rem; padding: .5rem 0; }
/* Ask-a-question form */
#etf-reviews .etf-rvw-qa-form { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
#etf-reviews .etf-rvw-qa-input {
    flex: 1; min-width: 12rem; padding: .6rem .85rem; border: 1px solid #d1d5db; border-radius: .6rem;
    font-size: .88rem; color: #111827; background: #fff;
}
#etf-reviews .etf-rvw-qa-input:focus { outline: none; border-color: var(--etf-accent); box-shadow: 0 0 0 3px var(--etf-ring); }
#etf-reviews .etf-rvw-qa-submit {
    padding: .6rem 1.35rem; border: 0; border-radius: .6rem; background: #111827; color: #fff;
    font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
#etf-reviews .etf-rvw-qa-submit:hover { background: #030712; }
#etf-reviews .etf-rvw-qa-submit:disabled { opacity: .5; cursor: default; }

/* ---- Responsive ---- */
@media (max-width: 700px) {
    #etf-reviews { padding: 1.25rem .85rem 2rem; }
    #etf-reviews .etf-summary { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }
    #etf-reviews .etf-summary-score { border-right: 0; border-bottom: 1px solid #ececf5; padding-right: 0; padding-bottom: 1.25rem; }
    #etf-reviews .etf-rvw-card { padding: 1.1rem; }
    #etf-reviews .etf-proscons { grid-template-columns: 1fr; }
}
