.search-highlight {
    font-weight: bold;
}

html,
body,
.fullpage {
    height: 100vh !important;
    margin: 0 !important;
    background-color: #fcfcfc;
}

/* Theme variables (light defaults) */
:root {
    --bg-color: #fcfcfc;
    --text-color: #222222;
    --muted-color: #067f79;
    --card-bg: #ffffff;
    --navbar-bg: #004e4e; /* bootstrap primary */
    --navbar-text: #ffffff;
    --table-row-hover: #f5f5f5;
}

/* Dark theme overrides */
body.dark-theme {
    --bg-color: #0f1113;
    --text-color: #e6eef6;
    --muted-color: #9aa4ad;
    --card-bg: #121416;
    --navbar-bg: #0b1220;
    --navbar-text: #e6eef6;
    --table-row-hover: #14171a;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Apply variable-driven styles */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.navbar {
    background-color: var(--navbar-bg) !important;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: var(--navbar-text) !important;
}

.bg-white {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

.messagetable tbody tr:hover {
    background-color: var(--table-row-hover) !important;
}

.text-primary-inverse {
    color: var(--navbar-text) !important;
}

.btn-outline-light {
    color: var(--navbar-text);
    border-color: rgba(255,255,255,0.2);
}

/* Additional dark-theme overrides to cover component-scoped styles and third-party CSS
   These use high specificity and !important to quickly normalize visuals under dark mode. */
body.dark-theme .bg-white,
body.dark-theme .card,
body.dark-theme .card .card-body,
body.dark-theme .dropdown-menu,
body.dark-theme .modal-content,
body.dark-theme .navbar-collapse,
body.dark-theme .panel,
body.dark-theme .panel-body,
body.dark-theme .table,
body.dark-theme .table th,
body.dark-theme .table td,
body.dark-theme .messagetable,
body.dark-theme .messagetable tbody tr,
body.dark-theme .messagetable tbody td {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

body.dark-theme .text-muted {
    color: var(--muted-color) !important;
}

body.dark-theme .form-control,
body.dark-theme input.form-control,
body.dark-theme textarea.form-control,
body.dark-theme .selectize-input {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

body.dark-theme .btn-outline-secondary,
body.dark-theme .btn-outline-light,
body.dark-theme .btn-secondary,
body.dark-theme .btn {
    color: var(--text-color) !important;
    border-color: rgba(255,255,255,0.12) !important;
    background: transparent !important;
}

body.dark-theme .version {
    color: var(--muted-color) !important;
}

/* Snackbars / custom notification classes */
body.dark-theme .ngx-snackbar,
body.dark-theme .ng-snackbar,
body.dark-theme .snackbar,
body.dark-theme .ngx-snackbar-wrap,
body.dark-theme .ngx-snackbar .snackbar,
body.dark-theme .ngx-snackbar .sb {
    background-color: rgba(255,255,255,0.04) !important;
    color: var(--text-color) !important;
}

/* Force SVG/icon fills to use currentColor so icons adapt to theme */
body.dark-theme svg,
body.dark-theme i-feather {
    fill: currentColor !important;
    color: var(--text-color) !important;
}

/* Feather icons (and similar SVG icons) often use stroke instead of fill.
   Ensure stroke uses currentColor and has enough width to be visible on dark backgrounds. */
body.dark-theme i-feather,
body.dark-theme i-feather svg,
body.dark-theme svg.feather,
body.dark-theme .feather,
body.dark-theme .icon svg,
body.dark-theme .icon i-feather {
    color: var(--text-color) !important;
}

body.dark-theme i-feather svg *,
body.dark-theme svg.feather *,
body.dark-theme .feather * {
    stroke: currentColor !important;
    fill: currentColor !important;
}

/* Make strokes slightly bolder where applicable so thin icon lines remain readable */
body.dark-theme i-feather svg path,
body.dark-theme svg.feather path,
body.dark-theme .feather path {
    stroke-width: 1.4 !important;
}

/* Dropdowns, popovers */
body.dark-theme .popover,
body.dark-theme .popover-body,
body.dark-theme .tooltip,
body.dark-theme .dropdown-item {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

/* Strong global overrides for dark mode to ensure text is legible even when components use hard-coded colors */
body.dark-theme,
body.dark-theme .container,
body.dark-theme .row,
body.dark-theme .col,
body.dark-theme p,
body.dark-theme span,
body.dark-theme label,
body.dark-theme small,
body.dark-theme a,
body.dark-theme li,
body.dark-theme th,
body.dark-theme td,
body.dark-theme button,
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme option,
body.dark-theme .nav-link,
body.dark-theme .dropdown-item,
body.dark-theme .badge,
body.dark-theme .tooltip-inner,
body.dark-theme .popover-body,
body.dark-theme .card,
body.dark-theme .card * {
    color: var(--text-color) !important;
}

/* Inputs, selects and textareas */
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme .form-control {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Placeholders */
body.dark-theme ::-webkit-input-placeholder { color: rgba(255,255,255,0.6) !important; }
body.dark-theme :-ms-input-placeholder { color: rgba(255,255,255,0.6) !important; }
body.dark-theme ::placeholder { color: rgba(255,255,255,0.6) !important; }

/* Links and buttons */
body.dark-theme a {
    color: var(--link-color) !important;
}
body.dark-theme .btn,
body.dark-theme .btn * {
    color: var(--text-color) !important;
}

/* Ensure code blocks and preformatted text are readable */
body.dark-theme pre,
body.dark-theme code {
    color: var(--text-color) !important;
    background: rgba(255,255,255,0.02) !important;
}

/* High contrast helper for any stubborn elements -- last resort */
body.dark-theme .force-contrast,
body.dark-theme .force-contrast * {
    color: var(--text-color) !important;
    background-color: transparent !important;
}



/* Loading indicator frontpage */
.loaderbox {
    width: 240px;
    height: 240px;
    background-image: url("../img/clientLogo.png");
    background-image: url("../img/logo.png") !important;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: center;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #aaaaaa;
    border-radius: 50%;
    width: 240px;
    height: 240px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loadercontainer {
    text-align: center;
}

.loadtext {
    margin-top: 20px;
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* IE10+ CSS */
    .form-control {
        padding: 0rem 0.75rem !important;
    }
}