/*
 * IRE Archive Admin — custom styles matching archive.ire.org
 *
 * Strategy: override Django admin's CSS custom properties at :root so that
 * the entire theme flows through naturally without fighting the admin's own
 * layout or SVG icon machinery.
 *
 * Design tokens sourced from the ire-archive-frontend repository:
 *   IRE blue:       #1a5988  (primary action colour)
 *   hover blue:     #0e2f48  (darker shade on hover)
 *   warm off-white: #e5ded4  (accent / selected row)
 *   body text:      #0f0d0a
 *   page bg:        #f5f5f5
 *   border:         #e0e0e0
 *   error / delete: #d32f2f
 *
 * Roboto is loaded via <link> in base_site.html.
 */

/* ── CSS custom-property overrides ──────────────────────────────────────── */

html[data-theme="light"],
:root {
    /* Primary/secondary map to IRE blue */
    --primary: #5b9aba;
    --secondary: #1a5988;
    --accent: #e5ded4;
    --primary-fg: #fff;

    /* Body */
    --body-fg: #0f0d0a;
    --body-bg: #fff;
    --body-quiet-color: #666;
    --body-medium-color: #444;
    --body-loud-color: #000;

    /* Header — IRE blue background with white text */
    --header-color: #fff;
    --header-branding-color: #fff;
    --header-bg: #1a5988;
    --header-link-color: #fff;

    /* Breadcrumbs — dark blue strip (matches default Django admin approach) */
    --breadcrumbs-fg: #c4dce8;
    --breadcrumbs-link-fg: #fff;
    --breadcrumbs-bg: #0e2f48;

    /* Links */
    --link-fg: #1a5988;
    --link-hover-color: #0e2f48;
    --link-selected-fg: #1a5988;

    /* Borders */
    --hairline-color: #e0e0e0;
    --border-color: #ccc;

    /* Errors */
    --error-fg: #d32f2f;

    /* Backgrounds */
    --darkened-bg: #f0f0f0;
    --selected-bg: #e4e4e4;
    --selected-row: #e5ded4;

    /* Buttons */
    --button-fg: #fff;
    --button-bg: #1a5988;
    --button-hover-bg: #0e2f48;
    --default-button-bg: #0e2f48;
    --default-button-hover-bg: #1a5988;
    --close-button-bg: #747474;
    --close-button-hover-bg: #333;
    --delete-button-bg: #d32f2f;
    --delete-button-hover-bg: #ab2424;

    /* Object tools */
    --object-tools-fg: #fff;
    --object-tools-bg: #1a5988;
    --object-tools-hover-bg: #0e2f48;

    /* Font — Roboto first (loaded by base_site.html) */
    --font-family-primary:
        "Roboto",
        "Segoe UI",
        system-ui,
        "Helvetica Neue",
        Arial,
        sans-serif;
}

/* ── Targeted rules for things not covered by variables ──────────────────── */

/* Page background is slightly off-white; --body-bg stays #fff so form
   inputs keep their white background. */
body {
    background: #f5f5f5;
}

/* Site-name link uses --accent by default (now warm off-white), but we want
   clean white text in the blue header. */
#site-name a:link,
#site-name a:visited {
    color: #fff;
}

#site-name a:hover,
#site-name a:focus {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
