/* Public reaction tally — "give a fuck" on records, "Worship" on registries.
   Styled as a stamped ledger band under the portrait stack rather than a card:
   hairline gold rules, a wide-tracked kicker flanked by seal diamonds, and the
   witty verdict line set as the centrepiece. The button is the public dare. */

.reaction-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 16px 18px;
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    background:
        linear-gradient(180deg, rgba(184, 155, 94, 0.10), rgba(184, 155, 94, 0));
    text-align: center;
}

.reaction-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--gold);
    font: 800 0.6rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.reaction-kicker::before,
.reaction-kicker::after {
    content: "\25C6"; /* ◆ — echoes the portrait record seal */
    font-size: 0.5rem;
    color: var(--gold);
    opacity: 0.7;
}

.reaction-tally {
    margin: 0;
    color: var(--cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-style: italic;
    line-height: 1.15;
}

.reaction-own-note {
    margin: 0;
    color: var(--panel-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 0.86rem;
    opacity: 0.9;
}

.reaction-button {
    margin-top: 2px;
    letter-spacing: 0.12em;
}

.reaction-button.is-active {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
}

/* Done-state badge: the deed clearly landed. */
.reaction-button.is-active::after {
    content: " \2713"; /* ✓ */
    margin-left: 6px;
    font-weight: 900;
}

/* On hover/focus the toggle owns up to being an undo, in a warning tone. */
.reaction-button.is-active.is-withdraw {
    background: var(--red);
    color: var(--cream);
    border-color: var(--red-soft);
}

.reaction-button.is-active.is-withdraw::after {
    content: none;
}

/* Honest confirmation pulse — appears on the actual round-trip, then fades. */
.reaction-flash {
    min-height: 0.9em;
    color: var(--gold);
    font: 800 0.66rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
}

.reaction-flash.is-shown {
    animation: reaction-flash 1.7s ease forwards;
}

@keyframes reaction-flash {
    0% { opacity: 0; transform: translateY(4px); }
    16% { opacity: 1; transform: translateY(0); }
    68% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-2px); }
}

.reaction-button.just-pressed {
    animation: reaction-press 0.5s ease;
}

@keyframes reaction-press {
    0% { transform: translateY(0) scale(1); box-shadow: 0 0 0 0 var(--gold-soft); }
    30% { transform: translateY(1px) scale(0.92); box-shadow: 0 0 0 6px var(--gold-soft); }
    100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 18px transparent; }
}

.reaction-note {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reaction-note-lead {
    margin: 0;
    color: var(--panel-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.reaction-note-actions {
    margin: 0;
    color: var(--panel-muted);
    font-size: 0.78rem;
}

.reaction-cta {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.reaction-cta-strong {
    text-decoration-thickness: 2px;
}

/* "Leave a mark" composer above the log. */
.message-composer {
    width: min(720px, 100%);
    margin-top: clamp(20px, 3vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-composer-input {
    width: 100%;
    min-height: 64px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.5);
    color: var(--cream);
    font: inherit;
    font-size: 0.95rem;
}

.message-composer-input:focus {
    border-color: var(--gold);
}
.message-composer-input:focus:not(:focus-visible) {
    outline: none;
}

.message-composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.message-attach {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(9, 8, 7, 0.46);
    color: var(--gold);
    cursor: pointer;
}

.message-attach img {
    width: 18px;
    height: 18px;
    filter: sepia(1) saturate(0.7) brightness(0.9);
}

.message-attach:hover,
.message-attach:focus-within {
    border-color: var(--gold);
    background: rgba(184, 155, 94, 0.14);
}

.message-composer.has-image-attachment .message-attach {
    border-color: var(--gold);
    background: var(--gold);
}

.message-composer.has-image-attachment .message-attach img {
    filter: none;
}

.message-composer.has-image-attachment .message-note {
    color: var(--gold);
}

.message-composer.has-image-attachment::after {
    content: "Image attached: " attr(data-image-name);
    display: block;
    margin-top: -4px;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.message-attach-remove {
    min-height: 44px;
    border: 0;
    padding: 0 2px;
    background: transparent;
    color: var(--panel-muted);
    font: 900 0.6rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.message-attach-remove[hidden] {
    display: none;
}

.message-attach-remove:hover,
.message-attach-remove:focus-visible {
    background: transparent;
    color: var(--red-soft);
}

.message-note {
    margin: 0;
    color: var(--panel-muted);
    font-size: 0.82rem;
}

@media (max-width: 520px) {
    .message-composer-actions .official-command {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        padding-right: 12px;
        padding-left: 12px;
    }
    .message-note {
        flex-basis: 100%;
    }
}
