/* css/loglinevotes.css
 *
 * Thumbs on a logline, for the people an author shared with.
 *
 * Namespaced .ll- so it can sit inside the AI widget (.ai-) and inside an idea
 * (.idea-) without either having to know about it. Its own file for the same
 * reason the script is: an idea has loglines whether or not the AI was ever
 * involved, and this has to work in both places unchanged.
 */

.ll-votes {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border, #e2e2e2);
}

/* ------------------------------------------------------------- casting one */

.ll-votes-cast {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ll-vote-ask {
    font-size: 0.85rem;
    color: var(--text-soft, #6b6b6b);
}

.ll-vote-btns {
    display: inline-flex;
    gap: 4px;
}

.ll-vote-btns button {
    padding: 3px 9px;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 6px;
    background: var(--bg-white, #fff);
    color: var(--text-muted, #8a8a8a);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.ll-vote-btns button:hover {
    background: var(--bg-light, #f6f6f6);
    color: var(--text-dark, #333);
}

.ll-vote-up.is-on {
    color: var(--logo-green, #2e7d5b);
    border-color: var(--logo-green, #2e7d5b);
}

.ll-vote-down.is-on {
    color: var(--danger, #b4462f);
    border-color: var(--danger, #b4462f);
}

/* The box appears only after a thumb, so it takes the full width of the row it
   lands in rather than squeezing in beside the buttons. */
.ll-vote-say {
    flex: 1 0 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.ll-vote-label {
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #222);
}

.ll-vote-optional {
    font-weight: 400;
    font-style: italic;
    color: var(--text-soft, #6b6b6b);
}

.ll-vote-say .grow-wrap > textarea,
.ll-vote-say .grow-wrap::after {
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 6px 9px;
    border-radius: 6px;
    font-family: inherit;
    min-height: 2.2em;
}

.ll-vote-say .grow-wrap > textarea:focus {
    outline: none;
    border-color: var(--logo-green, #2e7d5b);
}

/* Holds its line whether or not it has anything to say, so nothing below jumps
   when a save reports back. */
.ll-vote-state {
    display: block;
    min-height: 1.1em;
    margin-top: 4px;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted, #8a8a8a);
}

/* -------------------------------------------------------------- reading them */

.ll-vote-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    color: var(--text-soft, #6b6b6b);
    cursor: pointer;
    text-align: left;
}

.ll-tally-up {
    color: var(--logo-green, #2e7d5b);
    font-weight: 600;
}

.ll-tally-down {
    color: var(--danger, #b4462f);
    font-weight: 600;
}

.ll-tally-who {
    flex: 1;
}

.ll-tally-chevron {
    font-size: 0.75rem;
}

.ll-vote-list {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.ll-vote-one {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid var(--border, #eee);
}

.ll-vote-one:first-child {
    border-top: 0;
}

.ll-vote-mark {
    flex: none;
    font-size: 0.8rem;
    padding-top: 2px;
}

.ll-vote-mark.ll-vote-up {
    color: var(--logo-green, #2e7d5b);
}

.ll-vote-mark.ll-vote-down {
    color: var(--danger, #b4462f);
}

.ll-vote-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ll-vote-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #222);
}

.ll-vote-text {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-dark, #333);
}

.ll-vote-when {
    font-size: 11px;
    color: var(--text-muted, #8a8a8a);
}

/* Said about wording that has since changed ------------------------------- */

.ll-vote-toggle-stale {
    color: var(--text-muted, #8a8a8a);
    font-style: italic;
}

.ll-vote-one.is-stale {
    opacity: .8;
}

.ll-vote-subject {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted, #8a8a8a);
}

.ll-vote-clear {
    margin-top: 6px;
    padding: 3px 10px;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 6px;
    background: var(--bg-white, #fff);
    font-size: 0.8rem;
    color: var(--text-muted, #8a8a8a);
    cursor: pointer;
}

.ll-vote-clear:hover {
    color: var(--danger, #b4462f);
    border-color: var(--danger, #b4462f);
}

/* Why a reader's thumb is blank on a logline they remember rating. */
.ll-vote-was {
    flex: 1 0 100%;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted, #8a8a8a);
}

/* Inside an idea -----------------------------------------------------------

   .idea-text is a flex line: the writing takes the slack, the date and the
   buttons sit at the right of it. The strip is not part of that line -- it is
   a reaction to the whole of it -- so it claims the full width and wraps onto
   its own row. Without this the thumbs sit beside the logline as if they were
   another button belonging to it. */
.idea-text > .ll-votes {
    flex: 1 0 100%;
    margin-top: 6px;
}
