/*
 * Replies to an event (components/reply.html.twig, docs/adr/0040): the
 * current user's three buttons, and the counts. Each reply has its own
 * colour and icon - green tick, amber question mark, red cross.
 */

.reply__status {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/*
 * Three equal buttons in a row, each in its reply's colour so they read as
 * the three answers; once one's chosen the others go white and it keeps its
 * colour inside a black ring (docs/adr/0112).
 */
.reply__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: 32rem;
}

.reply__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 3.25rem;
    padding: 0.4rem 0.5rem;
    border: 0.125rem solid var(--black);
    border-radius: 0.5rem;
    background-color: var(--white);
    color: var(--black);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.reply__option .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.reply__option:hover,
.reply__option:focus-visible {
    box-shadow: var(--box-shadow);
}

.reply__option:focus-visible {
    outline: 0.2rem solid var(--black);
    outline-offset: 0.15rem;
}

.reply__option--attending {
    background-color: var(--reply-attending);
}

.reply__option--maybe {
    background-color: var(--reply-maybe);
}

.reply__option--not-attending {
    background-color: var(--reply-not-attending);
}

.reply__option[aria-pressed="true"] {
    box-shadow: inset 0 0 0 0.1875rem var(--black);
}

/* The others fade back once you've replied, so your reply stands out. */
.reply__options:has([aria-pressed="true"]) .reply__option[aria-pressed="false"] {
    background-color: var(--white);
    font-weight: 400;
}

/* Narrow screens: the icon over the word, so all three fit. */
@media (max-width: 29.99rem) {
    .reply__option {
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.375rem 0.25rem;
        font-size: 0.8rem;
        line-height: 1.2;
        text-align: center;
    }
}

/* The counts: each reply's icon and colour, then how many haven't replied. */
.reply-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.reply-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem 0.125rem 0.25rem;
    border: 0.0625rem solid var(--black);
    border-radius: 999px;
    background-color: var(--white);
    color: var(--black);
}

.reply-count .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.reply-count--attending {
    background-color: var(--reply-attending);
}

.reply-count--maybe {
    background-color: var(--reply-maybe);
}

.reply-count--not-attending {
    background-color: var(--reply-not-attending);
}

.reply-count--no-reply {
    padding-left: 0.5rem;
    border-style: dashed;
}

/*
 * Your own reply on an event's card (docs/adr/0112): "Reply needed" is the
 * one that asks for something, so it's black with white words; the rest are
 * the reply's colour and icon, bigger and heavier than the counts above.
 */
.reply-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.75rem 0.2rem 0.4rem;
    border: 0.125rem solid var(--black);
    border-radius: 999px;
    background-color: var(--white);
    color: var(--black);
    font-weight: 700;
}

.reply-tag .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.reply-tag--needed {
    background-color: var(--black);
    color: var(--white);
}

.reply-tag--attending {
    background-color: var(--reply-attending);
}

.reply-tag--maybe {
    background-color: var(--reply-maybe);
}

.reply-tag--not-attending {
    background-color: var(--reply-not-attending);
}
