.wtfto-reaction-box {
    margin: 8px 0 10px;
    padding: 0;
    text-align: left;
    color: inherit;
    clear: both;
    background: transparent;
    border: 0;
}

.wtfto-reaction-prompt {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 800;
    opacity: 0.9;
}

.wtfto-reaction-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    overflow: visible;
}

.wtfto-reaction-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: transform 150ms ease, opacity 150ms ease, background 150ms ease, border-color 150ms ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.wtfto-reaction-button:hover,
.wtfto-reaction-button:focus {
    transform: translateY(-1px);
    outline: none;
    border-color: var(--wtfto-reaction-accent, #c90000);
    background: rgba(201,0,0,0.18);
}

.wtfto-reaction-button:focus-visible {
    outline: 2px solid rgba(255,255,255,0.85);
    outline-offset: 3px;
}

.wtfto-reaction-button.is-voted,
.wtfto-reaction-button:disabled {
    cursor: default;
    opacity: 0.85;
    transform: none;
}

.wtfto-reaction-button.is-selected {
    border-color: var(--wtfto-reaction-accent, #c90000);
    background: rgba(201,0,0,0.22);
}

.wtfto-reaction-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.wtfto-reaction-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,0.26);
    font-size: 0.82rem;
    font-weight: 900;
}

.wtfto-reaction-message {
    display: inline-block;
    margin: 7px 0 0;
    min-height: 1em;
    font-size: 0.78rem;
    opacity: 0.75;
}

/* Mobile: force all four reactions across one row. */
@media (max-width: 600px) {
    .wtfto-reaction-box {
        margin: 10px 0 8px;
        width: 100%;
        max-width: 100%;
    }

    .wtfto-reaction-list {
        display: flex;
        flex-wrap: nowrap !important;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        overflow: visible;
    }

    .wtfto-reaction-button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 34px;
        padding: 6px 5px;
        gap: 4px;
        border-radius: 999px;
    }

    .wtfto-reaction-emoji {
        font-size: 1.02rem;
    }

    .wtfto-reaction-count {
        min-width: 19px;
        padding: 2px 5px;
        font-size: 0.74rem;
    }

    .wtfto-reaction-message {
        display: block;
        margin: 6px 0 0;
    }
}

/* Extra narrow Android screens. */
@media (max-width: 390px) {
    .wtfto-reaction-list {
        gap: 4px;
    }

    .wtfto-reaction-button {
        padding: 5px 4px;
        gap: 3px;
        min-height: 32px;
    }

    .wtfto-reaction-emoji {
        font-size: 0.95rem;
    }

    .wtfto-reaction-count {
        min-width: 18px;
        padding: 2px 4px;
        font-size: 0.7rem;
    }
}

/* v0.6.2: keep the placed reaction row visible after late template scripts finish. */
.wtfto-reaction-box[data-wtfto-reaction-placed="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}


/* v0.6.2: unified pill layout for regular WTFTO stories and Then vs Now stories. */
.single-post .wtfto-reaction-box,
.single-wtfto_story .wtfto-reaction-box,
.single-then_now .wtfto-reaction-box,
.wtfto-then-vs-now-page .wtfto-reaction-box {
    margin: 0.85rem 0 0.75rem !important;
    padding: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.single-post .wtfto-reaction-list,
.single-wtfto_story .wtfto-reaction-list,
.single-then_now .wtfto-reaction-list,
.wtfto-then-vs-now-page .wtfto-reaction-list {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.single-post .wtfto-reaction-button,
.single-wtfto_story .wtfto-reaction-button,
.single-then_now .wtfto-reaction-button,
.wtfto-then-vs-now-page .wtfto-reaction-button {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.single-post .wtfto-reaction-count,
.single-wtfto_story .wtfto-reaction-count,
.single-then_now .wtfto-reaction-count,
.wtfto-then-vs-now-page .wtfto-reaction-count {
    line-height: 1 !important;
}

@media (max-width: 600px) {
    .single-post .wtfto-reaction-list,
    .single-wtfto_story .wtfto-reaction-list,
    .single-then_now .wtfto-reaction-list,
    .wtfto-then-vs-now-page .wtfto-reaction-list {
        gap: 5px !important;
    }

    .single-post .wtfto-reaction-button,
    .single-wtfto_story .wtfto-reaction-button,
    .single-then_now .wtfto-reaction-button,
    .wtfto-then-vs-now-page .wtfto-reaction-button {
        flex: 1 1 0 !important;
        padding: 6px 4px !important;
        gap: 3px !important;
    }
}


/* v0.3.2 — reaction accessibility labels.
   Keeps counts visible, but prevents the public text from reading as loose raw numbers. */
.wtfto-reaction-count-label.screen-reader-text{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
