.media-voter-track,
.media-voter-track *,
.media-voter-track *::before,
.media-voter-track *::after {
    box-sizing: border-box;
}

/* Per-placement box alignment (RKP "Alignment" option). Left = the default
   full-width block. For center/right the renderer sets an inline max-width equal
   to the image's natural width — a plain block capped by max-width (NEVER
   shrink-to-fit, which collapsed a width:100% image); margin then positions it.
   The image stays width:100% and simply fills that capped box = its natural size
   (or smaller on a narrow column). */
.media-voter-track.media-voter-align-center { margin-left: auto !important; margin-right: auto !important; }
.media-voter-track.media-voter-align-right { margin-left: auto !important; margin-right: 0 !important; }

.media-voter-track {
    --mv-green: #006616;
    --mv-green-dark: #004d12;
    --mv-green-soft: rgba(0, 102, 22, 0.11);
    --mv-green-border: rgba(0, 102, 22, 0.28);
    --mv-card-bg: rgba(235, 250, 239, 0.70);
    --mv-heart-red: #d81f26;
    --mv-muted: rgba(0, 77, 18, 0.62);
    --mv-button-bg: rgba(255, 255, 255, 0.78);
    --mv-button-hover-bg: rgba(255, 255, 255, 0.95);
    --mv-card-radius: 10px;
    --mv-input-radius: 8px;
    --mv-base-font-size: 1em;
    --mv-label-font-size: 0.88em;
    --mv-star-color: #006616;
    --mv-empty-star-color: rgba(255, 255, 255, 0.92);
    --mv-icon-outline-color: #006616;
    box-sizing: border-box;
    margin: 0.8rem 0 1rem;
    padding: 0.72rem 0.82rem 0.78rem;
    border: 1px solid var(--mv-green-border);
    border-radius: var(--mv-card-radius);
    background: var(--mv-card-bg);
    color: inherit;
    font-size: var(--mv-base-font-size);
}

.media-voter-track *,
.media-voter-track *::before,
.media-voter-track *::after {
    box-sizing: border-box;
}

.media-voter-main {
    display: flex !important;
    flex-direction: column;
    gap: 0.16rem;
    margin: 0;
    padding: 0;
    position: relative;
}
/* Download icon: top-right corner, opposite the title. */
.media-voter-download {
    position: absolute;
    top: 0;
    right: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    color: var(--mv-green, #006616);
    background: var(--mv-button-bg, rgba(255, 255, 255, 0.78));
    box-shadow: 0 0 0 1px var(--mv-green-border, rgba(0, 102, 22, 0.28));
}
.media-voter-download:hover { background: var(--mv-button-hover-bg, rgba(255, 255, 255, 0.95)); }
.media-voter-main > .media-voter-title { padding-right: 30px; }

.media-voter-title {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 600;
    line-height: 1.25;
    color: var(--mv-green-dark);
}

.media-voter-audio {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 40px;
    min-height: 40px;
    margin: 0.12rem 0 0 !important;
    padding: 0 !important;
}

.media-voter-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.46rem 0.72rem;
    margin-top: 0.52rem;
    color: var(--mv-green-dark);
}

.media-voter-actions button,
.media-voter-submit-comment {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: 999px;
    padding: 0.34rem 0.66rem;
    background: var(--mv-button-bg) !important;
    color: var(--mv-green-dark) !important;
    font: inherit;
    font-size: 0.95em;
    line-height: 1.2;
    box-shadow: none !important;
    text-decoration: none !important;
}

.media-voter-actions button:hover,
.media-voter-submit-comment:hover {
    border-color: var(--mv-green) !important;
    background: var(--mv-button-hover-bg) !important;
    color: var(--mv-green) !important;
}



/* Higher-specificity reset for icon/count-only controls.
   This overrides theme styles and the generic action-button skin in Chrome/mobile. */
.media-voter-actions .media-voter-like,
.media-voter-actions .media-voter-comment-toggle {
    padding: 0 !important;
    border: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
}

.media-voter-actions .media-voter-like:hover,
.media-voter-actions .media-voter-like:focus,
.media-voter-actions .media-voter-comment-toggle:hover,
.media-voter-actions .media-voter-comment-toggle:focus {
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.media-voter-actions .media-voter-like.is-liked .media-voter-like-icon {
    color: var(--mv-heart-red) !important;
}

.media-voter-actions .media-voter-like.is-liked .media-voter-like-icon path {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.media-voter-actions button:disabled,
.media-voter-submit-comment:disabled {
    opacity: 0.65;
    cursor: wait;
}

.media-voter-like {
    display: inline-flex !important;
    align-items: center;
    justify-self: start;
    justify-content: flex-start;
    gap: 0.42rem;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    line-height: 1;
    box-shadow: none !important;
    transition: opacity 0.16s ease, filter 0.16s ease;
}

.media-voter-like:hover,
.media-voter-like:focus {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-like:focus-visible,
.media-voter-comment-toggle:focus-visible,
.media-voter-star:focus-visible {
    outline: 1px solid var(--mv-green);
    outline-offset: 2px;
}

.media-voter-like.is-busy,
.media-voter-like:disabled {
    opacity: 0.36 !important;
    filter: grayscale(0.35);
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-like-icon,
.media-voter-comment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05em;
    height: 1.05em;
    line-height: 1;
    flex: 0 0 auto;
}

.media-voter-like-icon svg,
.media-voter-comment-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

.media-voter-like-icon {
    color: var(--mv-green);
    font-size: 1.18em;
    transition: color 0.16s ease, transform 0.16s ease;
}

.media-voter-like-icon path {
    fill: transparent;
    stroke: var(--mv-icon-outline-color);
    stroke-width: 1.9;
    stroke-linejoin: round;
}

.media-voter-like.is-liked {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
}

.media-voter-like.is-liked:hover {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
}

.media-voter-like.is-liked .media-voter-like-icon {
    color: var(--mv-heart-red) !important;
    transform: scale(1.06);
}

.media-voter-like.is-liked .media-voter-like-icon path {
    fill: currentColor;
    stroke: currentColor;
}

.media-voter-like-count,
.media-voter-comment-count {
    display: inline-flex;
    min-width: 1.25em;
    justify-content: center;
    margin-left: 0;
    font-weight: 700;
}


.media-voter-reactions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.18rem;
    justify-self: start;
    grid-column: 1 / -1;
    margin-top: -0.08rem;
}

.media-voter-reaction {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    gap: 0.18rem;
    padding: 0.04rem 0.28rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 1.15;
    font: inherit;
    font-size: 0.92em;
}

.media-voter-reaction:hover,
.media-voter-reaction:focus {
    background: var(--mv-button-bg) !important;
    outline: none;
}

.media-voter-reaction.is-active {
    background: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}

.media-voter-reaction.is-busy,
.media-voter-reaction:disabled {
    opacity: 0.45;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-reaction-icon {
    line-height: 1;
}

.media-voter-reaction-count {
    font-weight: 700;
    min-width: 0.8em;
    text-align: center;
}

.media-voter-rating {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-self: end;
    justify-content: flex-end;
    gap: 0.34rem;
    text-align: right;
}

.media-voter-rating-label {
    font-size: 0.93em;
    color: var(--mv-green-dark);
    white-space: nowrap;
}

.media-voter-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.02rem;
    white-space: nowrap;
}

.media-voter-rating .media-voter-star {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 1.05rem;
    padding: 0.1rem 0.04rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mv-empty-star-color) !important;
    font-size: 1.08rem;
    line-height: 1;
    box-shadow: none !important;
    text-shadow: var(--mv-empty-star-shadow);
}

.media-voter-rating .media-voter-star.is-active {
    color: var(--mv-star-color) !important;
    opacity: 1;
    text-shadow: none;
}

.media-voter-rating .media-voter-star:hover,
.media-voter-rating .media-voter-star:focus {
    color: var(--mv-star-color) !important;
    opacity: 1;
    outline: none;
}

.media-voter-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.93em;
    color: var(--mv-green-dark);
    white-space: nowrap;
}

.media-voter-comment-controls {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.media-voter-comment-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 0.24rem;
    white-space: nowrap;
    min-width: max-content;
    flex: 0 0 auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
}

.media-voter-comment-toggle:hover,
.media-voter-comment-toggle:focus {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-comment-icon {
    color: var(--mv-green);
    font-size: 1.08em;
}

.media-voter-comment-icon path {
    fill: transparent;
    stroke: var(--mv-icon-outline-color);
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.media-voter-comment-label,
.media-voter-no-comments,
.media-voter-comment-form-title {
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    font-weight: 400;
}

.media-voter-latest-comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
    /* A <button> sizes to its content by default and will NOT stretch to fill its
       grid column, so the excerpt would be truncated even with space to spare.
       width:100% forces the button to fill column 2. */
    width: 100%;
    flex: 1 1 auto;
    justify-content: flex-end;
    text-align: right;
}

.media-voter-comment-caret {
    font-weight: 700;
    color: var(--mv-green);
}

.media-voter-latest-comment-excerpt {
    display: block;
    min-width: 0;
    /* Grow to fill the space the button now spans (right-aligned, ellipsis on
       overflow) so the excerpt uses the full row width instead of shrinking. */
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
    text-align: right;
    /* This excerpt previews the latest comment, so it tracks the comment text
       size (not the label size) — otherwise it desyncs when "Comment text size"
       changes. The .is-empty ("No comments yet") placeholder below keeps the
       smaller label size. */
    font-size: var(--mv-comment-font-size, var(--mv-base-font-size));
}

.media-voter-latest-comment-toggle.is-empty .media-voter-latest-comment-excerpt {
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    font-weight: 400;
    opacity: 0.72;
}

.media-voter-comments {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--mv-green-border);
}

.media-voter-comments-list {
    display: grid;
    gap: 0.34rem;
    margin-bottom: 0.72rem;
}

.media-voter-comment {
    padding: 0.35rem 0 0.48rem;
    border: 0;
    border-bottom: 1px solid rgba(0, 102, 22, 0.13);
    border-radius: 0;
    background: transparent;
}

.media-voter-comment:last-child {
    border-bottom: 0;
}

.media-voter-comment-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.24rem;
    font-size: var(--mv-label-font-size);
    color: var(--mv-green-dark);
    opacity: 0.86;
}

.media-voter-comment-content {
    white-space: normal;
}

/* Defensive: keep ReactKit's box text cased as authored regardless of the host
   theme. Many themes uppercase buttons/links (comment toggle, Like, Reply, Edit,
   Delete, Send…), which leaked into the box on native posts/pages. The box never
   wants uppercase, so reset it (and letter-spacing) on the whole box. */
.media-voter-track,
.media-voter-track * {
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Progressive disclosure: keep the comment form minimal until the visitor
   actually writes something — the name / email / register / notify / remember
   controls stay hidden until the comment textarea has content (JS toggles
   .mv-has-draft on the form). */
.media-voter-comment-form:not(.mv-has-draft) [name="mv_author"],
.media-voter-comment-form:not(.mv-has-draft) .media-voter-email-row,
.media-voter-comment-form:not(.mv-has-draft) .media-voter-comment-options {
    display: none !important;
}

/* ================= Comment box typography contract =================
   Two INDEPENDENT groups, so neither text ever "follows" the other's size:

   • COMMENT text — the actual comment body AND its preview excerpt — uses the
     "Comment text size" / "Comment text color" settings
     (--mv-comment-font-size / --mv-comment-text).
   • HELPER text — the count + "comments" label (e.g. "1 comments"), author +
     date, Like / Reply / Edit / Delete, the form title, the form option labels
     ("email me…", "register", "remember me"), and the "No comments yet"
     placeholder — uses the "Helper label font size" / "Comment helper text
     color" settings (--mv-label-font-size / --mv-comment-meta).

   Every element is pinned explicitly (with the .media-voter-track prefix +
   !important) so it wins over the scattered base rules and there is no leakage
   via inheritance. Interactive :hover / .is-liked colors are declared later in
   this file and still take over on interaction. */

/* --- Comment text: size + color --- */
.media-voter-track .media-voter-comment-content,
.media-voter-track .media-voter-latest-comment-toggle:not(.is-empty) .media-voter-latest-comment-excerpt {
    font-size: var(--mv-comment-font-size, var(--mv-base-font-size)) !important;
    color: var(--mv-comment-text, inherit) !important;
}

/* --- Helper text: size (never the comment size) --- */
.media-voter-track .media-voter-comment-count,
.media-voter-track .media-voter-comment-label,
.media-voter-track .media-voter-comment-meta,
.media-voter-track .media-voter-comment-like-label,
.media-voter-track .media-voter-comment-like-count,
.media-voter-track .media-voter-comment-reply-btn,
.media-voter-track .media-voter-comment-tools button,
.media-voter-track .media-voter-comment-form-title,
.media-voter-track .media-voter-no-comments,
.media-voter-track .media-voter-latest-comment-toggle.is-empty .media-voter-latest-comment-excerpt,
.media-voter-track .media-voter-register-label,
.media-voter-track .media-voter-notify-label,
.media-voter-track .media-voter-remember-label {
    font-size: var(--mv-label-font-size) !important;
}

/* --- Helper text: resting color --- */
.media-voter-track .media-voter-comment-meta,
.media-voter-track .media-voter-comment-form-title,
.media-voter-track .media-voter-no-comments,
.media-voter-track .media-voter-comment-like,
.media-voter-track .media-voter-comment-reply-btn,
.media-voter-track .media-voter-comment-tools button,
.media-voter-track .media-voter-register-label,
.media-voter-track .media-voter-notify-label,
.media-voter-track .media-voter-remember-label {
    color: var(--mv-comment-meta, var(--mv-muted)) !important;
}

.media-voter-no-comments {
    font-style: normal;
    padding: 0.2rem 0;
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    font-weight: 400;
    opacity: 0.72;
}

.media-voter-comment-form-title {
    margin: 0 0 0.06rem;
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    font-weight: 400;
}

.media-voter-comment-form {
    display: grid;
    gap: 0.5rem;
}

.media-voter-input,
.media-voter-textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: var(--mv-input-radius);
    padding: 0.5rem 0.62rem;
    /* Field background + text are configurable per theme (Settings → Appearance:
       "Comment field background" / "Comment field text color") so they stay
       readable together. Fallbacks match the historical frosted-white field. */
    background: var(--mv-comment-input-bg, rgba(255, 255, 255, 0.82)) !important;
    color: var(--mv-comment-input-text, #1d2327) !important;
    box-shadow: none !important;
}
.media-voter-input::placeholder,
.media-voter-textarea::placeholder {
    color: var(--mv-comment-input-text, #1d2327);
    opacity: 0.55;
}

.media-voter-input:focus,
.media-voter-textarea:focus {
    border-color: var(--mv-green) !important;
    outline: 1px solid rgba(0, 102, 22, 0.2);
}

.media-voter-submit-comment {
    justify-self: start;
    background: var(--mv-green) !important;
    color: #ffffff !important;
    border-color: var(--mv-green) !important;
}

.media-voter-submit-comment:hover {
    background: var(--mv-green-dark) !important;
    color: #ffffff !important;
}


.media-voter-email-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
}

.media-voter-register-label,
.media-voter-notify-label,
.media-voter-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    font-weight: 400;
    white-space: nowrap;
}

.media-voter-register-label input,
.media-voter-notify-label input,
.media-voter-remember-label input {
    margin: 0;
}

.media-voter-comment-toggle,
.media-voter-comment-toggle:hover,
.media-voter-comment-toggle:focus,
.media-voter-like,
.media-voter-like:hover,
.media-voter-like:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}


.media-voter-comment-options {
    display: grid;
    gap: 0.28rem;
}

.media-voter-notify-label.is-disabled {
    opacity: 0.42;
}

.media-voter-notify-label.is-disabled input {
    cursor: not-allowed;
}

.media-voter-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.media-voter-error {
    padding: 0.75rem;
    border-left: 4px solid #cc1818;
    background: #fff3f3;
}

@media (max-width: 560px) {
    .media-voter-track,
.media-voter-track *,
.media-voter-track *::before,
.media-voter-track *::after {
    box-sizing: border-box;
}

.media-voter-track {
        padding: 0.65rem 0.68rem;
    }

    .media-voter-actions {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.42rem 0.6rem;
    }

    
.media-voter-reactions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.18rem;
    justify-self: start;
    grid-column: 1 / -1;
    margin-top: -0.08rem;
}

.media-voter-reaction {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    gap: 0.18rem;
    padding: 0.04rem 0.28rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 1.15;
    font: inherit;
    font-size: 0.92em;
}

.media-voter-reaction:hover,
.media-voter-reaction:focus {
    background: var(--mv-button-bg) !important;
    outline: none;
}

.media-voter-reaction.is-active {
    background: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}

.media-voter-reaction.is-busy,
.media-voter-reaction:disabled {
    opacity: 0.45;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-reaction-icon {
    line-height: 1;
}

.media-voter-reaction-count {
    font-weight: 700;
    min-width: 0.8em;
    text-align: center;
}

.media-voter-rating {
        justify-self: end;
        text-align: right;
        justify-content: flex-end;
    }

    .media-voter-comment-controls {
        grid-column: 1 / -1;
        flex-basis: 100%;
    }

    .media-voter-latest-comment-toggle {
        min-width: 0;
        max-width: 100%;
    }

    .media-voter-rating-summary {
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .media-voter-email-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .media-voter-actions {
        /* Two columns so Share keeps its right-hand slot on the reactions row. */
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .media-voter-like,

.media-voter-reactions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.18rem;
    justify-self: start;
    grid-column: 1 / -1;
    margin-top: -0.08rem;
}

.media-voter-reaction {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    gap: 0.18rem;
    padding: 0.04rem 0.28rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 1.15;
    font: inherit;
    font-size: 0.92em;
}

.media-voter-reaction:hover,
.media-voter-reaction:focus {
    background: var(--mv-button-bg) !important;
    outline: none;
}

.media-voter-reaction.is-active {
    background: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}

.media-voter-reaction.is-busy,
.media-voter-reaction:disabled {
    opacity: 0.45;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-reaction-icon {
    line-height: 1;
}

.media-voter-reaction-count {
    font-weight: 700;
    min-width: 0.8em;
    text-align: center;
}

.media-voter-rating {
        justify-self: start;
        text-align: left;
        justify-content: flex-start;
    }
}

.media-voter-comment-tools {
    display: inline-flex;
    gap: 0.45rem;
    margin-top: 0.28rem;
}

.media-voter-comment-tools button {
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    background: transparent !important;
    color: var(--mv-muted) !important;
    padding: 0 !important;
    font-size: var(--mv-label-font-size);
    line-height: 1.2;
    text-decoration: underline;
    cursor: pointer;
    box-shadow: none !important;
}

.media-voter-comment-tools button:hover,
.media-voter-comment-tools button:focus {
    color: var(--mv-green) !important;
    background: transparent !important;
    outline: none;
}

.media-voter-comment-tools button:disabled {
    opacity: 0.5;
    cursor: wait;
}


/* Media Voter v0.2.1 responsive safety fixes */
.media-voter-comment-form,
.media-voter-comment-form * {
    min-width: 0;
}

.media-voter-email-row {
    width: 100%;
}

.media-voter-comment-options {
    width: 100%;
}

.media-voter-comment-options label,
.media-voter-register-label {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
}

@media (max-width: 640px) {
    .media-voter-email-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .media-voter-register-label,
    .media-voter-notify-label,
    .media-voter-remember-label {
        display: flex;
        width: 100%;
        white-space: normal;
    }

    .media-voter-register-label input,
    .media-voter-notify-label input,
    .media-voter-remember-label input {
        flex: 0 0 auto;
        margin-top: 0.1em;
    }

    .media-voter-rating .media-voter-star {
        font-size: 1.02rem;
    }

    .media-voter-reactions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .media-voter-actions {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .media-voter-like {
        justify-self: start;
    }

    .media-voter-rating {
        justify-self: end;
        justify-content: flex-end;
        text-align: right;
    }

    .media-voter-rating-label {
        display: none;
    }

    .media-voter-reactions {
        justify-self: stretch;
    }
}

/* Media Voter 0.2.2 reaction menu */
.media-voter-reactions {
    position: relative;
}

.media-voter-reaction-more {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.45em;
    min-width: 1.45em;
    height: 1.45em;
    padding: 0 !important;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: 999px !important;
    background: var(--mv-button-bg) !important;
    color: var(--mv-green) !important;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.media-voter-reaction-more:hover,
.media-voter-reaction-more:focus {
    background: var(--mv-button-hover-bg) !important;
    outline: none;
}

.media-voter-reaction-menu {
    position: absolute;
    z-index: 20;
    left: 0;
    top: calc(100% + 4px);
    display: flex;
    flex-wrap: wrap;
    gap: 0.24rem;
    width: max-content;
    max-width: min(280px, 80vw);
    padding: 0.35rem;
    border: 1px solid var(--mv-green-border);
    border-radius: var(--mv-input-radius);
    background: var(--mv-card-bg);
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

.media-voter-reaction-menu[hidden] {
    display: none !important;
}

.media-voter-reaction-menu .media-voter-reaction {
    background: var(--mv-button-bg) !important;
}

@media (max-width: 640px) {
    .media-voter-reaction-menu {
        left: 0;
        right: auto;
        max-width: 70vw;
    }
}

/* Media Voter v0.2.3 Slack-style reaction UX
   - The old heart/like remains the primary production reaction.
   - Extra reactions are shown only when they have activity, plus a + picker. */
.media-voter-actions {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
}

.media-voter-reaction-bar {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.28rem 0.42rem;
    min-width: 0;
    max-width: 100%;
    justify-self: start;
}

.media-voter-reaction-bar .media-voter-like {
    flex: 0 0 auto;
}

.media-voter-reaction-bar .media-voter-like-count {
    min-width: 1.2em;
}

.media-voter-reactions {
    display: inline-flex !important;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.18rem;
    grid-column: auto !important;
    justify-self: start !important;
    margin: 0 !important;
    min-width: 0;
}

.media-voter-reaction-chip {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
    min-height: 1.35em;
    padding: 0.03rem 0.28rem !important;
    border: 1px solid rgba(0, 102, 22, 0.18) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.42) !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    font-size: 0.88em;
    line-height: 1.1;
}

.media-voter-reaction-chip:hover,
.media-voter-reaction-chip:focus {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-button-hover-bg) !important;
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-reaction-chip.is-active {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}

.media-voter-reaction-chip.is-summary-hidden {
    display: none !important;
}

.media-voter-reaction-chip.is-busy,
.media-voter-reaction-picker.is-busy,
.media-voter-reaction-chip:disabled,
.media-voter-reaction-picker:disabled {
    opacity: 0.45 !important;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-reaction-icon {
    line-height: 1;
}

.media-voter-reaction-count {
    font-weight: 700;
    min-width: 0.7em;
    text-align: center;
}

.media-voter-reaction-more {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.45em;
    min-width: 1.45em;
    height: 1.45em;
    padding: 0 !important;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: 999px !important;
    background: var(--mv-button-bg) !important;
    color: var(--mv-green) !important;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.media-voter-reaction-more:hover,
.media-voter-reaction-more:focus {
    background: var(--mv-button-hover-bg) !important;
    outline: none;
}

.media-voter-reaction-menu {
    position: absolute;
    z-index: 30;
    left: 0;
    top: calc(100% + 2px);
    display: block;
    width: max-content;
    max-width: min(320px, 84vw);
    padding: 0.42rem;
    border: 1px solid var(--mv-green-border);
    border-radius: var(--mv-input-radius);
    background: var(--mv-card-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.media-voter-reaction-menu[hidden] {
    display: none !important;
}

.media-voter-reaction-menu-title {
    margin: 0 0 0.28rem;
    color: var(--mv-muted);
    font-size: var(--mv-label-font-size);
    line-height: 1.2;
}

.media-voter-reaction-menu-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(1.75rem, 1fr));
    gap: 0.22rem;
}

.media-voter-reaction-picker {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    font-size: 1.08rem;
    line-height: 1;
}

.media-voter-reaction-picker:hover,
.media-voter-reaction-picker:focus,
.media-voter-reaction-picker.is-active {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-reaction-active-bg) !important;
    outline: none;
}

.media-voter-rating {
    /* Rating drops to its own row so Share can own the reactions-row right. */
    grid-column: 1 / -1;
}

.media-voter-comment-controls {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .media-voter-actions {
        /* Two columns so Share keeps its right-hand slot on the reactions row. */
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 0.36rem !important;
    }

    .media-voter-reaction-bar,
    .media-voter-rating {
        justify-self: start !important;
        justify-content: flex-start !important;
        text-align: left !important;
        width: 100%;
    }

    .media-voter-rating {
        grid-column: 1 / -1;
    }

    .media-voter-reaction-menu {
        left: 0;
        right: auto;
        max-width: min(320px, 78vw);
    }

    .media-voter-reaction-menu-grid {
        grid-template-columns: repeat(5, minmax(1.75rem, 1fr));
    }
}

@media (max-width: 420px) {
    .media-voter-reaction-menu-grid {
        grid-template-columns: repeat(4, minmax(1.75rem, 1fr));
    }
}

/* Media Voter v0.2.4: make inactive extra reaction chips visually consistent
   with the main heart reaction: active chips keep their highlighted pill,
   inactive chips show only icon + count with a transparent container. */
.media-voter-reaction-chip:not(.is-active) {
    border-color: transparent !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.media-voter-reaction-chip:not(.is-active):hover,
.media-voter-reaction-chip:not(.is-active):focus {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-button-hover-bg) !important;
    background-color: var(--mv-button-hover-bg) !important;
}

.media-voter-reaction-chip.is-active {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-reaction-active-bg) !important;
    background-color: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}


/* Media Voter v0.2.5: checkbox state clarity and comment likes */
.media-voter-register-label.is-disabled,
.media-voter-notify-label.is-disabled {
    opacity: 0.46;
    cursor: default;
}

.media-voter-register-label.is-registered {
    opacity: 0.62;
}

.media-voter-register-label.is-registered span::after {
    content: " ✓";
    font-weight: 700;
    color: var(--mv-green);
}

.media-voter-comment-footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.28rem;
}

.media-voter-comment-like {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    gap: 0.2rem;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--mv-muted) !important;
    box-shadow: none !important;
    font-size: var(--mv-label-font-size);
    line-height: 1.2;
    cursor: pointer;
}

.media-voter-comment-like:hover,
.media-voter-comment-like:focus {
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-comment-like.is-liked {
    color: var(--mv-heart-red) !important;
}

.media-voter-comment-like.is-busy,
.media-voter-comment-like:disabled {
    opacity: 0.45 !important;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-comment-like-icon {
    font-size: 1.05em;
    line-height: 1;
}

.media-voter-comment-like.is-liked .media-voter-comment-like-icon {
    font-weight: 700;
}

.media-voter-comment-like.is-liked .media-voter-comment-like-icon::before {
    content: "♥";
}

.media-voter-comment-like.is-liked .media-voter-comment-like-icon {
    color: var(--mv-heart-red) !important;
}

.media-voter-comment-like.is-liked .media-voter-comment-like-icon {
    font-size: 0;
}

.media-voter-comment-like.is-liked .media-voter-comment-like-icon::before {
    font-size: var(--mv-label-font-size);
}

.media-voter-comment-tools {
    margin-top: 0 !important;
}

/* Media Voter v0.2.6: unified reaction UX + optional UI sections */
.media-voter-actions {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
}

.media-voter-reaction-bar {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
    min-width: 0;
    max-width: 100%;
    justify-self: start;
}

.media-voter-primary-reaction.media-voter-reaction-chip,
.media-voter-reaction-chip {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-height: 1.35em;
    padding: 0.03rem 0.28rem !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    font-size: 0.92em;
    line-height: 1.1;
    text-decoration: none !important;
}

.media-voter-primary-reaction.media-voter-reaction-chip:hover,
.media-voter-primary-reaction.media-voter-reaction-chip:focus,
.media-voter-reaction-chip:hover,
.media-voter-reaction-chip:focus {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-button-hover-bg) !important;
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-primary-reaction.media-voter-reaction-chip.is-active,
.media-voter-reaction-chip.is-active {
    border-color: var(--mv-green-border) !important;
    background: var(--mv-reaction-active-bg) !important;
    background-color: var(--mv-reaction-active-bg) !important;
    color: var(--mv-green) !important;
}

/* Representative (primary) reaction with no reactions yet (count 0, not chosen):
   show the glyph colourless (grayscale) with no chip fill, so it reads as "not yet
   reacted". Full colour on hover and once chosen (.is-active). Grayscale is used
   instead of background-clip:text because the latter repaints buggily in Chrome
   (sibling icons flashed to full colour when one was clicked). */
.media-voter-primary-reaction.media-voter-reaction-chip.is-empty:not(.is-active) {
    background: transparent !important;
    background-color: transparent !important;
}
.media-voter-primary-reaction.media-voter-reaction-chip.is-empty:not(.is-active) .media-voter-reaction-icon {
    filter: grayscale(1);
    opacity: 0.5;
}
.media-voter-primary-reaction.media-voter-reaction-chip.is-empty:not(.is-active):hover .media-voter-reaction-icon {
    filter: none;
    opacity: 1;
}

/* Don't show the "0" count on an unreacted chip — only counts that matter. */
.media-voter-reaction-chip.is-empty:not(.is-active) .media-voter-reaction-count {
    /* !important so a host container can't force it back on — e.g. wpForo's
       "#wpforo #wpforo-wrap span {display:inline}" (2 IDs) would otherwise beat
       this and show the "0" on an unreacted item. */
    display: none !important;
}
/* Rating score summary hidden until there is at least one rating. */
.media-voter-rating-empty {
    display: none !important;
}

.media-voter-primary-reaction.media-voter-reaction-chip.is-busy,
.media-voter-reaction-chip.is-busy,
.media-voter-reaction-picker.is-busy,
.media-voter-primary-reaction.media-voter-reaction-chip:disabled,
.media-voter-reaction-chip:disabled,
.media-voter-reaction-picker:disabled {
    opacity: 0.45 !important;
    cursor: wait !important;
    pointer-events: none;
}

.media-voter-reaction-chip.is-summary-hidden,
.media-voter-primary-reaction.is-primary-hidden {
    display: none !important;
}

.media-voter-reactions {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.12rem;
    margin: 0 !important;
    grid-column: auto !important;
}

.media-voter-quick-reaction-menu,
.media-voter-reaction-menu {
    position: absolute;
    z-index: 40;
    left: 0;
    top: calc(100% + 2px);
    width: max-content;
    max-width: min(340px, 84vw);
    padding: 0.4rem;
    border: 1px solid var(--mv-green-border);
    border-radius: var(--mv-input-radius);
    /* Background colour + opacity come from settings (inline rgba); fallback here.
       A blur keeps it readable if the owner chooses a translucent background. */
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    backdrop-filter: blur(6px);
}

.media-voter-quick-reaction-menu[hidden],
.media-voter-reaction-menu[hidden] {
    display: none !important;
}

.media-voter-quick-reaction-grid {
    align-items: center;
}

.media-voter-quick-reaction-menu .media-voter-reaction-more {
    width: 1.85rem;
    min-width: 1.85rem;
    height: 1.85rem;
    font-size: 1rem;
}

.media-voter-voting-disabled .media-voter-reaction-bar {
    /* Stay in column 1 (not 1/-1) so the Share button keeps its column-2 slot on
       the same row. When Share is absent, column 2 is an empty "auto" track (0
       width) and column 1 (1fr) still fills the row, so nothing shifts. */
    grid-column: 1;
}

.media-voter-reactions-disabled .media-voter-rating {
    grid-column: 1 / -1 !important;
    justify-self: end !important;
}

.media-voter-reactions-disabled.media-voter-voting-disabled .media-voter-actions {
    grid-template-columns: 1fr !important;
}

/* When reactions are off, Share is the only row-1 item: keep it in the single
   column (justify-self:end still pins it right) instead of an implicit col 2. */
.media-voter-reactions-disabled .media-voter-share {
    grid-column: 1 !important;
}

.media-voter-reactions-disabled.media-voter-voting-disabled .media-voter-comment-controls {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .media-voter-actions {
        /* Two columns so Share keeps its right-hand slot on the reactions row. */
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 0.38rem !important;
    }

    .media-voter-reaction-bar,
    .media-voter-rating {
        width: 100%;
        justify-self: start !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .media-voter-reaction-menu-grid,
    .media-voter-quick-reaction-grid {
        grid-template-columns: repeat(5, minmax(1.75rem, 1fr));
    }
}

@media (max-width: 420px) {
    .media-voter-reaction-menu-grid,
    .media-voter-quick-reaction-grid {
        grid-template-columns: repeat(4, minmax(1.75rem, 1fr));
    }
}

/* Media Voter v0.2.7/0.2.8: comments toggle, safer reaction hover UX, mobile reaction opener */
.media-voter-mobile-reaction-trigger {
    appearance: none;
    -webkit-appearance: none;
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 !important;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: 999px !important;
    background: var(--mv-button-bg) !important;
    color: var(--mv-green-dark) !important;
    box-shadow: none !important;
    line-height: 1 !important;
    font-size: 0.95em;
}

.media-voter-mobile-reaction-trigger:hover,
.media-voter-mobile-reaction-trigger:focus,
.media-voter-mobile-reaction-trigger[aria-expanded="true"] {
    background: var(--mv-button-hover-bg) !important;
    border-color: var(--mv-green) !important;
    color: var(--mv-green) !important;
    outline: none;
}

.media-voter-comments-disabled .media-voter-comment-controls,
.media-voter-comments-disabled .media-voter-comments {
    display: none !important;
}

@media (max-width: 640px) {
    .media-voter-mobile-reaction-trigger {
        display: inline-flex !important;
    }

    .media-voter-reaction-bar {
        gap: 0.28rem;
    }
}


/* Media Voter v0.2.8: keep the mobile + opener at the end of the reaction row */
.media-voter-reaction-bar .media-voter-mobile-reaction-trigger {
    order: 99;
}

.media-voter-reaction-bar .media-voter-quick-reaction-menu,
.media-voter-reaction-bar .media-voter-reaction-menu {
    top: calc(100% + 2px) !important;
}

/* Media Voter v0.2.9: generic media support and refined comment actions */
.media-voter-media {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.12rem 0 0 !important;
}

.media-voter-video {
    /* !important defends the aspect ratio against hostile container CSS. In a
       wpforo forum, "#wpforo #wpforo-wrap img" forces height:inherit AND
       "...wpforo-post-content img" adds max-height:500px; combined with our
       width:100% that clamps a tall image to 500px and distorts it (only on
       wide viewports — on mobile the proportional height stays under the cap).
       Keep height auto and drop any inherited max-height so the ratio holds. */
    height: auto !important;
    max-height: none !important;
    border-radius: var(--mv-input-radius);
    background: rgba(0, 0, 0, 0.08);
}

.media-voter-image {
    /* See .media-voter-video: keep height:auto + no max-height even inside
       aggressive containers (wpforo forum) so the image never loses its ratio. */
    height: auto !important;
    max-height: none !important;
    border-radius: var(--mv-input-radius);
}

/* A specific display size (Thumbnail/Medium/Large) was chosen: show the image at
   its natural size (from the width/height attrs), capped at the container, instead
   of the default full width. "Full" keeps the full-width behavior above. */
.media-voter-image.media-voter-image-sized {
    /* align-self stops the flex parent (.media-voter-main, align-items:stretch)
       from stretching the sized image to full width despite width:auto. */
    align-self: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
}

/* Bare-link file fallback only (e.g. an external file / unrecognized YouTube URL
   rendered as <a class="media-voter-file">). The normal file card is a
   <div class="media-voter-file"> container styled below — it must NOT get this
   inline-flex badge style, or it collapses and the actions row overlaps it. */
a.media-voter-file {
    display: inline-flex !important;
    width: auto !important;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--mv-green-border);
    border-radius: var(--mv-input-radius);
    background: var(--mv-button-bg);
    color: var(--mv-green-dark) !important;
    text-decoration: none !important;
}

a.media-voter-file:hover,
a.media-voter-file:focus {
    border-color: var(--mv-green);
    background: var(--mv-button-hover-bg);
    color: var(--mv-green) !important;
}

.media-voter-comment-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.34rem;
}

.media-voter-comment-like {
    min-height: 1.65rem;
    padding: 0.1rem 0.3rem !important;
    border-radius: 999px !important;
    color: var(--mv-muted) !important;
    text-decoration: none !important;
}

.media-voter-comment-like:hover,
.media-voter-comment-like:focus {
    background: transparent !important;
    color: var(--mv-green) !important;
}

.media-voter-comment-like.is-liked {
    color: var(--mv-green) !important;
    font-weight: 600;
}

.media-voter-comment-like-label {
    font-size: var(--mv-label-font-size);
}

.media-voter-comment-like-count {
    font-size: var(--mv-label-font-size);
    font-weight: 700;
}

.media-voter-comment-tools {
    margin-left: auto !important;
    justify-content: flex-end;
    text-align: right;
}

.media-voter-editor-picker-modal[hidden] {
    display: none !important;
}

/* Media Voter v0.3.0: smooth registration UX, editor previews, and narrow container support. */
.media-voter-track {
    container-type: inline-size;
}

.media-voter-is-narrow {
    padding: 0.62rem 0.66rem 0.68rem !important;
}

.media-voter-is-narrow .media-voter-title {
    overflow-wrap: anywhere;
}

.media-voter-is-narrow .media-voter-actions {
    display: grid !important;
    /* Two columns (like the wide layout) so the Share button has a REAL column 2
       to sit in on row 1. A single-column grid would make Share's grid-column:2 an
       implicit column, and grid-column:1/-1 rows (reactions, comments) would then
       only span the explicit column — confining them and squeezing the excerpt. */
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.34rem !important;
    align-items: center !important;
}

/* Reactions stay in column 1 (beside Share) on row 1. */
.media-voter-is-narrow .media-voter-reaction-bar {
    grid-column: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: start !important;
}

/* Rating and comment controls take their own full-width rows. */
.media-voter-is-narrow .media-voter-rating,
.media-voter-is-narrow .media-voter-comment-controls {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
}

.media-voter-is-narrow .media-voter-reaction-bar {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.12rem 0.28rem !important;
}

.media-voter-is-narrow .media-voter-reactions {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.media-voter-is-narrow .media-voter-primary-reaction.media-voter-reaction-chip,
.media-voter-is-narrow .media-voter-reaction-chip {
    padding: 0.03rem 0.2rem !important;
    min-height: 1.25em !important;
}

.media-voter-is-narrow .media-voter-rating {
    display: flex !important;
    justify-content: flex-start !important;
    text-align: left !important;
    flex-wrap: wrap !important;
    gap: 0.18rem 0.3rem !important;
    line-height: 1.2 !important;
}

.media-voter-is-narrow .media-voter-rating-label,
.media-voter-is-narrow .media-voter-rating-summary,
.media-voter-is-narrow .media-voter-rating-count {
    white-space: nowrap !important;
}

.media-voter-is-narrow .media-voter-stars {
    flex: 0 0 auto !important;
}

.media-voter-is-narrow .media-voter-comment-controls {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    gap: 0.22rem 0.34rem !important;
    overflow: hidden !important;
}

.media-voter-is-narrow .media-voter-comment-toggle {
    min-width: max-content !important;
}

.media-voter-is-narrow .media-voter-latest-comment-toggle {
    min-width: 0 !important;
    max-width: 100% !important;
}

.media-voter-is-narrow .media-voter-latest-comment-excerpt {
    max-width: 100% !important;
}

.media-voter-is-narrow .media-voter-email-row,
.media-voter-is-narrow .media-voter-comment-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.34rem !important;
}

.media-voter-is-narrow .media-voter-register-label,
.media-voter-is-narrow .media-voter-notify-label,
.media-voter-is-narrow .media-voter-remember-label {
    white-space: normal !important;
    line-height: 1.25 !important;
}

.media-voter-is-narrow .media-voter-comment-footer {
    gap: 0.32rem !important;
}

/* Keep the comment metric (left) and latest-comment excerpt (right) on one row
   even in a tiny box: the excerpt column is minmax(0, 1fr) and truncates with an
   ellipsis rather than stacking below the metric. */
.media-voter-is-tiny .media-voter-comment-controls {
    grid-template-columns: max-content minmax(0, 1fr) !important;
}

.media-voter-is-tiny .media-voter-latest-comment-toggle {
    justify-content: flex-end !important;
    text-align: right !important;
}

.media-voter-is-tiny .media-voter-latest-comment-excerpt {
    text-align: right !important;
}

@container (max-width: 390px) {
    .media-voter-actions {
        grid-template-columns: 1fr !important;
        gap: 0.34rem !important;
    }

    .media-voter-reaction-bar,
    .media-voter-rating,
    .media-voter-comment-controls {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-self: stretch !important;
    }

    .media-voter-rating {
        justify-content: flex-start !important;
        text-align: left !important;
        flex-wrap: wrap !important;
    }

    .media-voter-comment-controls {
        grid-template-columns: max-content minmax(0, 1fr) !important;
    }

    .media-voter-email-row,
    .media-voter-comment-options {
        grid-template-columns: 1fr !important;
    }
}

@container (max-width: 300px) {
    /* Keep metric (left) + latest-comment excerpt (right) on one row; the excerpt
       column truncates with an ellipsis instead of stacking. */
    .media-voter-comment-controls {
        grid-template-columns: max-content minmax(0, 1fr) !important;
    }

    .media-voter-latest-comment-toggle,
    .media-voter-latest-comment-excerpt {
        justify-content: flex-end !important;
        text-align: right !important;
    }
}

/* Interaction metrics (play/view/open counts) */
.media-voter-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin-top: 8px;
    font-size: var(--mv-label-font-size, 0.88em);
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
}
.media-voter-metric {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}
.media-voter-metric-icon {
    font-size: 1.05em;
    line-height: 1;
}
.media-voter-metric-count,
.media-voter-metric-visitors-count {
    font-weight: 600;
    color: var(--mv-green-dark, #004d12);
}
.media-voter-metrics-disabled .media-voter-metrics {
    display: none;
}
.media-voter-is-tiny .media-voter-metric-label {
    display: none;
}

/* Visitor-facing loop ("Phát liên tục") toggle on audio/video players */
.media-voter-loop-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: var(--mv-label-font-size, 0.88em);
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
    cursor: pointer;
}
.media-voter-loop-toggle input {
    margin: 0;
}

/* Pending (awaiting moderation) mini comments */
.media-voter-comment-pending {
    opacity: 0.75;
    border-left: 3px solid var(--mv-muted, rgba(0, 77, 18, 0.4));
    padding-left: 8px;
}
.media-voter-comment-badge {
    display: inline-block;
    margin: 0 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.07);
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
    font-size: 0.8em;
}

/* Audio + loop toggle on one row (loop sits at the far right, after the volume) */
.media-voter-audio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.media-voter-audio-row .media-voter-audio {
    flex: 1 1 240px;
    min-width: 0;
}
.media-voter-audio-row .media-voter-loop-inline {
    margin-top: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Playlist: highlight the currently playing track */
.media-voter-track.media-voter-playing {
    box-shadow: 0 0 0 2px var(--mv-green, #006616);
}

/* Loop toggle as a compact icon-over-checkbox control (0.4.9.0) */
.media-voter-loop-toggle {
    flex-direction: column;
    gap: 2px;
}
.media-voter-loop-icon {
    font-size: 1.15em;
    line-height: 1;
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
}

/* Playlist control bar (Iter 2) */
.media-voter-playlist {
    margin: 12px 0;
    border: 1px solid var(--mv-green-border, rgba(0, 102, 22, 0.28));
    border-radius: var(--mv-card-radius, 10px);
    background: var(--mv-card-bg, rgba(235, 250, 239, 0.7));
    overflow: hidden;
}
.media-voter-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mv-green-border, rgba(0, 102, 22, 0.2));
}
.media-voter-playlist-title {
    font-weight: 600;
    color: var(--mv-green-dark, #004d12);
}
.media-voter-playlist-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.media-voter-playlist-btn {
    cursor: pointer;
    border: 1px solid var(--mv-green-border, rgba(0, 102, 22, 0.28));
    background: var(--mv-button-bg, rgba(255, 255, 255, 0.78));
    color: var(--mv-green-dark, #004d12);
    border-radius: var(--mv-input-radius, 8px);
    padding: 3px 9px;
    font-size: 1em;
    line-height: 1.4;
}
.media-voter-playlist-btn:hover {
    background: var(--mv-button-hover-bg, rgba(255, 255, 255, 0.95));
}
.media-voter-playlist-btn.mv-loop.is-active {
    /* Pressed / "loop on": accent icon + accent border + a neutral inset shadow
       (pressed-in look). The inset shadow reads as pressed on both Light and Dark
       themes, so the on/off states are clearly distinct beyond just the border. */
    background: var(--mv-reaction-active-bg, rgba(0, 102, 22, 0.12));
    border-color: var(--mv-green, #006616);
    color: var(--mv-green, #006616);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}
.media-voter-playlist-tracks {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow: auto;
}
.media-voter-playlist-track {
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--mv-green-dark, #004d12);
}
.media-voter-playlist-track::before {
    content: counter(mv-pl-idx);
    counter-increment: mv-pl-idx;
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
    min-width: 1.4em;
    text-align: right;
}
.media-voter-playlist-tracks {
    counter-reset: mv-pl-idx;
}
.media-voter-playlist-track:hover {
    background: var(--mv-button-hover-bg, rgba(255, 255, 255, 0.6));
}
.media-voter-playlist-track.is-active {
    font-weight: 600;
}
.media-voter-playlist-track.is-playing::after {
    content: "▶";
    margin-left: auto;
    color: var(--mv-green, #006616);
}

/* 0.4.10.1: loop control as an icon button (per-clip), consistent with playlist loop */
.media-voter-loop-toggle[data-action="toggle-loop"] {
    flex-direction: row;
    gap: 0;
    margin-top: 6px;
    width: auto;
    cursor: pointer;
    border: 1px solid var(--mv-green-border, rgba(0, 102, 22, 0.28));
    background: var(--mv-button-bg, rgba(255, 255, 255, 0.78));
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
    border-radius: var(--mv-input-radius, 8px);
    padding: 2px 8px;
    font-size: 1.05em;
    line-height: 1.3;
}
.media-voter-loop-toggle[data-action="toggle-loop"].media-voter-loop-inline {
    margin-top: 0;
}
.media-voter-loop-toggle[data-action="toggle-loop"]:hover {
    background: var(--mv-button-hover-bg, rgba(255, 255, 255, 0.95));
}
.media-voter-loop-toggle[data-action="toggle-loop"].is-active {
    color: var(--mv-green, #006616);
    border-color: var(--mv-green, #006616);
    background: var(--mv-reaction-active-bg, rgba(0, 102, 22, 0.12));
}

/* 0.4.10.1: make the playlist bar compact, subtler, and collapsible */
.media-voter-playlist {
    background: rgba(255, 255, 255, 0.35);
    font-size: 0.9em;
}
.media-voter-playlist-header {
    padding: 5px 10px;
    gap: 6px;
}
.media-voter-playlist-title {
    font-size: 0.95em;
}
.media-voter-playlist-caret {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--mv-muted, rgba(0, 77, 18, 0.62));
    font-size: 0.9em;
    padding: 0 4px;
    line-height: 1;
}
.media-voter-playlist-btn {
    padding: 2px 7px;
    font-size: 0.9em;
}
.media-voter-playlist.is-collapsed .media-voter-playlist-tracks {
    display: none;
}
.media-voter-playlist-tracks {
    padding: 2px 0;
    max-height: 180px;
    font-size: 0.9em;
}
.media-voter-playlist-track {
    padding: 2px 10px;
    line-height: 1.35;
}

/* 0.4.10.2: animated equalizer on the playing playlist track */
.media-voter-playlist-track.is-playing::after { content: none; }
.media-voter-eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    margin-left: auto;
}
.media-voter-playlist-track.is-playing .media-voter-eq {
    display: inline-flex;
}
.media-voter-eq i {
    display: block;
    width: 3px;
    height: 40%;
    background: var(--mv-green, #006616);
    border-radius: 1px;
    animation: media-voter-eq 0.9s ease-in-out infinite;
}
.media-voter-eq i:nth-child(2) { animation-delay: 0.3s; }
.media-voter-eq i:nth-child(3) { animation-delay: 0.6s; }
@keyframes media-voter-eq {
    0%, 100% { height: 30%; }
    50% { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .media-voter-eq i { animation: none; height: 70%; }
}

/* Comment reply threading (0.4.11.0) */
.media-voter-comment-replies {
    margin-left: 22px;
    padding-left: 10px;
    border-left: 2px solid var(--mv-green-border, rgba(0, 102, 22, 0.2));
}
.media-voter-comment-reply-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--mv-green-dark, #004d12);
    font-size: var(--mv-label-font-size, 0.88em);
    padding: 0 6px;
}
.media-voter-comment-reply-btn:hover { text-decoration: underline; }
.media-voter-reply-indicator:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: var(--mv-input-radius, 8px);
    background: var(--mv-reaction-active-bg, rgba(0, 102, 22, 0.1));
    font-size: var(--mv-label-font-size, 0.88em);
    color: var(--mv-green-dark, #004d12);
}
.media-voter-reply-cancel {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--mv-heart-red, #d81f26);
}

/* ---- Visitor subscription management ([media_voter_subscriptions]) ---- */
.media-voter-subscriptions {
    max-width: 560px;
    padding: 16px 18px;
    border: 1px solid var(--mv-green-border, #cfe3d4);
    border-radius: var(--mv-card-radius, 10px);
    background: var(--mv-card-bg, #fff);
}
.media-voter-subscriptions-title {
    margin: 0 0 8px;
    font-size: 1.1em;
}
.media-voter-subscriptions-intro {
    margin: 0 0 12px;
    color: var(--mv-muted, #6b7280);
    font-size: 0.95em;
}
.media-voter-subscriptions-error {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-left: 3px solid var(--mv-heart-red, #d81f26);
    background: #fdecec;
    color: #8a1f1f;
}
.media-voter-subscriptions-request {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.media-voter-subscriptions-email {
    flex: 1 1 220px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--mv-green-border, #cfe3d4);
    border-radius: var(--mv-input-radius, 6px);
}
.media-voter-subscriptions-submit,
.media-voter-subscription-toggle,
.media-voter-subscriptions-unsub-all {
    padding: 8px 14px;
    border: 1px solid var(--mv-green, #006616);
    border-radius: var(--mv-input-radius, 6px);
    background: var(--mv-green, #006616);
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
}
.media-voter-subscriptions-submit.is-busy,
.media-voter-subscription-toggle.is-busy,
.media-voter-subscriptions-unsub-all.is-busy {
    opacity: 0.6;
    cursor: default;
}
.media-voter-subscriptions-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.media-voter-subscription-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mv-green-border, #eef3ef);
}
.media-voter-subscription-name {
    flex: 1 1 200px;
    min-width: 0;
}
.media-voter-subscription-item:not(.is-subscribed) .media-voter-subscription-name {
    color: var(--mv-muted, #9ca3af);
}
/* Subscribed items get a neutral "unsubscribe" button; off items get a green "resubscribe". */
.media-voter-subscription-item.is-subscribed .media-voter-subscription-toggle {
    background: #fff;
    color: var(--mv-heart-red, #d81f26);
    border-color: var(--mv-heart-red, #d81f26);
}
.media-voter-subscriptions-feedback {
    margin: 10px 0 0;
    color: var(--mv-green-dark, #024b11);
    font-size: 0.9em;
    min-height: 1em;
}

/* ---- Front-end Activity Log ([media_voter_activity_log]) ---- */
.media-voter-activity-log { max-width: 100%; }
.media-voter-activity-log-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.media-voter-activity-log-filters select,
.media-voter-activity-log-filters input { padding: 6px 8px; border: 1px solid var(--mv-green-border, #cfe3d4); border-radius: var(--mv-input-radius, 6px); }
.media-voter-activity-log-filters button { padding: 6px 14px; border: 1px solid var(--mv-green, #006616); border-radius: var(--mv-input-radius, 6px); background: var(--mv-green, #006616); color: #fff; cursor: pointer; }
.media-voter-activity-log-count { color: var(--mv-muted, #6b7280); font-size: 0.9em; margin: 0 0 8px; }
.media-voter-activity-log-table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.media-voter-activity-log-table th,
.media-voter-activity-log-table td { padding: 7px 9px; border-bottom: 1px solid var(--mv-green-border, #e6efe8); text-align: left; vertical-align: top; }
.media-voter-activity-log-table thead th { border-bottom: 2px solid var(--mv-green-border, #cfe3d4); white-space: nowrap; }
.media-voter-activity-log-table code { font-size: 0.85em; }
.media-voter-activity-log-pagination { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.media-voter-activity-log-pagination .page-numbers { padding: 4px 10px; border: 1px solid var(--mv-green-border, #cfe3d4); border-radius: 6px; text-decoration: none; }
.media-voter-activity-log-pagination .page-numbers.current { background: var(--mv-green, #006616); color: #fff; border-color: var(--mv-green, #006616); }
.media-voter-activity-log-locked { padding: 16px; border: 1px solid var(--mv-green-border, #cfe3d4); border-radius: var(--mv-card-radius, 10px); background: var(--mv-card-bg, #fff); }

/* ---- Front-end activity dashboard ([media_voter_activity_log]) ---- */
.media-voter-dashboard { max-width: 100%; }
.media-voter-dashboard-notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 6px; background: #edfaef; border: 1px solid #b7e4c0; }
.media-voter-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--mv-green-border, #cfe3d4); margin: 0 0 16px; }
.media-voter-tabs .media-voter-tab { padding: 8px 16px; border: 0; background: transparent; cursor: pointer; font-size: 0.95em; color: var(--mv-muted, #5a6b5e); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.media-voter-tabs .media-voter-tab.is-active { color: var(--mv-green-dark, #024b11); border-bottom-color: var(--mv-green, #006616); font-weight: 600; }
.media-voter-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.media-voter-cards .media-voter-card { padding: 12px 14px; border: 1px solid var(--mv-green-border, #dcdcde); border-radius: 8px; background: var(--mv-card-bg, #fff); }
.media-voter-cards .num { font-size: 20px; font-weight: 600; color: var(--mv-green-dark, #1d2327); }
.media-voter-cards .lbl { color: var(--mv-muted, #646970); font-size: 12px; margin-top: 4px; }
.media-voter-top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-voter-top-card { padding: 12px 14px; border: 1px solid var(--mv-green-border, #dcdcde); border-radius: 8px; background: var(--mv-card-bg, #fff); }
.media-voter-top-card h3 { margin: 0 0 8px; font-size: 1em; }
.media-voter-top-card ol { margin: 0 0 0 18px; padding: 0; }
.media-voter-top-card li { margin: 3px 0; }
.media-voter-top-card .n { color: var(--mv-muted, #646970); }
.media-voter-comments-mod-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.media-voter-comments-mod-filters a { text-decoration: none; }
.media-voter-comments-mod-filters a.is-active { font-weight: 600; text-decoration: underline; }

/* ---- YouTube object (click-to-load facade) ---- */
.media-voter-youtube {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    padding: 0;
    border-radius: var(--mv-card-radius, 10px);
    overflow: hidden;
    background: #000;
    cursor: pointer;
}
.media-voter-youtube-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-voter-youtube-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
}
.media-voter-youtube-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 19px;
    border-color: transparent transparent transparent #fff;
}
.media-voter-youtube:hover .media-voter-youtube-play { background: #d81f26; }
.media-voter-youtube-iframe { width: 100%; height: 100%; display: block; border: 0; }
/* No aspect-ratio support (older browsers): fall back to a fixed height. */
@supports not (aspect-ratio: 1 / 1) {
    .media-voter-youtube { height: 0; padding-bottom: 56.25%; }
}

/* ---- Generic oEmbed object (Vimeo, SoundCloud, …) ---- */
.media-voter-embed { width: 100%; }
.media-voter-embed iframe { display: block; width: 100%; border: 0; border-radius: var(--mv-card-radius, 10px); }
.media-voter-embed > * { max-width: 100%; }

/* ---- Product object card ---- */
.media-voter-product { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.media-voter-product-image { flex: 0 0 auto; display: block; }
.media-voter-product-image img { display: block; max-width: 120px; height: auto; border-radius: var(--mv-card-radius, 8px); border: 1px solid var(--mv-green-border, #e6efe8); }
.media-voter-product-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1 1 140px; min-width: 0; }
.media-voter-product-price { font-size: 1.1em; font-weight: 600; color: var(--mv-green-dark, #024b11); }
.media-voter-product-price del { color: var(--mv-muted, #8a8a8a); font-weight: 400; margin-right: 6px; }
.media-voter-product-buy { display: inline-block; padding: 7px 16px; border-radius: var(--mv-input-radius, 6px); background: var(--mv-green, #006616); color: #fff; text-decoration: none; font-size: 0.95em; }
.media-voter-product-buy:hover { background: var(--mv-green-dark, #024b11); color: #fff; }

/* ---- Vote item description (generalized "vote anything" model) ---- */
.media-voter-description { margin: 4px 0 10px; color: var(--mv-green-dark, #1d2327); font-size: 0.95em; line-height: 1.5; }
.media-voter-description p { margin: 0 0 0.6em; }
.media-voter-description p:last-child { margin-bottom: 0; }

/* ---- Bound post/page reference ---- */
.media-voter-postref { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.media-voter-postref-excerpt { color: var(--mv-green-dark, #1d2327); font-size: 0.95em; line-height: 1.5; }
.media-voter-postref-link { display: inline-block; padding: 6px 14px; border: 1px solid var(--mv-green, #006616); border-radius: var(--mv-input-radius, 6px); color: var(--mv-green, #006616); text-decoration: none; font-size: 0.92em; }
.media-voter-postref-link:hover { background: var(--mv-green, #006616); color: #fff; }

/* ---- External link card ---- */
.media-voter-link { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.media-voter-link-image { flex: 0 0 auto; display: block; }
.media-voter-link-image img { display: block; max-width: 140px; height: auto; border-radius: var(--mv-card-radius, 8px); border: 1px solid var(--mv-green-border, #e6efe8); }
.media-voter-link-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1 1 140px; min-width: 0; }
.media-voter-link-desc { color: var(--mv-green-dark, #1d2327); font-size: 0.95em; line-height: 1.5; }
.media-voter-link-open { display: inline-block; padding: 6px 14px; border: 1px solid var(--mv-green, #006616); border-radius: var(--mv-input-radius, 6px); color: var(--mv-green, #006616); text-decoration: none; font-size: 0.9em; word-break: break-all; }
.media-voter-link-open:hover { background: var(--mv-green, #006616); color: #fff; }

/* ---- File card (format icon / attachment thumbnail) ---- */
.media-voter-file { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.media-voter-file-thumb-link { flex: 0 0 auto; display: block; }
.media-voter-file-thumb { display: block; max-width: 90px; height: auto; border-radius: var(--mv-card-radius, 8px); border: 1px solid var(--mv-green-border, #e6efe8); }
.media-voter-file-link { display: flex; flex: 1 1 140px; min-width: 0; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--mv-green-border, #cfe3d4); border-radius: var(--mv-input-radius, 6px); background: var(--mv-card-bg, #fff); text-decoration: none; color: var(--mv-green-dark, #024b11); }
.media-voter-file-link:hover { border-color: var(--mv-green, #006616); }
.media-voter-file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.media-voter-file-icon { font-size: 1.3em; line-height: 1; }
.media-voter-file-ext { font-size: 0.7em; font-weight: 700; letter-spacing: .03em; color: #fff; background: var(--mv-green, #006616); border-radius: 4px; padding: 1px 5px; }

/* ---- Embedded voting widgets (post/page meta box) ---- */
.media-voter-embedded { margin-top: 24px; }

/* ---- Poll (grouped options + single-choice results) ---- */
.media-voter-poll-box { margin: 12px 0; }
.media-voter-poll-question { font-weight: 600; font-size: 1.05em; margin-bottom: 4px; }
.media-voter-poll-description { margin-bottom: 10px; opacity: 0.9; }
.media-voter-poll { display: flex; flex-direction: column; gap: 8px; }
.media-voter-poll-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--media-voter-border, #d4d9dd);
    border-radius: 8px;
    background: var(--media-voter-surface, #fff);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    font: inherit;
    color: inherit;
}
.media-voter-poll-option:hover { border-color: var(--media-voter-accent, #2271b1); }
.media-voter-poll-option.is-choice {
    border-color: var(--media-voter-accent, #2271b1);
    box-shadow: inset 0 0 0 1px var(--media-voter-accent, #2271b1);
}
.media-voter-poll-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--media-voter-accent, #2271b1);
    opacity: 0.14;
    transition: width 0.3s ease;
    z-index: 0;
}
.media-voter-poll-option.is-choice .media-voter-poll-bar { opacity: 0.24; }
.media-voter-poll-option-label,
.media-voter-poll-option-stats { position: relative; z-index: 1; }
/* Option title on its own line; description below it, smaller and muted. */
.media-voter-poll-option-title { display: block; font-weight: 600; }
.media-voter-poll-option-desc { display: block; margin-top: 2px; font-size: 0.85em; font-weight: 400; opacity: 0.7; }
.media-voter-poll-option-stats { white-space: nowrap; font-variant-numeric: tabular-nums; }
.media-voter-poll-percent { font-weight: 600; }
.media-voter-poll-count { opacity: 0.7; margin-left: 4px; }
.media-voter-poll-total { font-size: 0.9em; opacity: 0.75; margin-top: 2px; }
.media-voter-poll-empty { opacity: 0.7; font-style: italic; }

/* Poll "show results after vote": hide tallies until the member interacts. */
.media-voter-poll-hide-results .media-voter-poll-bar { width: 0 !important; }
.media-voter-poll-hide-results .media-voter-poll-option-stats,
.media-voter-poll-hide-results .media-voter-poll-total { display: none; }

/* Poll "members only": read-only for guests (results still visible). */
.media-voter-poll-readonly .media-voter-poll-option { cursor: default; }
.media-voter-poll-login-note { font-size: 0.85em; opacity: 0.85; margin: 4px 0 0; }

/* Poll multiple-choice hint. */
.media-voter-poll-multi-hint { font-size: var(--mv-label-font-size); opacity: 0.8; margin: 2px 0 0; font-style: italic; }

/* Poll write-in ("Other") suggestion form. */
.media-voter-poll-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.media-voter-poll-suggest-input { flex: 1 1 160px; min-width: 120px; padding: 4px 8px; }
.media-voter-poll-suggest-msg { flex-basis: 100%; font-size: 0.82em; opacity: 0.85; }
/* Match the site Primary colour (Appearance settings). */
.media-voter-poll-suggest-btn {
    background: var(--mv-green, #006616);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
}
.media-voter-poll-suggest-btn:hover { background: var(--mv-green-dark, #00540f); }
.media-voter-poll-suggest-btn:disabled { opacity: 0.6; cursor: default; }

/* Poll open/close status notes. */
.media-voter-poll-status-note { font-size: 0.85em; margin: 4px 0 0; font-weight: 600; }
.media-voter-poll-status-closed { color: var(--mv-muted, #777); }
.media-voter-poll-status-scheduled { color: var(--mv-green, #2271b1); }
.media-voter-poll-state-scheduled .media-voter-poll-option { cursor: default; }

/* Poll "who voted": logged-in voter avatars under each option. */
.media-voter-poll-option-wrap { display: flex; flex-direction: column; gap: 2px; }
.media-voter-poll-voters { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 1px 2px 4px; min-height: 0; }
.media-voter-poll-voters:empty { display: none; }
.media-voter-poll-voter { display: inline-flex; line-height: 0; }
.media-voter-poll-voter-avatar { border-radius: 50%; width: 22px; height: 22px; box-shadow: 0 0 0 1px var(--mv-card-bg, rgba(0,0,0,0.1)); }
.media-voter-poll-voter-more { font-size: 0.8em; opacity: 0.7; align-self: center; margin-left: 2px; }
/* Don't hide the voter lists in after-vote mode (they only appear once voted). */
.media-voter-poll-hide-results .media-voter-poll-voters { display: none; }

/* ---- Post reference card: featured image, line-preserving excerpt, full ---- */
.media-voter-postref-thumb-link { display: block; margin-bottom: 8px; }
.media-voter-postref-thumb { max-width: 100%; height: auto; border-radius: 6px; display: block; }
.media-voter-postref-excerpt { white-space: normal; line-height: 1.5; }
.media-voter-postref-full { line-height: 1.6; }
.media-voter-postref-full img { max-width: 100%; height: auto; }
/* Reactions appended to a post excerpt on listing/Home pages. */
.media-voter-excerpt-reactions { margin-top: 8px; }

/* Reactions injected under media embedded in post content (level 2). */
.media-voter-media-reactions { margin: 2px 0 14px; }

/* Embedded media + its reactions row, wrapped as ONE unit (see
   Media_Voter_Embed::dom_inject_after). This makes the fix theme-independent:
   - display:flow-root establishes a BFC so the theme's <figure> margins can no
     longer separate the media from its row — we control that gap here.
   - width:fit-content shrinks the wrapper to the media's own width, so the
     reactions/share buttons hug the media's edges instead of spanning the whole
     container. Media that are naturally full width (e.g. audio bars) stay full. */
.media-voter-embedded-media {
    display: flow-root;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    margin: 1em 0 1.25em;
}
.media-voter-embedded-media > :first-child { margin: 0 !important; } /* the media */
.media-voter-embedded-media > .media-voter-media-reactions { margin: 6px 0 0 !important; }
/* Honor the media's own alignment so the wrapper sits where the media did. */
.media-voter-embedded-media.mv-align-center { margin-left: auto; margin-right: auto; }
.media-voter-embedded-media.mv-align-left { float: left; margin: 0.3em 1.5em 1em 0; }
.media-voter-embedded-media.mv-align-right { float: right; margin: 0.3em 0 1em 1.5em; }
/* Wide/full media keep their break-out width; don't shrink-wrap them. */
.media-voter-embedded-media.mv-align-wide,
.media-voter-embedded-media.mv-align-full { width: auto; max-width: none; }
/* Embedded reaction rows (under a media item or an excerpt) sit flush with the
   media — no box chrome, transparent background, tight spacing — so the icons
   read as part of the item rather than a separate framed box. */
.media-voter-media-reactions .media-voter-track,
.media-voter-excerpt-reactions .media-voter-track {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.media-voter-media-reactions .media-voter-actions,
.media-voter-excerpt-reactions .media-voter-actions {
    margin: 0 !important;
    padding: 0 !important;
}

/* Share Everything — share button + popover menu + deep-link highlight. */
/* justify-self:start + fit-content so the wrapper hugs the button instead of
   being stretched to fill its grid cell — otherwise hovering anywhere on the
   whole actions row (not just the button) would open the menu. */
.media-voter-share {
    position: relative;
    display: inline-flex;
    width: -moz-fit-content;
    width: fit-content;
    /* Share sits on the reactions row, pinned to the far right of the box. */
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
}
.media-voter-share-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 6px; cursor: pointer; font: inherit; line-height: 1;
    color: var(--mv-green, #006616);
    background: var(--mv-button-bg, rgba(255, 255, 255, 0.78));
    box-shadow: 0 0 0 1px var(--mv-green-border, rgba(0, 102, 22, 0.28));
    border: 0;
    /* !important defends the label against host containers (e.g. wpForo) that
       force uppercase / a large button font on it. */
    font-size: 0.85em !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.media-voter-share-label { text-transform: none !important; font-size: inherit !important; }
.media-voter-share-btn:hover { background: var(--mv-button-hover-bg, rgba(255, 255, 255, 0.95)); }
/* Channel menu — styled to match the reaction hover pop-up (shares its
   background/opacity setting via build_inline_css, plus the same radius,
   border, and shadow vars) so the two pop-ups look consistent. */
/* Share popover — a self-contained floating menu. Its own chrome (border,
   background) and its items' reset are defended with !important so a host theme
   or forum (e.g. wpForo, whose CSS was stripping the menu border) can't override
   them. The items include <button>s (copy/zalo/qr) alongside <a>s; without the
   appearance/background/border reset the browser/theme's default button styling
   leaks onto those three and they look different from the links. */
.media-voter-share-menu {
    position: absolute; z-index: 30; bottom: 100%; left: 0; margin-bottom: 6px; min-width: 160px;
    background: var(--mv-card-bg, #fff) !important;
    border: 1px solid var(--mv-green-border, rgba(0, 102, 22, 0.28)) !important;
    border-radius: var(--mv-input-radius, 8px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); padding: 0.42rem !important; display: flex; flex-direction: column;
}
.media-voter-share-menu .media-voter-share-item {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    display: flex !important; align-items: center; justify-content: flex-start;
    gap: 9px !important; width: 100%; margin: 0 !important;
    text-align: left; padding: 7px 10px !important; min-height: 0; line-height: normal;
    border: 0 !important; box-shadow: none !important; background: transparent !important;
    color: var(--mv-green-dark, #1d2327); text-decoration: none; cursor: pointer; font: inherit;
    border-radius: var(--mv-input-radius, 6px);
}
.media-voter-share-menu .media-voter-share-item:hover,
.media-voter-share-menu .media-voter-share-item:focus { background: var(--mv-reaction-active-bg, #f0f6fc) !important; }
.media-voter-share-item-ico { display: inline-flex; flex: 0 0 auto; width: 18px; height: 18px; }
.media-voter-share-item-ico svg { display: block; width: 100%; height: 100%; }
.media-voter-share-qr-panel { padding: 8px 10px 4px; }
.media-voter-share-qr-panel svg { display: block; width: 160px; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.media-voter-share-qr-hint { margin-top: 6px; text-align: center; font-size: 0.8em; opacity: 0.7; }
@media (max-width: 640px) {
    /* Keep Share on the reactions row (column 2, right-aligned) on mobile too —
       the actions grid stays two-column, so Share never wraps to its own line. */
    .media-voter-share-menu { left: 0; right: auto; }
}
@keyframes media-voter-deeplink-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 102, 22, 0); }
    30% { box-shadow: 0 0 0 3px var(--mv-green, rgba(0, 102, 22, 0.55)); }
}
.media-voter-track.media-voter-deeplinked { animation: media-voter-deeplink-pulse 1.3s ease 2; border-radius: 8px; }

/* Category / Tag (taxonomy term) reference box. */
.media-voter-term { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.media-voter-term-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--mv-green-border, #cfe3d4); border-radius: var(--mv-input-radius, 6px); background: var(--mv-card-bg, #fff); text-decoration: none; color: var(--mv-green-dark, #024b11); }
.media-voter-term-link:hover { border-color: var(--mv-green, #006616); }
.media-voter-term-icon { font-size: 1.2em; line-height: 1; }
.media-voter-term-name { font-weight: 600; }
.media-voter-term-count { color: var(--mv-muted, #8a8a8a); font-size: 0.9em; }
.media-voter-term-desc { color: var(--mv-green-dark, #1d2327); font-size: 0.95em; line-height: 1.5; }

/* ================= Comment action buttons (icons) =================
   Like / Reply / Edit / Delete render as small MONOCHROME icon buttons (the SVG
   inherits currentColor): muted at rest, accent on hover; Delete goes red. Send
   is a neutral translucent round icon button — visible but not loud. Authoritative
   block (declared last, .media-voter-track prefix) so it wins over the older
   scattered rules. */
.media-voter-track .media-voter-comment-like,
.media-voter-track .media-voter-comment-reply-btn,
.media-voter-track .media-voter-comment-edit,
.media-voter-track .media-voter-comment-delete {
    display: inline-flex !important;
    align-items: center;
    gap: 0.22rem;
    min-height: 0;
    padding: 0.15rem 0.32rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--mv-comment-meta, var(--mv-muted)) !important;
    cursor: pointer;
    line-height: 1;
    text-decoration: none !important;
    border-radius: 999px;
}
.media-voter-track .media-voter-comment-like svg,
.media-voter-track .media-voter-comment-reply-btn svg,
.media-voter-track .media-voter-comment-edit svg,
.media-voter-track .media-voter-comment-delete svg {
    display: block;
    width: 15px;
    height: 15px;
}
.media-voter-track .media-voter-comment-like:hover,
.media-voter-track .media-voter-comment-reply-btn:hover,
.media-voter-track .media-voter-comment-edit:hover,
.media-voter-track .media-voter-comment-like:focus-visible,
.media-voter-track .media-voter-comment-reply-btn:focus-visible,
.media-voter-track .media-voter-comment-edit:focus-visible {
    color: var(--mv-green) !important;
    background: transparent !important;
}
.media-voter-track .media-voter-comment-like.is-liked {
    color: var(--mv-green) !important;
}
.media-voter-track .media-voter-comment-delete:hover,
.media-voter-track .media-voter-comment-delete:focus-visible {
    color: var(--mv-heart-red, #d81f26) !important;
    background: transparent !important;
}
.media-voter-track .media-voter-comment-like-count {
    font-size: var(--mv-label-font-size) !important;
    font-weight: 700;
}
/* The markup now uses an SVG in .media-voter-comment-like-icon; neutralize the
   old heart-via-::before styling that assumed a text glyph. */
.media-voter-track .media-voter-comment-like-icon { font-size: inherit !important; }
.media-voter-track .media-voter-comment-like-icon::before { content: none !important; }

/* Send: neutral translucent round icon button (theme-agnostic grey tint). */
.media-voter-track .media-voter-submit-comment {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0 !important;
    border: 1px solid var(--mv-green-border) !important;
    border-radius: 999px !important;
    background: rgba(127, 127, 127, 0.14) !important;
    color: var(--mv-comment-meta, var(--mv-muted)) !important;
    box-shadow: none !important;
    cursor: pointer;
}
.media-voter-track .media-voter-submit-comment:hover,
.media-voter-track .media-voter-submit-comment:focus-visible {
    background: rgba(127, 127, 127, 0.24) !important;
    color: var(--mv-green) !important;
    border-color: var(--mv-green) !important;
}
.media-voter-track .media-voter-submit-comment svg { display: block; }

/* Inline comment edit (replaces the browser prompt): full-width textarea, with
   Save / Cancel right-aligned and styled like the neutral Send button. */
.media-voter-track .media-voter-comment-edit-form { display: block; width: 100%; margin: 0.24rem 0 0.1rem; }
.media-voter-track .media-voter-comment-edit-input { display: block; width: 100% !important; max-width: 100% !important; margin-bottom: 0.4rem; }
.media-voter-track .media-voter-comment-edit-actions { display: flex; justify-content: flex-end; gap: 0.4rem; }
.media-voter-track .media-voter-comment-edit-save,
.media-voter-track .media-voter-comment-edit-cancel {
    padding: 0.24rem 0.85rem !important;
    border-radius: 999px !important;
    border: 1px solid var(--mv-green-border) !important;
    background: rgba(127, 127, 127, 0.14) !important;
    color: var(--mv-comment-meta, var(--mv-muted)) !important;
    font-size: var(--mv-label-font-size) !important;
    cursor: pointer;
    box-shadow: none !important;
}
.media-voter-track .media-voter-comment-edit-cancel:hover,
.media-voter-track .media-voter-comment-edit-cancel:focus-visible {
    background: rgba(127, 127, 127, 0.24) !important;
    color: var(--mv-green) !important;
    border-color: var(--mv-green) !important;
}
/* Save is the primary action — give it the green accent so it stands out from
   the neutral Cancel. */
.media-voter-track .media-voter-comment-edit-save {
    background: var(--mv-green) !important;
    color: #ffffff !important;
    border-color: var(--mv-green) !important;
}
.media-voter-track .media-voter-comment-edit-save:hover,
.media-voter-track .media-voter-comment-edit-save:focus-visible {
    background: var(--mv-green-dark, var(--mv-green)) !important;
    color: #ffffff !important;
}

/* Poll option Title/Description must always stack (title above, description
   below) — a flex option row + a host/forum "span { display:inline }" rule could
   otherwise glue them together. Force a column on the label. */
.media-voter-track .media-voter-poll-option-label {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}
.media-voter-track .media-voter-poll-option-title,
.media-voter-track .media-voter-poll-option-desc {
    display: block !important;
    width: 100%;
}

/* Threaded replies: a subtle left thread-line (indent itself is an inline
   margin-left per depth level, set by the renderer). */
.media-voter-track .media-voter-comment.media-voter-comment-reply {
    border-left: 2px solid var(--mv-green-border, rgba(0, 102, 22, 0.2));
    padding-left: 0.6rem;
}
