/*
 * Materio Custom Theme - Blue Primary Color (#2092EC)
 *
 * Overrides the default Materio purple (#8c57ff) with the project's blue
 * to keep the existing brand while using Materio's component styling.
 *
 * Loaded AFTER core.css and theme-default.css in App.razor.
 */

:root,
.light-style,
.dark-style {
    --bs-primary: #2092EC;
    --bs-primary-rgb: 32, 146, 236;
    --bs-link-color: #2092EC;
    --bs-link-hover-color: #1a7bc7;
    --bs-link-color-rgb: 32, 146, 236;
    --bs-link-hover-color-rgb: 26, 123, 199;
}

/* ============= Bootstrap 5 Primary Button ============= */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #2092EC;
    --bs-btn-border-color: #2092EC;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1a7bc7;
    --bs-btn-hover-border-color: #1872bb;
    --bs-btn-focus-shadow-rgb: 32, 146, 236;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1872bb;
    --bs-btn-active-border-color: #1566ab;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #2092EC;
    --bs-btn-disabled-border-color: #2092EC;
    box-shadow: 0 0.125rem 0.375rem 0 rgba(32, 146, 236, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 0.25rem 0.75rem 0 rgba(32, 146, 236, 0.4);
}

/* Outline Primary */
.btn-outline-primary {
    --bs-btn-color: #2092EC;
    --bs-btn-border-color: #2092EC;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2092EC;
    --bs-btn-hover-border-color: #2092EC;
    --bs-btn-focus-shadow-rgb: 32, 146, 236;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2092EC;
    --bs-btn-active-border-color: #2092EC;
}

/* ============= Utility Classes ============= */
.bg-primary { background-color: #2092EC !important; }
.text-primary { color: #2092EC !important; }
.border-primary { border-color: #2092EC !important; }
.bg-label-primary {
    background-color: rgba(32, 146, 236, 0.16) !important;
    color: #2092EC !important;
}

/* ============= Links ============= */
a {
    color: #2092EC;
}
a:hover {
    color: #1a7bc7;
}

/* ============= Form Focus States ============= */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #2092EC;
    box-shadow: 0 0 0 0.15rem rgba(32, 146, 236, 0.1);
}

.form-check-input:checked {
    background-color: #2092EC;
    border-color: #2092EC;
}

/* ============= Materio Menu Active State ============= */
.menu-vertical .menu-inner > .menu-item.active > .menu-link:not(.menu-toggle),
.menu-vertical .menu-inner > .menu-item.active > .menu-link.menu-toggle {
    background: linear-gradient(72.47deg, #2092EC 22.16%, rgba(32, 146, 236, 0.7) 76.47%);
    box-shadow: 0 0.125rem 0.375rem 0 rgba(32, 146, 236, 0.3);
    color: #fff !important;
}

/* ============= Pagination ============= */
.page-item.active .page-link,
.page-link.active {
    background-color: #2092EC;
    border-color: #2092EC;
    color: #fff;
}
.page-link {
    color: #2092EC;
}
.page-link:hover {
    color: #1a7bc7;
}

/* ============= Progress Bar ============= */
.progress-bar {
    background-color: #2092EC;
}

/* ============= Form Switch ============= */
.form-switch .form-check-input:checked {
    background-color: #2092EC;
    border-color: #2092EC;
}

/* ============= Badge Primary ============= */
.badge.bg-primary {
    background-color: #2092EC !important;
}

/* ============= Nav Tabs / Pills ============= */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #2092EC;
    color: #fff;
}
.nav-tabs .nav-link.active {
    border-bottom-color: #2092EC;
    color: #2092EC;
}

/* ============= Alert Primary ============= */
.alert-primary {
    background-color: rgba(32, 146, 236, 0.16);
    color: #2092EC;
    border-color: rgba(32, 146, 236, 0.3);
}

/* ============= Dropdown item active ============= */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #2092EC;
    color: #fff;
}

/* ============= List Group Primary ============= */
.list-group-item.active {
    background-color: #2092EC;
    border-color: #2092EC;
}

/* ============= Spinner ============= */
.text-primary.spinner-border,
.text-primary.spinner-grow {
    color: #2092EC !important;
}

/* ============= Modal Header / Close on Primary ============= */
.modal-header.bg-primary {
    background-color: #2092EC !important;
}

/* ============= Card Shadows (Materio look) ============= */
.card {
    box-shadow: 0 0.125rem 0.5rem 0 rgba(46, 38, 61, 0.12);
    border: 0;
    border-radius: 0.375rem;
}

/* ============= Input Group focus ============= */
.input-group-text {
    background-color: #f5f5f9;
    border-color: #dbdade;
}

/* ============= Performance: table containment for large datasets ============= */
.table-responsive,
.data-list-container,
.card {
    contain: layout style;
}
