/* reviews.css — Review modal + form styles.
   Încărcat pe pagina de produs și în account/reviews. */

/* ---------- Modal layout — flex column: header + scrollable body + fixed footer ---------- */
#fm-modal-review {
    display:none;
    flex-direction:column;
    max-height:min(90vh, calc(100dvh - 40px));
    overflow:hidden;
}
#fm-modal-review.open { display:flex; }
#fm-modal-review .fm-head { flex-shrink:0; }
#fm-modal-review .fm-body { overflow-y:auto; flex:1; min-height:0; padding-bottom:8px; }

/* ---------- Modal header cu produs ---------- */
.fm-rev-head { gap:12px; flex-wrap:nowrap; }
.fm-rev-prod-img {
    width:44px; height:44px; border-radius:8px; object-fit:contain;
    flex-shrink:0; border:1px solid var(--border);
}
.fm-rev-prod-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; overflow:hidden; }
.fm-rev-for-lbl { font-size:11px; color:var(--muted); }
.fm-rev-prod-link {
    font-size:13px; font-weight:600; color:var(--ink);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none;
}
.fm-rev-prod-link:hover { color:var(--accent); }

/* ---------- Star rating + badge ---------- */
.fm-rev-stars-row { display:flex; align-items:center; gap:10px; }
.fm-rev-star-badge {
    font-size:12px; font-weight:600; padding:3px 11px; border-radius:20px;
    background:#dcfce7; color:#166534; white-space:nowrap;
    transition:background .15s, color .15s;
}
.fm-rev-star-badge--1 { background:#fee2e2; color:#991b1b; }
.fm-rev-star-badge--2 { background:#fef3c7; color:#92400e; }
.fm-rev-star-badge--3 { background:#e0f2fe; color:#075985; }
.fm-rev-star-badge--4 { background:#dbeafe; color:#1e40af; }
.fm-rev-star-badge--5 { background:#dcfce7; color:#166534; }

/* ---------- Title suggestions ---------- */
.fm-rev-sugs { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
.fm-rev-sugs-lbl { font-size:11px; color:var(--muted); }
.fm-rev-sug {
    font-size:12px; padding:4px 10px; border-radius:20px;
    border:1px solid var(--border); background:#f8f9fb;
    color:var(--ink); cursor:pointer;
    transition:background .15s, border-color .15s, color .15s;
}
.fm-rev-sug:hover { background:var(--accent); color:#fff; border-color:var(--accent); }

/* ---------- Complaint link ---------- */
.fm-rev-complaint { font-size:13px; color:var(--muted); margin:0 0 16px; }
.fm-rev-complaint a { color:var(--accent); text-decoration:none; }
.fm-rev-complaint a:hover { text-decoration:underline; }

/* ---------- Image upload ---------- */
.fm-rev-upload-lbl { font-size:13px; margin:0 0 8px; }
.fm-rev-opt { color:var(--muted); }
.fm-rev-dropzone {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:8px; padding:18px 12px; border:2px dashed var(--border); border-radius:10px;
    cursor:pointer; color:var(--muted); font-size:13px;
    transition:border-color .15s, background .15s, color .15s;
}
.fm-rev-dropzone:hover,
.fm-rev-dropzone:focus-visible { border-color:var(--accent); background:#fff8f5; color:var(--accent); outline:none; }

.fm-rev-imgprev { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.fm-rev-imgprev:empty { display:none; }
.fm-rev-imgprev-item {
    position:relative; width:68px; height:60px;
    border-radius:8px; overflow:hidden; border:1px solid var(--border); flex-shrink:0;
}
.fm-rev-imgprev-item img { width:100%; height:100%; object-fit:cover; display:block; }
.fm-rev-imgprev-item button {
    position:absolute; top:3px; right:3px;
    width:18px; height:18px; border-radius:50%;
    border:none; background:rgba(0,0,0,.55); color:#fff;
    font-size:13px; line-height:1; cursor:pointer; padding:0;
    display:grid; place-items:center;
}
.fm-rev-imgprev-item button:hover { background:rgba(220,38,38,.85); }

/* ---------- Terms + error + buttons ---------- */
.fm-rev-anon { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; margin:14px 0 0; cursor:pointer; }
.fm-rev-anon input { width:16px; height:16px; margin:0; accent-color:var(--accent); }
.fm-rev-terms { font-size:12px; color:var(--muted); margin:14px 0 16px; }
.fm-rev-terms a { color:var(--accent); text-decoration:none; }
.fm-rev-terms a:hover { text-decoration:underline; }

.fm-rev-err {
    font-size:13px; color:#dc2626; background:#fef2f2;
    border:1px solid #fecaca; border-radius:8px; padding:10px 12px; margin-bottom:12px;
}
.fm-rev-footer {
    flex-shrink:0;
    display:flex; gap:10px; align-items:center;
    border-top:1px solid var(--border);
    padding:14px 24px 20px;
    background:#fff;
    border-radius:0 0 16px 16px;
}
.fm-rev-footer .btn { white-space:nowrap; }
.fm-rev-footer .btn.outline { margin-right:auto; }
.fm-rev-footer .btn.primary { min-width:140px; }
/* Reset fm-close when used as full text button in footer (overrides 32px + border:0 from product.css) */
.fm-rev-footer .fm-close {
    width:auto; height:auto; font-size:inherit;
    padding:10px 18px;
    border:1px solid var(--border-strong);
    background:var(--bg-elev);
    color:var(--ink);
}

/* ---------- Pending products carousel ---------- */
.rev-pending-title { font-size:16px; font-weight:700; margin:0 0 4px; }
.rev-pending-sub { font-size:13px; color:var(--muted); margin:0 0 16px; }
.rev-carousel {
    display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory;
    scroll-behavior:smooth; padding-bottom:8px;
    scrollbar-width:thin; scrollbar-color:var(--border) transparent;
}
.rev-carousel::-webkit-scrollbar { height:4px; }
.rev-carousel::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }
.rev-card {
    flex:0 0 148px; scroll-snap-align:start;
    border:1px solid var(--border); border-radius:12px;
    padding:14px 12px; display:flex; flex-direction:column; align-items:center; gap:10px;
    text-align:center;
}
.rev-card-img {
    width:80px; height:80px; object-fit:contain; border-radius:8px;
    border:1px solid var(--border); display:block;
}
.rev-card-img--ph { background:var(--bg-body,#f3f4f6); }
.rev-card-name {
    font-size:12px; color:var(--ink); font-weight:500; flex:1;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.rev-card-btn { width:100%; font-size:12px; padding:7px 10px; }

/* ---------- Reviews list ---------- */
.rev-list-title { font-size:16px; font-weight:700; margin:0 0 16px; }
.rev-item {
    border:1px solid var(--border); border-radius:12px;
    padding:16px; margin-bottom:12px; display:flex; gap:14px; align-items:flex-start;
}
.rev-item:last-child { margin-bottom:0; }
.rev-item-img {
    width:56px; height:56px; object-fit:contain; border-radius:8px;
    border:1px solid var(--border); flex-shrink:0; display:block;
}
.rev-item-img--ph { background:var(--bg-body,#f3f4f6); }
.rev-item-body { flex:1; min-width:0; }
.rev-item-product {
    font-size:12px; color:var(--muted); margin:0 0 6px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rev-item-product-link { color:var(--muted); text-decoration:none; }
.rev-item-product-link:hover { color:var(--accent); text-decoration:underline; }
.rev-item-stars { display:flex; gap:2px; margin:0 0 6px; }
.rev-item-star { font-size:16px; color:#ddd; }
.rev-item-star.on { color:#f59e0b; }
.rev-item-title { font-size:14px; font-weight:600; color:var(--ink); margin:0 0 4px; }
.rev-item-text { font-size:13px; color:var(--muted); margin:0 0 8px; }
.rev-item-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rev-status { font-size:11px; font-weight:600; padding:2px 9px; border-radius:20px; }
.rev-status--0 { background:#fef3c7; color:#92400e; }
.rev-status--1 { background:#dcfce7; color:#166534; }
.rev-status--2 { background:#fee2e2; color:#991b1b; }
.rev-item-date { font-size:11px; color:var(--muted); }
.rev-item-gallery { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 4px; }
.rev-item-gimg { width:52px; height:52px; object-fit:cover; border-radius:6px; border:1px solid var(--border); }
.rev-item-actions { display:flex; flex-direction:column; gap:6px; flex-shrink:0; }
.rev-item-actions .btn { font-size:12px; white-space:nowrap; }
@media (max-width:540px) {
    .rev-item { flex-wrap:wrap; }
    .rev-item-actions { flex-direction:row; width:100%; }
}

/* Hide reCAPTCHA badge — disclosed in T&C per Google policy */
.grecaptcha-badge { visibility:hidden !important; }

/* Submit spinner + disabled state */
@keyframes fm-spin { to { transform: rotate(360deg); } }
.fm-spin { display:inline-block; animation:fm-spin .7s linear infinite; vertical-align:middle; margin-right:4px; }
#fm-rev-submit:disabled { opacity:.55; cursor:not-allowed; pointer-events:none; }
