/* ── Wrapper ─────────────────────────────────────────────────────── */
.trueads-reviews { margin: 40px 0; font-family: inherit; }
.trueads-reviews .woocommerce-Reviews-title { font-size: 1.3em; margin: 0 0 20px; }

/* ── Summary bar ─────────────────────────────────────────────────── */
.trueads-summary {
    display: flex; align-items: center; gap: 28px;
    padding: 20px 24px; background: #f8f9fa;
    border: 1px solid #e9ecef; border-radius: 6px; margin-bottom: 28px;
}
.trueads-avg-wrap  { text-align: center; flex-shrink: 0; }
.trueads-avg-score { font-size: 48px; font-weight: 700; line-height: 1; color: #333; }
.trueads-avg-count { font-size: 13px; color: #767676; margin-top: 4px; }
.trueads-dist      { flex: 1; }
.trueads-dist-row  { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 13px; color: #555; }
.trueads-dist-label    { min-width: 32px; }
.trueads-dist-bar-wrap { flex: 1; height: 7px; background: #ddd; border-radius: 4px; overflow: hidden; }
.trueads-dist-bar      { height: 100%; background: #e2401c; border-radius: 4px; transition: width .4s ease; }
.trueads-dist-count    { min-width: 20px; text-align: right; color: #999; font-size: 12px; }

/* ── Stars display (unicode ★) ───────────────────────────────────── */
.trueads-star-display { display: inline-flex; line-height: 1; }
.trueads-star-display span { font-size: 17px; }
.trueads-star-display .sf  { color: #e2401c; }
.trueads-star-display .se  { color: #ddd; }

/* ── Review list (WC .commentlist style) ─────────────────────────── */
.trueads-reviews .commentlist { margin: 0; padding: 0; list-style: none; }
.trueads-reviews .commentlist .comment_container {
    display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e9ecef;
}
.trueads-reviews .commentlist li:last-child .comment_container { border-bottom: none; }
.trueads-reviews .comment_container img.avatar {
    width: 60px !important; height: 60px !important; border-radius: 50%; flex-shrink: 0;
}
.trueads-reviews .comment-text { flex: 1; min-width: 0; }
.trueads-reviews p.meta        { margin: 0 0 6px; font-size: 13px; color: #767676; }
.trueads-reviews .woocommerce-review__author   { font-weight: 600; color: #333; font-size: 14px; }
.trueads-reviews .woocommerce-review__dash     { margin: 0 4px; }
.trueads-reviews .woocommerce-review__timestamp { font-size: 12px; }
.trueads-reviews .woocommerce-review__verified {
    display: inline-block; font-size: 11px; color: #43A047;
    background: #e8f5e9; padding: 1px 8px; border-radius: 99px;
    font-style: normal; margin-left: 6px; font-weight: 500;
}
.trueads-reviews .description   { font-size: 14px; line-height: 1.6; color: #444; margin-top: 6px; }
.trueads-reviews .description p { margin: 0; }

/* ── Loading / empty ─────────────────────────────────────────────── */
.trueads-loading { padding: 24px; text-align: center; color: #999; font-size: 14px; }
.trueads-empty   { padding: 30px; text-align: center; color: #999; }

/* ── Pagination ──────────────────────────────────────────────────── */
.trueads-pagination { display: flex; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.trueads-page-btn {
    padding: 5px 12px; border: 1px solid #ddd; border-radius: 4px;
    background: #fff; cursor: pointer; font-size: 13px; color: #555; transition: all .15s;
}
.trueads-page-btn:hover  { border-color: #a00; color: #a00; }
.trueads-page-btn.active { background: #a00; color: #fff; border-color: #a00; }

/* ── Form wrapper ────────────────────────────────────────────────── */
.trueads-reviews #review_form_wrapper { margin-top: 32px; }
.trueads-reviews #review_form h3      { font-size: 1.2em; margin: 0 0 16px; }
.trueads-reviews .comment-form-rating { margin-bottom: 16px; }
.trueads-reviews .comment-form-rating > label,
.trueads-reviews .comment-form-comment > label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #333;
}

/* ── Star INPUT (radio + unicode ★, CSS-only) ────────────────────── */
.trueads-star-input {
    display: inline-flex;
    flex-direction: row-reverse; /* đảo chiều để CSS :hover ~ label hoạt động */
    gap: 2px;
    margin-top: 4px;
}
.trueads-star-input input[type="radio"] { display: none; }
.trueads-star-input label {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    line-height: 1;
    transition: color .1s;
}
/* Hover: tô màu label đang hover VÀ tất cả label sau nó (bên trái) */
.trueads-star-input label:hover,
.trueads-star-input label:hover ~ label { color: #e2401c; }
/* Checked: tô màu tất cả label từ checked trở về trước (bên trái) */
.trueads-star-input input:checked ~ label { color: #e2401c; }

/* ── Textarea ─────────────────────────────────────────────────────── */
.trueads-reviews .comment-form-comment textarea {
    width: 100%; border: 1px solid #ddd; border-radius: 4px;
    padding: 10px 12px; font-size: 14px; resize: vertical;
    min-height: 100px; box-sizing: border-box; font-family: inherit; color: #333;
}
.trueads-reviews .comment-form-comment textarea:focus {
    border-color: #a00; outline: none; box-shadow: 0 0 0 2px rgba(170,0,0,.12);
}

/* ── Submit button ───────────────────────────────────────────────── */
.trueads-reviews .form-submit { margin-top: 12px; }
.trueads-reviews .form-submit input[type="submit"] {
    background: #a00; color: #fff; border: none;
    padding: 10px 24px; border-radius: 4px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s;
    text-transform: uppercase; letter-spacing: .5px;
}
.trueads-reviews .form-submit input[type="submit"]:hover    { background: #800; }
.trueads-reviews .form-submit input[type="submit"]:disabled { background: #aaa; cursor: not-allowed; }

/* ── Messages ────────────────────────────────────────────────────── */
.trueads-msg { margin-top: 12px; font-size: 13px; padding: 10px 14px; border-radius: 4px; display: none; }
.trueads-msg.success { background: #e8f5e9; color: #2e7d32; display: block; border: 1px solid #c8e6c9; }
.trueads-msg.error   { background: #fdecea; color: #c62828; display: block; border: 1px solid #ffcdd2; }

/* ── Login prompt ────────────────────────────────────────────────── */
.trueads-login-prompt {
    padding: 24px; background: #f8f9fa; border: 1px solid #e9ecef;
    border-radius: 4px; margin-top: 32px; font-size: 14px; color: #555;
}
.trueads-login-prompt a { color: #a00; }

@media (max-width: 600px) {
    .trueads-summary { flex-direction: column; gap: 12px; }
    .trueads-avg-wrap { display: flex; align-items: center; gap: 12px; }
    .trueads-star-input label { font-size: 28px; }
}
