/* ========================================
   AntDesign Override CSS for Status Page
   This file MUST load after ant-design-blazor.css

   AntD's base stylesheet is light. Every rule here reads tokens (app.css), so both themes come from the token layer —
   there is no dark-only literal. Each section follows the matching section of App/wwwroot/css/overrides.css (I-043).
   Only what the pages render lives here: Tag, Spin, Tooltip, Icon. The Button, Alert, Empty, Card and Message rules
   were removed — no page renders those components.
   ======================================== */

/* ========================================
   Icon default (the body text defaults are in app.css, which loads after AntD's sheet on this site)
   ======================================== */

.anticon {
    color: currentColor;
}

/* ========================================
   Spin/Loading Overrides
   The App's .spin (prototype F): a 22px ring in --color-primary with an open right side (34px / 3px large, 16px / 2px
   small), drawn on .ant-spin-dot; AntD's four dots are hidden.
   ======================================== */

.ant-spin-text {
    color: var(--color-fg-70) !important;
}

.ant-spin-dot {
    font-size: 22px;
    box-sizing: border-box;
    border: 2.5px solid var(--color-primary);
    border-right-color: transparent;
    border-radius: 50%;
}

.ant-spin-dot-spin {
    animation: evSpinRing 0.8s linear infinite;
}

.ant-spin-dot-item {
    display: none !important;
}

.ant-spin-sm .ant-spin-dot {
    font-size: 16px;
    border-width: 2px;
}

.ant-spin-lg .ant-spin-dot {
    font-size: 34px;
    border-width: 3px;
}

@keyframes evSpinRing {
    to { transform: rotate(360deg); }
}

/* Reduced motion: the ring keeps turning (it is the only loading signal) but at a calm pace */
@media (prefers-reduced-motion: reduce) {
    .ant-spin-dot-spin {
        animation-duration: 2.4s;
    }
}

/* ========================================
   Tag Overrides
   The App's Tag section: 22px high (20px line + border), 12px / 600, 8px sides; every colour is its hue at 15 % fill
   with the -light ink (AA on the tint in both themes — the light theme's -light tokens are the dark inks).
   Incident status: red / orange / blue / green. Impact: red / orange / gold / default.
   Border: the tag's own ink at 70 % (color-mix with the same token as `color`) instead of the App's 38 % hue — the App's
   border measured 1.75 – 2.87 : 1 against the card and I-043's gate asks 3 : 1 for a tag boundary (README Decision 15,
   TASK_06). The fill and ink stay the App's.
   ======================================== */

.ant-tag {
    background: var(--color-fg-08) !important;
    border: 1px solid color-mix(in srgb, var(--color-fg-70) 70%, transparent) !important;
    border-radius: 6px !important;
    color: var(--color-fg-70) !important;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
}

/* Color="default" is the plain neutral tag (Impact None) */
.ant-tag-default {
    background: var(--color-neutral-bg) !important;
    border-color: color-mix(in srgb, var(--color-neutral-text) 70%, transparent) !important;
    color: var(--color-neutral-text) !important;
}

.ant-tag-green {
    background: rgba(var(--color-success-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-success-light) 70%, transparent) !important;
    color: var(--color-success-light) !important;
}

.ant-tag-blue {
    background: rgba(var(--color-info-base-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-info-light) 70%, transparent) !important;
    color: var(--color-info-light) !important;
}

.ant-tag-orange {
    background: rgba(var(--color-warning-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-warning-light) 70%, transparent) !important;
    color: var(--color-warning-light) !important;
}

.ant-tag-red {
    background: rgba(var(--color-error-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-error-light) 70%, transparent) !important;
    color: var(--color-error-light) !important;
}

/* Impact tags take the colour of the component state their impact drives: gold = Minor → Degraded
   (--color-status-degraded is --color-warning), volcano = Major → Partial outage (--color-status-partial is the
   structural volcano ink), red = Critical → Major outage. A status or impact tag never uses the attention or the
   primary colour. orange above is the Identified status tag (the App's warning tag). */
.ant-tag-gold {
    background: rgba(var(--color-warning-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-warning-light) 70%, transparent) !important;
    color: var(--color-warning-light) !important;
}

/* The App's structural volcano tag tokens (the same pair the App's .ant-tag-volcano reads); the ink is the
   contrast-safe text variant of each theme */
.ant-tag-volcano {
    background: rgba(var(--color-tag-volcano-rgb), 0.15) !important;
    border-color: color-mix(in srgb, var(--color-tag-volcano-text) 70%, transparent) !important;
    color: var(--color-tag-volcano-text) !important;
}

/* ========================================
   Tooltip Overrides
   The App's .tip (prototype F): inverted in both themes — an ink chip (--text-primary) with --color-bg-dark text
   (white chip on dark, near-black chip on light), radius 6, padding 6 10, 12.5 / 500, no border; the arrow takes the
   chip colour.
   ======================================== */

.ant-tooltip-inner {
    min-height: 0 !important;
    padding: 6px 10px !important;
    background: var(--text-primary) !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: var(--color-bg-dark) !important;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: var(--shadow-tooltip) !important;
}

.ant-tooltip-arrow-content {
    --antd-arrow-background-color: var(--text-primary);
    background: var(--text-primary) !important;
}
