/* History of Australia — overrides loaded after core/css/style.css: the
   inline SVG logo, two rulers-tab icons, ten At a Glance ages in one row, the
   prime minister / governor-general / governor cards in "Who Was in Power",
   and the "Australia Through Time" map layers (js/australia-map.js), which
   reuse core's .cm-* map page. */

/* Inline SVG logo (partials/logo.php, site.php logo_partial) — sized like
   the image logo of the other sites. */
#app-logo.app-logo-svg { height:auto; overflow:visible; }

/* ════════════════════════════════════════
   Rulers page — Governors of NSW (sailing ship) and Governors-General
   (mace and star) tab icons; site.php gives those tabs icon 'none', so they
   are drawn here in the tab's text colour.
════════════════════════════════════════ */
.rp-tab[data-tab="governors"]::before,
.rp-tab[data-tab="governors-general"]::before {
  content:''; flex-shrink:0; width:14px; height:14px;
  background-color:currentColor;
  -webkit-mask:var(--au-tab-icon) center / contain no-repeat;
  mask:var(--au-tab-icon) center / contain no-repeat;
}
.rp-tab[data-tab="governors"] {
  --au-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5v10M8 2.5l4.5 6.5H8M8 4L4.5 9H8M1.5 11.5h13l-2 3h-9z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="governors-general"] {
  --au-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.4l1.2 2.4 2.6.4-1.9 1.8.5 2.6L8 7.4 5.6 8.6l.5-2.6-1.9-1.8 2.6-.4zM8 8.6v6M6 14.6h4M6.6 11h2.8' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ════════════════════════════════════════
   At a Glance — ten ages: one column per age, all in a single row (core
   lays out eight); bibliography in three columns.
════════════════════════════════════════ */
@media (min-width:901px) {
  .ag-era-list { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); }
}
.bib-groups { grid-template-columns:repeat(3, minmax(0, 1fr)); }
@media (max-width:1100px) {
  .bib-groups { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* ════════════════════════════════════════
   "Who Was in Power" — the sovereign beside the prime minister and the
   governor-general (since 1901) or the governor of New South Wales (before
   1901); the coloured line under the prime minister names the party. The
   columns stack once each would drop below ~200px.
════════════════════════════════════════ */
.em-power {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap:12px 20px;
  align-items:start;
}
.em-power > .em-power-heading { grid-column:1 / -1; margin-bottom:1px; }
a.em-power-card--pm { color:inherit; text-decoration:none; }
.em-power-party {
  display:flex; align-items:center; gap:6px;
  font-family:var(--f-ui); font-size:13px; line-height:1.3; color:var(--white-dim);
}
.em-power-party i { width:9px; height:9px; border-radius:50%; flex:none; }

/* ════════════════════════════════════════
   MAP — "Australia Through Time" (js/australia-map.js), as in the prototype
   data/australia-map.html: the sea, the Ice Age shelf, the neighbouring
   lands, the land cells coloured by their owner, the coastline, the dashed
   borders of the period, the labels, the external territories and the
   Antarctic inset.
════════════════════════════════════════ */
.cm-sphere { fill:#0d0b16; }
.au-foreign { fill:#1c1924; stroke:#08060f; stroke-width:0.5; vector-effect:non-scaling-stroke; }
.au-cell { stroke-width:1.1; vector-effect:non-scaling-stroke; stroke-linejoin:round; cursor:pointer;
  transition:fill 0.8s ease, stroke 0.8s ease, filter 0.2s; }
.au-cell:hover { filter:brightness(1.18); }
.au-cell.flash { animation:au-flash 1.3s ease; }
@keyframes au-flash { 0% { filter:brightness(1.9); } 100% { filter:brightness(1); } }
.au-coast { fill:none; stroke:#08060f; stroke-width:0.8; vector-effect:non-scaling-stroke; pointer-events:none; }
.au-sahul { fill:rgb(74,53,37); stroke:none; transition:opacity 1.2s ease; pointer-events:none; }
#au-shelf { fill:rgb(58,42,32); }
.au-border { fill:none; stroke:#f4ecd6; stroke-width:1.5; stroke-dasharray:5 3; stroke-linejoin:round;
  vector-effect:non-scaling-stroke; transition:opacity 0.8s ease; pointer-events:none; }
.au-label-set { transition:opacity 0.8s ease; pointer-events:none; }
.au-label { font-family:var(--f-heading); font-weight:600; fill:#fff; letter-spacing:0.04em;
  paint-order:stroke; stroke:rgba(8,6,15,0.85); stroke-linejoin:round; }
.au-label--0 { fill:rgba(255,255,255,0.85); font-weight:400; }
.au-isl { cursor:pointer; transition:opacity 0.6s ease; }
.au-isl-mark { stroke:#08060f; stroke-width:1.2; vector-effect:non-scaling-stroke; transition:fill 0.6s ease; }
.au-isl text { font-family:var(--f-ui); font-weight:500; fill:var(--white-mid); paint-order:stroke; stroke:#08060f; stroke-linejoin:round; pointer-events:none; }

/* Antarctic inset, bottom right of the map. */
.au-ant { position:absolute; right:calc(var(--cm-side-w) + 44px); bottom:12px; z-index:3; width:178px;
  padding:8px 10px 6px; background:rgba(8,6,16,0.62); border:1px solid rgba(255,255,255,0.12); border-radius:6px;
  -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); transition:opacity 0.8s ease; cursor:help; }
.au-ant h4 { font-family:var(--f-ui); font-size:11.5px; font-weight:500; letter-spacing:1.5px; text-transform:uppercase; color:var(--gold); text-align:center; }
.au-ant svg, .cm-stage .au-ant svg { display:block; width:100%; height:auto; cursor:help; }
.au-ant-sea { fill:#0d0b16; stroke:rgba(201,168,68,0.25); stroke-dasharray:2 2; }
.au-ant-land { fill:#3a3644; }
.au-ant-sector { fill:#e3b04b; fill-opacity:0; stroke:#e3b04b; stroke-opacity:0; transition:fill-opacity 0.8s, stroke-opacity 0.8s; }
.au-ant.is-claimed .au-ant-sector { fill-opacity:0.35; stroke-opacity:0.6; }
.au-ant.is-force .au-ant-sector { fill-opacity:0.7; stroke-opacity:1; }
.au-ant-heard, .au-ant-macq { fill:#6d6a73; transition:fill 0.6s; }
.au-ant.has-heard .au-ant-heard, .au-ant.has-macq .au-ant-macq { fill:#e3b04b; }
.au-ant-lbl { font-family:var(--f-ui); font-size:10px; fill:var(--white-dim); }

/* Year badge: monarch and prime minister in office. */
.cm-pop-n { font-size:15px; }

/* Legend: owners on the map in the year shown; the map key's small icons. */
.cm-legend { max-width:calc(100% - var(--cm-side-w) - 270px); }
.cm-lg--trad { grid-template-columns:repeat(2, minmax(0, auto)); }
.cm-lg i { border-radius:2px; }
.au-lg-key span { display:flex; align-items:center; gap:8px; }
.cm-stage .au-lg-key svg { flex:none; width:22px; height:12px; display:block; }

/* "Australia in YEAR" thumbnails (timeline corner card, event modal). */
.em-map-thumb svg .au-thumb-sea, #tl-map-card svg .au-thumb-sea { fill:#0d0b16; }
.em-map-thumb svg .au-thumb-bg, #tl-map-card svg .au-thumb-bg { fill:#1c1924; stroke:none; }
.em-map-thumb svg .au-thumb-shelf, #tl-map-card svg .au-thumb-shelf { fill:rgb(58,42,32); stroke:none; }
.em-map-thumb svg .au-thumb-border, #tl-map-card svg .au-thumb-border { fill:none; stroke:#f4ecd6; stroke-width:1.2; stroke-dasharray:4 3; vector-effect:non-scaling-stroke; }

/* Fourteen era buttons in two rows; 28 chapters (australia-map.js marks the
   year labels that would collide; the current one always shows). */
.cm-eras { grid-template-columns:repeat(7, minmax(0, 1fr)); }
.cm-eras button { padding-left:4px; padding-right:4px; }
.cm-tick-labels button.thin:not(.cur) { visibility:hidden; }
.cm-tick-labels button:first-child { transform:none; }
.cm-tick-labels button:last-child { transform:translateX(-100%); }
@media (max-width:900px) {
  .au-ant { display:none; }
  .cm-legend { max-width:none; }
}
@media (max-width:760px) {
  .cm-eras { grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (max-width:600px) {
  .cm-lg--trad { grid-template-columns:minmax(0, 1fr); }
}
