/* Public Battle Log pages. Builds on the site's styles.css (same colours, type and cards). */

nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-underline-offset: 5px; }

.bl-title { font-size: clamp(2.4rem, 5.2vw, 3.6rem); letter-spacing: -1.6px; line-height: 1.08; }
.bl-title em { font-family: Georgia, "Times New Roman", serif; color: var(--blue); font-weight: 400; letter-spacing: -1.2px; }
.bl-muted { color: var(--muted); font-weight: 400; font-size: .6em; letter-spacing: 0; }
.report-meta a { text-decoration: underline; text-underline-offset: 3px; }

/* list & team pages */
.battle-hero h1 { overflow-wrap: anywhere; }
.bl-team-hero .battle-hero-inner { grid-template-columns: 1fr; }
.bl-team-hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
.bl-team-hero p:not(.report-meta) { max-width: 40rem; }
.bl-list-title { margin-bottom: 1.25rem; }
.bl-teams { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.bl-teams-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.bl-teams .report-teams { margin: .75rem 0 0; }
.bl-teams .report-teams a { font-size: 14px; line-height: 1.3; }
.bl-teams .report-teams a:hover { background: #e3edf4; }
.bl-teams .report-teams a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.bl-count { opacity: .7; font-variant-numeric: tabular-nums; margin-left: .2rem; }
.bl-past { border: 0; margin-top: .4rem; }
.bl-past > summary { display: inline-flex; padding: .6rem 0 0; font-size: 14px; color: var(--blue); gap: .5rem; }
.bl-past > summary::after { margin-left: .25rem; font-size: 18px; }
.report-card h3 a:hover, .report-card h4 a:hover { color: var(--blue); }
.report-card-body > p:not(.report-meta) { font-size: 15px; line-height: 1.7; margin-bottom: .9rem; }
.report-card { display: flex; flex-direction: column; }
.report-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.report-card-body > .text-link { margin-top: auto; }

.bl-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.bl-pages { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.bl-pages a, .bl-pages span { min-width: 2.2rem; padding: .45rem .5rem; text-align: center; border-radius: 4px; }
.bl-pages a:hover { background: #e3edf4; }
.bl-pages [aria-current="page"] { background: var(--blue); color: #fff; }
.bl-pager .button:last-child { margin-left: auto; }

/* single report */
.bl-report { max-width: 70rem; }
.bl-report.section { padding-top: 2.5rem; }
.bl-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 1.75rem; }
.bl-crumbs a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.bl-report-head { padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.bl-report-head h1 { margin: .4rem 0 .6rem; }
.bl-posted { font-size: 14px; }

.report-body { color: var(--ink); font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.report-body::after { content: ""; display: table; clear: both; }
.report-body p, .report-body li { color: inherit; font-size: inherit; line-height: inherit; max-width: none; }
.report-body p { margin: 0 0 1.1em; }
.report-body ul, .report-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.report-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.report-body strong, .report-body b { font-weight: 650; }
.report-body img { display: inline-block; max-width: 100%; height: auto !important; border-radius: 6px; vertical-align: top; }
.report-body .battlelogpadding { margin: 4px; }
.report-body p[style*="float:left"], .report-body p[style*="float: left"] { margin: .3em 1.5rem 1rem 0; max-width: 55%; }
.report-body p[style*="float:right"], .report-body p[style*="float: right"] { margin: .3em 0 1rem 1.5rem; max-width: 55%; }
.report-body img[data-target], .report-body img[data-toggle="modal"] { cursor: zoom-in; }
.report-body img[data-target]:focus-visible { outline: 3px solid #4383ad; outline-offset: 3px; }
.report-body .modal { display: none !important; }
.report-body iframe, .report-body video { max-width: 100%; border: 0; }
.report-body table { max-width: 100%; border-collapse: collapse; }

.bl-report-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.bl-step { display: grid; gap: .2rem; padding: 1rem 1.1rem; border: 1px solid #c2d3df; border-radius: 6px; font-size: 15px; }
.bl-step span { color: var(--blue); font-size: 14px; font-weight: 600; }
.bl-step:hover { background: #f3f7fa; }
.bl-next { text-align: right; }
.bl-report .report-actions { margin-top: 1.75rem; }

.bl-lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 3vmin; background: rgba(10, 20, 30, .9); cursor: zoom-out; }
.bl-lightbox[hidden] { display: none; }
.bl-lightbox img { max-width: 100%; max-height: 94vh; border-radius: 4px; }
.bl-lightbox button { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 28px; line-height: 1; }

/* "Older reports" (same look as the old Battle Log page) */
.older-reports { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 3px solid #245f89; }
.older-reports h2 { margin-bottom: 2rem; }
.older-report-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.older-report { position: relative; padding: 1.25rem 1.25rem 3.5rem; border: 1px solid #dbe4eb; border-radius: 1rem; background: #fff; }
.older-report::after { content: ""; display: table; clear: both; }
.older-report h3 { margin: .35rem 0 .5rem; }
.older-report > p:not(.report-meta) { max-width: none; margin-bottom: .65rem; font-size: 15px; line-height: 1.7; }
.older-report > .text-link { position: absolute; left: 1.25rem; bottom: 1.25rem; }
@media (max-width: 640px) { .older-report-list { grid-template-columns: 1fr; } }

/* "Browse the full archive" (same look as the old Battle Log page) */
.battle-log > .section { padding-bottom: 2.5rem; }
.archive-section { background: var(--surface); padding-block: 2rem; scroll-margin-top: 6rem; }
.archive-panel { margin: 0; border: 0; scroll-margin-top: 6rem; }
.archive-panel summary { padding: 1rem 0; cursor: pointer; color: #245f89; font-weight: 700; }
.archive-panel > summary { position: relative; justify-content: center; text-align: center; font-size: clamp(1.5rem, 4vw, 2rem); padding: 1.75rem 2rem; }
.archive-panel > summary::after { position: absolute; right: 0; margin-left: 0; }
.archive-body { padding-bottom: 1rem; }
.archive-body .archive-locations { display: block; margin: 1rem 0 1.5rem; }
.archive-region { border-bottom: 1px solid #dbe4eb; }
.archive-region > summary { padding: .55rem 0; }
.archive-region-buttons { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: .75rem; }
.archive-panel [hidden] { display: none; }
.archive-panel button { font: inherit; color: #245f89; background: #fff; border: 1px solid #b9ccd9; border-radius: 999px; padding: .4rem .8rem; cursor: pointer; }
.archive-panel button[aria-pressed="true"] { color: #fff; background: #245f89; }
.archive-panel button:disabled { opacity: .45; cursor: default; }
.archive-results { padding-bottom: .75rem; }
#archive-location { font-size: 1.5rem; margin-top: .5rem; }
.archive-team-link { margin: .25rem 0 0; font-size: 14px; }
.archive-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: 1rem 0 0; }
.archive-reports { list-style: none; padding: 0; margin: .75rem 0; }
.archive-reports[aria-busy="true"] { opacity: .5; }
.archive-reports li { border-top: 1px solid #dbe4eb; padding: .75rem 0; }
.archive-excerpt { max-width: none; margin: .35rem 0 0; }
.archive-photo { float: right; width: min(30%, 144px); height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .45rem; margin: 0 0 .5rem 1rem; }
.archive-reports li:has(.archive-photo:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 144px); column-gap: 1rem; align-items: start; }
.archive-reports .text-link, .archive-reports .archive-excerpt { grid-column: 1; justify-self: start; }
.archive-reports .archive-photo { grid-column: 2; grid-row: 1 / span 2; width: 100%; margin: 0; }
@media (max-width: 480px) {
  .archive-reports li:has(.archive-photo:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .archive-reports .archive-photo { grid-column: 1; grid-row: auto; width: min(100%, 144px); margin-bottom: .5rem; }
}

@media (max-width: 640px) {
  .report-body { font-size: 16px; }
  .report-body p[style*="float"] { float: none !important; max-width: none; margin: 0 0 1rem; }
  .report-body p[style*="float"] img, .report-body p[style*="text-align:center"] img { width: 100% !important; margin: 0 0 .5rem; }
  .bl-report-nav { grid-template-columns: 1fr; }
  .bl-next { text-align: left; }
  .bl-pager { justify-content: center; }
  .bl-pager .button:last-child { margin-left: 0; }
}

/* Team pages: 3 cards across, 2 rows (6 per page) */
.report-grid.bl-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .report-grid.bl-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .report-grid.bl-team-grid { grid-template-columns: 1fr; } }
