/* Brand overrides: primary color and Microsoft fonts */
:root {
    /* Microsoft blue */
    --theme-default: #0078d4;
}

/* Use Microsoft font stack across the app where available, fall back to system fonts */
html,
body,
input,
button,
select,
textarea {
    font-family: "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial,
        system-ui, -apple-system, "Roboto", "Noto Sans", "Liberation Sans",
        sans-serif !important;
}

/* Links and .text-primary use the theme color */
a,
.text-primary {
    color: var(--theme-default) !important;
}

/* Primary button background/border use the theme color */
.btn.btn-primary,
.btn-primary {
    background-color: var(--theme-default) !important;
    border-color: var(--theme-default) !important;
}

/* Ensure button text and spinners are readable on the theme background */
/* White text on theme-blue buttons and visible spinner borders */
.btn,
.btn-primary,
.btn.btn-primary {
    color: #ffffff !important; /* white text on theme blue */
}

.btn .spinner-border,
.btn .spinner-grow,
.btn-primary .spinner-border,
.btn-primary .spinner-grow {
    border-color: rgba(255, 255, 255, 0.85) !important;
}

/* Ensure disabled buttons still show readable text */
.btn:disabled,
.btn.disabled,
.btn-primary:disabled,
.btn-primary.disabled {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Utility: ensure icons and other accents match */
.material-symbols-outlined,
.icon,
.feather,
.fa {
    color: var(--theme-default) !important;
}

/* Prevent material icon ligatures/glyphs from showing up inside buttons accidentally.
   Use .btn-show-icon on a button when you want an icon visible. */
.btn .material-symbols-outlined,
.btn .material-symbols {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

.btn-show-icon .material-symbols-outlined,
.btn-show-icon .material-symbols {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    vertical-align: middle;
    color: inherit !important;
}

/* Improve contrast for headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #1b1b1b;
}

/* Small helper: ensure .btn-outline-primary shows readable text */
.btn-outline-primary {
    color: var(--theme-default) !important;
    border-color: var(--theme-default) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff !important;
    background-color: var(--theme-default) !important;
}
