/* Reports UI milestone: compact summary and expandable full report. */

.battle-report-shell {
    position: relative;
    overflow: hidden !important;
    padding: 0 !important;
    border-color: rgba(128, 87, 51, 0.58) !important;
    background:
        linear-gradient(180deg, rgba(255, 230, 186, 0.035), rgba(0, 0, 0, 0.10)),
        #0a0807 !important;
}

.battle-report-shell > summary,
.battle-report-quick-summary {
    list-style: none;
}

.battle-report-shell > summary::-webkit-details-marker,
.battle-report-quick-summary::-webkit-details-marker {
    display: none;
}

.battle-report-quick-summary {
    display: grid;
    grid-template-columns: clamp(5.6rem, 6.6vw, 7.2rem) minmax(7.8rem, 10rem) minmax(17rem, 1fr) auto minmax(17rem, 1fr) minmax(8rem, 10rem) auto;
    align-items: center;
    gap: clamp(0.7rem, 1.35vw, 1.4rem);
    min-height: clamp(7.2rem, 8vw, 9.2rem);
    padding: clamp(0.8rem, 1.2vw, 1.1rem) clamp(1rem, 1.7vw, 1.65rem);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    background:
        url("/img/reports-ui/report-quick-frame.svg") center / 100% 100% no-repeat,
        linear-gradient(90deg, rgba(111, 163, 109, 0.09), transparent 25%, transparent 75%, rgba(208, 82, 69, 0.11)),
        linear-gradient(180deg, rgba(255, 230, 186, 0.07), rgba(255, 230, 186, 0.015)),
        #080706;
}

.battle-report-quick-summary:hover,
.battle-report-quick-summary:focus-visible {
    background:
        url("/img/reports-ui/report-quick-frame.svg") center / 100% 100% no-repeat,
        linear-gradient(90deg, rgba(111, 163, 109, 0.14), transparent 25%, transparent 75%, rgba(208, 82, 69, 0.16)),
        linear-gradient(180deg, rgba(255, 230, 186, 0.10), rgba(255, 230, 186, 0.025)),
        #0d0907;
}

.battle-report-quick-summary:focus-visible {
    outline: 2px solid rgba(240, 180, 90, 0.45);
    outline-offset: -2px;
}

.battle-report-shell[open] .battle-report-quick-summary {
    border-bottom-color: rgba(128, 87, 51, 0.55);
}

.report-quick-seal-frame {
    display: grid;
    place-items: center;
    width: clamp(5.2rem, 6vw, 6.7rem);
    min-width: clamp(5.2rem, 6vw, 6.7rem);
}

.report-quick-seal {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.78));
}

.report-quick-date,
.report-quick-points {
    display: grid;
    gap: 0.22rem;
    color: #f8deb1;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    line-height: 1.05;
}

.report-quick-date {
    padding-left: clamp(0.4rem, 0.8vw, 0.8rem);
    border-left: 1px solid rgba(128, 87, 51, 0.58);
}

.report-quick-points {
    justify-items: center;
    text-align: center;
    padding-inline: clamp(0.55rem, 1vw, 1rem);
    border-inline: 1px solid rgba(128, 87, 51, 0.45);
}

.report-quick-date strong,
.report-quick-points strong {
    color: #ffe8b6;
    font-family: Georgia, "Times New Roman", ui-serif, serif;
    font-size: clamp(1.08rem, 1.35vw, 1.38rem);
    font-weight: 900;
}

.report-quick-date small,
.report-quick-points small,
.report-quick-label {
    color: #c9a56d;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.report-quick-side {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    padding: clamp(0.75rem, 1vw, 1rem) clamp(1rem, 1.45vw, 1.35rem);
    border: 1px solid rgba(128, 87, 51, 0.55);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.22)),
        url("/img/reports-ui/report-player-panel-pattern.svg") center / cover,
        rgba(0, 0, 0, 0.22);
}

.report-quick-side-left {
    border-left-width: 3px;
}

.report-quick-side-right {
    border-right-width: 3px;
    text-align: right;
}

.report-quick-side.outcome-victory {
    border-color: rgba(111, 163, 109, 0.75);
    background:
        linear-gradient(180deg, rgba(111, 163, 109, 0.10), rgba(0, 0, 0, 0.18)),
        url("/img/reports-ui/report-player-panel-pattern.svg") center / cover,
        rgba(0, 0, 0, 0.22);
}

.report-quick-side.outcome-defeat {
    border-color: rgba(208, 82, 69, 0.68);
    background:
        linear-gradient(180deg, rgba(142, 30, 30, 0.13), rgba(0, 0, 0, 0.18)),
        url("/img/reports-ui/report-player-panel-pattern.svg") center / cover,
        rgba(0, 0, 0, 0.22);
}

.report-quick-side.outcome-draw {
    border-color: rgba(201, 162, 75, 0.65);
}

.report-quick-side.outcome-undetermined {
    border-color: rgba(157, 183, 196, 0.45);
}

.report-quick-combatant {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    min-width: 0;
    font-family: Georgia, "Times New Roman", ui-serif, serif;
}

.report-quick-side-right .report-quick-combatant {
    justify-content: flex-end;
}

.report-quick-combatant strong {
    color: #fff1d0;
    font-size: clamp(1.2rem, 1.75vw, 1.78rem);
    font-weight: 900;
    line-height: 1.05;
    white-space: nowrap;
}

.report-quick-combatant small {
    min-width: 0;
    overflow: hidden;
    color: #d9b06e;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(0.78rem, 0.95vw, 0.92rem);
    font-weight: 900;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-quick-score {
    display: inline-grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: clamp(0.55rem, 0.9vw, 0.85rem);
    justify-self: center;
    color: #ffe1a6;
    font-family: Georgia, "Times New Roman", ui-serif, serif;
    font-weight: 950;
}

.report-quick-score strong {
    display: inline-grid;
    place-items: center;
    min-width: clamp(3.8rem, 4.5vw, 5rem);
    min-height: clamp(3.35rem, 3.9vw, 4.35rem);
    padding: 0.15rem 0.45rem;
    border: 1px solid rgba(128, 87, 51, 0.75);
    background: rgba(0, 0, 0, 0.38);
    color: #fff1d0;
    font-size: clamp(2rem, 3vw, 3.05rem);
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 0, 0, 0.35);
}

.report-quick-score strong.outcome-victory {
    border-color: rgba(111, 163, 109, 0.72);
    color: #e6f4ce;
}

.report-quick-score strong.outcome-defeat {
    border-color: rgba(208, 82, 69, 0.68);
    color: #ffd0c8;
}

.report-quick-score strong.outcome-draw {
    border-color: rgba(201, 162, 75, 0.65);
}

.report-quick-score span {
    color: #f4ca86;
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    letter-spacing: 0.08em;
}

.report-quick-chevron {
    color: #d6a257;
    font-size: 2rem;
    line-height: 1;
    transition: transform 160ms ease;
}

.battle-report-shell[open] .report-quick-chevron {
    transform: rotate(180deg);
}

.report-quick-incomplete {
    min-width: 0;
    color: var(--muted);
}

.battle-report-expanded {
    position: relative;
    padding: clamp(1.2rem, 1.8vw, 1.7rem);
    background:
        url("/img/reports-ui/report-card-frame.svg") center / 100% 100% no-repeat,
        url("/img/reports-ui/report-full-background.svg") center / cover,
        #080706;
}

.battle-report-expanded .battle-report {
    position: relative !important;
    overflow: visible !important;
    min-height: clamp(40rem, 48vw, 53rem);
    padding-bottom: clamp(7.2rem, 9vw, 10rem);
}

.battle-report-expanded .battle-report-titlebar.report-status-titlebar {
    display: grid !important;
    grid-template-columns: minmax(17rem, 1.35fr) minmax(17rem, 1.35fr) minmax(7rem, 0.4fr) minmax(8rem, 0.45fr) auto !important;
    gap: 0 !important;
    align-items: stretch !important;
    min-height: clamp(7.2rem, 8.2vw, 9.4rem) !important;
    margin: 0 0 clamp(2rem, 2.5vw, 2.8rem) !important;
    padding: 0 !important;
    border: 1px solid rgba(128, 87, 51, 0.62) !important;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 230, 186, 0.035), rgba(0, 0, 0, 0.18)),
        rgba(8, 6, 5, 0.62) !important;
}

.battle-report-expanded .report-status-meta {
    display: contents !important;
}

.battle-report-expanded .report-status-mission-row,
.battle-report-expanded .report-status-summary {
    display: contents !important;
}

.battle-report-expanded .report-status-deployment,
.battle-report-expanded .report-status-primary-mission,
.battle-report-expanded .report-status-summary span {
    display: grid !important;
    align-content: center !important;
    justify-items: start !important;
    min-width: 0 !important;
    padding: clamp(1rem, 1.5vw, 1.45rem) clamp(1.1rem, 1.7vw, 1.75rem) !important;
    border-right: 1px solid rgba(128, 87, 51, 0.55) !important;
    color: #fff1d0 !important;
    font-family: Georgia, "Times New Roman", ui-serif, serif !important;
    font-size: clamp(1.65rem, 2.2vw, 2.55rem) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-transform: none !important;
}

.battle-report-expanded .report-status-deployment::before,
.battle-report-expanded .report-status-primary-mission::before,
.battle-report-expanded .report-status-summary span:first-child::before,
.battle-report-expanded .report-status-summary span:last-child::before {
    margin-bottom: 0.45rem;
    color: #d6a257;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.battle-report-expanded .report-status-deployment::before {
    content: "Déploiement";
}

.battle-report-expanded .report-status-primary-mission::before {
    content: "Mission";
}

.battle-report-expanded .report-status-summary span:first-child::before {
    content: "Format";
}

.battle-report-expanded .report-status-summary span:last-child::before {
    content: "Points";
}

.battle-report-expanded .report-status-primary-mission,
.battle-report-expanded .report-status-summary span:first-child,
.battle-report-expanded .report-status-summary span:last-child {
    justify-items: center !important;
    text-align: center !important;
}

.battle-report-expanded .report-status-summary span:first-child {
    font-size: clamp(1.45rem, 1.8vw, 2rem) !important;
}

.battle-report-expanded .report-status-summary span:last-child {
    font-size: clamp(1.35rem, 1.7vw, 1.85rem) !important;
    white-space: nowrap !important;
}

.battle-report-expanded .report-status-note {
    display: none !important;
}

.battle-report-expanded .battle-report-titlebar .battle-report-actions {
    position: static !important;
    grid-column: 5 !important;
    display: grid !important;
    align-items: center !important;
    justify-items: center !important;
    padding: clamp(1rem, 1.5vw, 1.45rem) !important;
}

.battle-report-expanded .battle-report-titlebar .battle-report-actions .button {
    min-width: clamp(8rem, 10vw, 11rem);
    border-color: rgba(240, 180, 90, 0.56) !important;
    color: #ffe1a6 !important;
}

.battle-report-expanded .report-status-seal {
    position: absolute !important;
    left: 50% !important;
    top: clamp(34rem, 40vw, 43rem) !important;
    width: clamp(10rem, 13vw, 14rem) !important;
    height: auto !important;
    transform: translateX(-50%) !important;
    z-index: 25 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.82)) !important;
}

.battle-report-expanded .team-matchup-table {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(7.5rem, 9vw, 9.6rem) minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: clamp(0.7rem, 1vw, 1rem) clamp(1.1rem, 1.6vw, 1.7rem) !important;
    align-items: stretch !important;
    min-height: clamp(24rem, 30vw, 34rem) !important;
    margin-bottom: clamp(3rem, 4vw, 4.2rem) !important;
}

.battle-report-expanded .team-matchup-header {
    min-height: clamp(8rem, 9vw, 10.5rem) !important;
    padding: clamp(1.2rem, 1.7vw, 1.75rem) !important;
    background:
        linear-gradient(180deg, rgba(255, 230, 186, 0.035), rgba(0, 0, 0, 0.16)),
        rgba(0, 0, 0, 0.18) !important;
}

.battle-report-expanded .team-matchup-header.team-matchup-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.battle-report-expanded .team-matchup-header.team-matchup-right {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

.battle-report-expanded .team-header-main {
    height: 100%;
    align-items: center !important;
}

.battle-report-expanded .team-title-line strong {
    color: #fff1d0;
    font-size: clamp(2.1rem, 3vw, 3.35rem);
    line-height: 1;
}

.battle-report-expanded .team-score-badge {
    min-width: clamp(4.8rem, 5.5vw, 6.2rem) !important;
    min-height: clamp(4.4rem, 5.2vw, 5.8rem) !important;
    border-color: rgba(240, 180, 90, 0.55) !important;
    background: rgba(0, 0, 0, 0.34) !important;
}

.battle-report-expanded .team-score-badge strong {
    font-size: clamp(2.6rem, 4vw, 4.4rem) !important;
}

.battle-report-expanded .team-matchup-vs-header {
    grid-column: 2 !important;
    grid-row: 1 / span 3 !important;
    display: grid !important;
    place-items: center !important;
    align-self: stretch !important;
    padding-top: clamp(4rem, 6vw, 6rem) !important;
    border: 1px solid rgba(128, 87, 51, 0.62) !important;
    background:
        url("/img/reports-ui/report-vs-column.svg") center / cover,
        linear-gradient(180deg, #100706, #090504) !important;
}

.battle-report-expanded .team-matchup-vs-header span {
    color: #ffe1a6 !important;
    font-size: clamp(2.4rem, 4vw, 4.4rem) !important;
    text-shadow: 0 0 22px rgba(240, 180, 90, 0.22), 0 2px 0 #000 !important;
}

.battle-report-expanded .team-player-cell {
    align-self: stretch !important;
}

.battle-report-expanded .team-player-card {
    min-height: clamp(12rem, 13vw, 15.5rem) !important;
    height: 100% !important;
    padding: clamp(1.1rem, 1.6vw, 1.6rem) clamp(1.3rem, 2vw, 2rem) !important;
    border-color: rgba(128, 87, 51, 0.55) !important;
    background:
        linear-gradient(180deg, rgba(255, 230, 186, 0.025), rgba(0, 0, 0, 0.20)),
        url("/img/reports-ui/report-player-panel-pattern.svg") center / cover,
        rgba(0, 0, 0, 0.18) !important;
}

.battle-report-expanded .team-player-card-left {
    grid-template-columns: minmax(0, 1fr) clamp(8rem, 9vw, 10.5rem) !important;
}

.battle-report-expanded .team-player-card-right {
    grid-template-columns: clamp(8rem, 9vw, 10.5rem) minmax(0, 1fr) !important;
}

.battle-report-expanded .team-player-card .faction-emblem-frame {
    width: clamp(7rem, 8vw, 9.4rem) !important;
    height: clamp(7rem, 8vw, 9.4rem) !important;
    border-radius: 50% !important;
}

.battle-report-expanded .team-player-card .faction-emblem {
    max-width: 100% !important;
    max-height: 100% !important;
}

.battle-report-expanded .team-player-card .combatant-topline strong {
    color: #fff1d0 !important;
    font-size: clamp(1.65rem, 2.4vw, 2.75rem) !important;
    line-height: 1.05 !important;
}

.battle-report-expanded .team-player-card .faction-name {
    margin-top: 0.6rem !important;
    color: #ffd990 !important;
    font-size: clamp(0.88rem, 1vw, 1.05rem) !important;
}

.battle-report-expanded .team-player-card .muted {
    font-size: clamp(0.95rem, 1.2vw, 1.25rem) !important;
}

.battle-report-expanded .battle-roster-details {
    min-height: clamp(7rem, 8vw, 9rem);
    padding-top: clamp(3.2rem, 4vw, 4.5rem);
    border: 1px solid rgba(128, 87, 51, 0.5);
    background:
        linear-gradient(180deg, rgba(255, 230, 186, 0.025), rgba(0, 0, 0, 0.24)),
        rgba(0, 0, 0, 0.18);
}

.battle-report-expanded .battle-roster-details > summary {
    justify-content: center;
    border-top: 0 !important;
    color: #f4ca86 !important;
    letter-spacing: 0.18em !important;
}

.battle-report-incomplete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 1180px) {
    .battle-report-quick-summary {
        grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
    }

    .report-quick-date,
    .report-quick-points {
        display: none;
    }

    .battle-report-expanded .battle-report-titlebar.report-status-titlebar {
        grid-template-columns: 1fr 1fr;
    }

    .battle-report-expanded .battle-report-titlebar .battle-report-actions {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 760px) {
    .battle-report-quick-summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .report-quick-side-right,
    .report-quick-score {
        display: none;
    }
}
