/* DIVA Web Module - Shared Brand, Reset, and Chrome
   Anything a *future* Blazor module would also want (colors, typography,
   form/table/button defaults, DevExpress-independent chrome) belongs here,
   not duplicated per module — see DivaDynamics.Blazor.Core's CLAUDE.md. */

:root {
    /* DIVA brand teal/green; the $diva-* names are the brand variables DivaPalette cites too */
    --diva-primary: #00a09f;       /* $diva-cian-dark — main brand teal */
    --diva-primary-light: #36c2c1; /* $diva-cian — lightest accent */
    --diva-primary-dark: #008f8e;  /* $diva-cian-darker — header sub-panel/hover */
    --diva-secondary: #e1e4e6;     /* $diva-light-gray */
    --diva-success: #38b0af;       /* $diva-lbl-green-txt */
    --diva-warning: #f0ad4e;       /* no legacy equivalent — kept as-is */
    --diva-danger: #f64b66;        /* $diva-lbl-red-txt */
    --diva-danger-bg: #fce9ec;     /* $diva-lbl-red-back */
    --diva-border: #c3cacd;        /* $diva-gray */
    --diva-border-light: #e1e4e6;  /* $diva-light-gray */
    --diva-text-primary: #333333;  /* $diva-gray-dark */
    --diva-text-secondary: #7d7d7d; /* $diva-gray-medium */
    --diva-text-light: #999;
    --diva-bg-primary: #fff;
    --diva-bg-secondary: #e1e4e6;  /* $diva-light-gray — page wrapper background */
    /* System font stack only — no self-hosted Roboto webfont (dropped deliberately,
       see git history: kept the repo binary-free over pixel-parity with the old
       Angular dashboard's custom Roboto). Two vars kept distinct in case a future
       brand font is added for headings only. */
    --diva-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --diva-font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --diva-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --diva-shadow-md: 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.2);
    --diva-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--diva-font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--diva-text-primary);
    background: var(--diva-bg-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--diva-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--diva-primary);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; font-weight: 600; }
h6 { font-size: 12px; font-weight: 600; }

p {
    margin-bottom: 12px;
}

a {
    color: var(--diva-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--diva-primary-light);
    text-decoration: underline;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    border: 1px solid var(--diva-border-light);
    border-radius: 4px;
    padding: 8px 10px;
    background: var(--diva-bg-primary);
    color: var(--diva-text-primary);
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--diva-primary);
    box-shadow: 0 0 0 3px rgba(0, 160, 159, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--diva-primary);
}

button {
    background: var(--diva-bg-secondary);
    color: var(--diva-text-primary);
    border: 1px solid var(--diva-border);
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

button:hover {
    background: var(--diva-border-light);
    border-color: var(--diva-border);
}

/* :not(.dxbl-btn) — DevExpress Blazor components don't support transform/scale/zoom
   (documented), and DxButton renders as a real <button>, so the plain selector alone
   would apply this to it too. */
button:active:not(.dxbl-btn) {
    transform: scale(0.98);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--diva-bg-primary);
}

thead {
    background: var(--diva-primary);
    color: #fff;
}

thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--diva-border-light);
}

tbody tr:hover {
    background: var(--diva-bg-secondary);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--diva-border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--diva-border);
}

/* Shown by blazor.web.js itself (display:block) when an unhandled exception kills the
   circuit — every module needs this, the framework doesn't style it for you. */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: var(--diva-primary);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

body.diva-busy,
body.diva-busy * {
    cursor: wait !important;
}
