/* Лог боя по ходам (templates/fight/_log_turns.mtpl.php): на странице боя и на странице лога, где вокруг — стили сайта. */

.fight-log {
    --log-ink: #1e2430;
    --log-muted: #6b6556;
    --log-line: #d9d2bf;
    --log-soft: #f1ece0;
    --log-red: #b3361c;
    --log-blue: #0b6fa4;
    --log-green: #2f7a3d;
    color: var(--log-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.fight-log *,
.fight-log *::before,
.fight-log *::after {
    box-sizing: border-box;
}

.fight-log__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 10px;
}

.fight-log__heading {
    margin: 0;
    color: var(--log-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.fight-log__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fight-log__filter {
    min-height: 34px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--log-line);
    border-radius: 17px;
    background: #fff;
    color: var(--log-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.fight-log__filter[aria-pressed="true"] {
    border-color: var(--log-ink);
    background: var(--log-ink);
    color: #fff;
}

.fight-log__turns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fight-log__turn {
    border: 1px solid var(--log-soft);
    border-radius: 14px;
    background: #fff;
}

.fight-log__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
}

.fight-log__head::-webkit-details-marker {
    display: none;
}

.fight-log__head::before {
    content: "▸";
    color: var(--log-muted);
    font-size: 12px;
}

.fight-log__turn[open] > .fight-log__head::before {
    content: "▾";
}

.fight-log__title {
    font-size: 15px;
    font-weight: 900;
}

.fight-log__time {
    color: var(--log-muted);
    font-size: 12px;
}

.fight-log__sum {
    margin-left: auto;
    color: var(--log-muted);
    font-size: 12px;
    font-weight: 800;
}

.fight-log__sum.is-good {
    color: var(--log-green);
}

.fight-log__sum.is-bad {
    color: var(--log-red);
}

.fight-log__rows {
    padding: 0 14px 8px;
}

.fight-log__row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px solid var(--log-soft);
    font-size: 14px;
    line-height: 1.4;
}

.fight-log__row[hidden] {
    display: none;
}

.fight-log__icon {
    flex-shrink: 0;
    align-self: flex-start;
    width: 24px;
    height: 24px;
    margin-top: -1px;
}

.fight-log__text {
    flex-grow: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

/* Строки до событий — готовым <p> со своими классами; на странице лога их ещё стилизует сайт (.ch_battle p.turn). */
.fight-log .fight-log__text p {
    margin: 0;
    padding: 0;
    text-indent: 0;
}

.fight-log__value {
    flex-shrink: 0;
    color: var(--log-muted);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.fight-log__row.is-hit .fight-log__value,
.fight-log__row.is-graze .fight-log__value {
    color: var(--log-red);
}

.fight-log__row.is-dodged .fight-log__value {
    color: var(--log-blue);
}

.fight-log__row .date {
    color: var(--log-muted);
    font-weight: 700;
}

.fight-log__row .damage {
    color: var(--log-red);
    font-weight: 800;
}

.fight-log__row .participant {
    font-weight: 700;
}

.fight-log__row .observer {
    font-style: italic;
}

.fight-log__zone {
    font-weight: 700;
}

.fight-log__me,
.fight-log b.fight-log__me {
    color: #cd1414;
}

.fight-log__empty {
    margin: 8px 0;
    color: var(--log-muted);
    font-size: 14px;
}

/* Страница лога: на телефоне блок сайта идёт от края экрана */

@media (max-width: 767px) {
    #fight-log-root .ch_battle {
        clear: both;
        float: none;
        width: auto;
    }

    #fight-log-root .fight-log {
        padding: 0 16px;
    }
}
