/* ===================================================
   HoH Hero Rating – Styles
   =================================================== */

.hoh-rating-wrap {
    font-family: inherit;
    max-width: 480px;
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: #1e1e2e;
    border-radius: 12px;
    color: #e0e0e0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

/* ── Title ──────────────────────────────────────── */

.hoh-rating-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f5c518;
    margin-bottom: 0.75rem;
}

/* ── Star input (CSS-only radio trick) ──────────── */

.hoh-stars-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.hoh-stars-input input[type="radio"] {
    display: none;
}

.hoh-stars-input label {
    font-size: 2rem;
    color: #555;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
    line-height: 1;
    padding: 2px 3px;
}

/* Hover: colour this star and all to its right (higher value) */
.hoh-stars-input label:hover,
.hoh-stars-input label:hover ~ label {
    color: #f5c518;
    transform: scale(1.15);
}

/* Checked: colour this star and all to its right */
.hoh-stars-input input:checked ~ label {
    color: #f5c518;
}

/* After voting: disable hover effects */
.hoh-stars-input.voted label {
    cursor: default;
    pointer-events: none;
}

.hoh-stars-input.voted input:checked ~ label {
    color: #f5c518;
}

/* ── Feedback message ───────────────────────────── */

.hoh-rating-feedback {
    font-size: 0.85rem;
    color: #7dd87d;
    min-height: 1.2em;
    margin-bottom: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hoh-rating-feedback.visible {
    opacity: 1;
}

/* ── Summary block ──────────────────────────────── */

.hoh-rating-summary {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Average */
.hoh-rating-avg {
    text-align: center;
    min-width: 72px;
}

.hoh-avg-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #f5c518;
    line-height: 1;
}

.hoh-avg-stars {
    display: flex;
    justify-content: center;
    gap: 1px;
    margin: 4px 0 2px;
}

.hoh-avg-star {
    font-size: 0.9rem;
}

.hoh-avg-star.full  { color: #f5c518; }
.hoh-avg-star.half  { color: #f5c518; opacity: 0.55; }
.hoh-avg-star.empty { color: #555; }

.hoh-total-votes {
    font-size: 0.72rem;
    color: #888;
    white-space: nowrap;
}

/* Bar stats */
.hoh-rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hoh-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #aaa;
}

.hoh-bar-label {
    width: 28px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.hoh-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.hoh-bar-fill {
    height: 100%;
    background: #f5c518;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.hoh-bar-count {
    width: 22px;
    text-align: left;
    color: #888;
    flex-shrink: 0;
}

/* ── Light-mode override ────────────────────────── */

body:not(.wp-dark-mode-active) .hoh-rating-wrap {
    background: #f8f8f8;
    color: #222;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

body:not(.wp-dark-mode-active) .hoh-bar-track {
    background: rgba(0,0,0,0.1);
}

body:not(.wp-dark-mode-active) .hoh-avg-star.empty { color: #ccc; }
body:not(.wp-dark-mode-active) .hoh-stars-input label { color: #ccc; }
body:not(.wp-dark-mode-active) .hoh-bar-row { color: #555; }
body:not(.wp-dark-mode-active) .hoh-total-votes { color: #777; }
body:not(.wp-dark-mode-active) .hoh-bar-count { color: #777; }
body:not(.wp-dark-mode-active) .hoh-rating-title { color: #d4a017; }
body:not(.wp-dark-mode-active) .hoh-avg-number { color: #d4a017; }
body:not(.wp-dark-mode-active) .hoh-rating-feedback { color: #2e7d32; }
