﻿.input-group-text {
    /*  white-space: normal;
    flex-basis: 145px;*/
    /*max-width: 145px;*/
    /*min-width: 145px;*/
    padding: 0.7rem 0.5rem;
}

.blazored-typeahead__input-mask {
    padding: 10px;
}

.blazored-typeahead__input-multiselect-wrapper {
    padding: 0 0.4rem;
}

td {
    vertical-align: middle;
}

.blazored-typeahead__controls {
    height: 100% !important;
    /* flex-wrap:wrap !important; */
}

.control-label {
    width: 100%;
    font-weight: 700;
    font-size: 1.1rem;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-all;
}

.form-check-custom .form-check-input {
    cursor: pointer;
}

.action-container i {
    color: var(--kt-primary);
}

.data-tabs-container .nav-item .nav-link {
    font-weight: 700;
    padding: 10px 15px;
    margin: 0 !important;
}

.data-tabs-container .nav-item .nav-link.active {
    color: #fff;
    background: var(--kt-primary);
    padding: 10px 15px
}

.blazored-typeahead__input-icon {
    justify-content: center;
    align-items: center;
    width: auto;
    padding: 0;
}

.blazored-typeahead:focus-within,
.blazored-typeahead__input-icon:focus {
    box-shadow: none
}

.table.table-row-dashed td {
    cursor: pointer;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--kt-body-bg, #fff);
    z-index: 9999;
    overflow: hidden;
}

[data-theme="dark"] .loading,
[data-bs-theme="dark"] .loading {
    background: var(--kt-body-bg, #1e1e2d);
}

.loading .loading-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading img {
    width: 250px;
}

.blazored-typeahead__input {
    padding: 10px;
}

.blazored-typeahead__input-mask-wrapper {
    flex-wrap: wrap !important;
}

.blazored-typeahead__input-mask {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block !important;
}

.blazored-typeahead__results {
    max-height: 16rem !important;
}

input::file-selector-button {
    font-weight: bold;
    padding: 0.5em;
    border: thin solid grey;
    border-radius: 3px;
    height: 55px
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link.active {
    background: var(--kt-primary-active);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here),
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) {
    background: var(--kt-primary);
}

.smart-editor {
    height: 200px !important;
}



@media screen and (max-width:1920px) {
    .blazored-typeahead__input {
        max-width: unset;
        width: 100%;
    }
}

@media screen and (min-width:1200px) {
    textarea.sm-texarea {
        max-height: unset;
        height: 43px;
    }
}

.is-invalid .blazored-typeahead__input {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + .75rem);
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, .25);
}

.is-invalid .blazored-typeahead__results {
    border-color: #dc3545 !important;
}

/*testing purposes*/
.table-bordered> :not(caption)>*,
.table.table-bordered tfoot tr:last-child th,
.table-bordered tfoot tr:last-child td,
.table tbody tr:last-child th,
.table-bordered tbody tr:last-child td {
    border: 1px solid var(--kt-border-color, #F1F1F4);
    padding: .75rem .75rem;
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    background-color: var(--bs-table-bg);
    border-bottom-width: 1px;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
    text-align: center
}

[data-theme="dark"] .table,
[data-theme="dark"] .table tbody,
[data-theme="dark"] .table tr,
[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table tbody,
[data-bs-theme="dark"] .table tr,
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    background-color: transparent !important;
    border-color: #323248 !important;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    color: #e0e0e0 !important;
}

.blazored-typeahead__input-multiselect-wrapper {
    max-height: 250px;
    overflow: auto
}

[data-kt-app-sidebar-fixed=true] .app-wrapper {
    padding-left: 30px;
    padding-right: 30px
}

/* ── Secondary Color Overrides ── */
.btn-secondary {
    background-color: var(--kt-secondary) !important;
    border-color: var(--kt-secondary) !important;
    color: #ffffff !important;
}

.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus {
    background-color: var(--kt-secondary-active, var(--kt-secondary)) !important;
    border-color: var(--kt-secondary-active, var(--kt-secondary)) !important;
    filter: brightness(0.9);
}

.badge-secondary {
    background-color: var(--kt-secondary) !important;
    color: #ffffff !important;
}

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

.text-secondary {
    color: var(--kt-secondary) !important;
}

.custom-is-invalid {
    border-bottom: 2px solid #dc3545 !important;
}

.custom-validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ── Dark Mode Overrides ── */
[data-theme="dark"] .subPageTable,
[data-theme="dark"] .table-content,
[data-bs-theme="dark"] .subPageTable,
[data-bs-theme="dark"] .table-content {
    background-color: var(--kt-card-bg, #1e1e2d) !important;
    color: var(--kt-text-inverse-white, #ffffff) !important;
    border-color: var(--kt-border-color, #2b2b40) !important;
}

[data-theme="dark"] .card,
[data-bs-theme="dark"] .card {
    background-color: var(--kt-card-bg, #1e1e2d) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .blazored-typeahead__input,
[data-theme="dark"] .blazored-typeahead__input-mask,
[data-theme="dark"] .blazored-typeahead__input-mask-wrapper,
[data-theme="dark"] .blazored-typeahead__input-mask-wrapper--disabled,
[data-theme="dark"] .blazored-typeahead__results,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .blazored-typeahead__input,
[data-bs-theme="dark"] .blazored-typeahead__input-mask,
[data-bs-theme="dark"] .blazored-typeahead__input-mask-wrapper,
[data-bs-theme="dark"] .blazored-typeahead__input-mask-wrapper--disabled,
[data-bs-theme="dark"] .blazored-typeahead__results {
    background-color: var(--kt-input-bg, #1b1b29) !important;
    border-color: var(--kt-input-border-color, #323248) !important;
    color: var(--kt-input-text-color, #ffffff) !important;
}

[data-theme="dark"] .blazored-typeahead__down-arrow path,
[data-theme="dark"] .blazored-typeahead__clear-icon path,
[data-bs-theme="dark"] .blazored-typeahead__down-arrow path,
[data-bs-theme="dark"] .blazored-typeahead__clear-icon path {
    fill: var(--kt-text-gray-600, #7e8299) !important;
}

[data-theme="dark"] select option,
[data-bs-theme="dark"] select option {
    background-color: #1e1e2d !important;
    color: #ffffff !important;
}

/* ── Select2 Dark Mode ── */
[data-theme="dark"] .select2-dropdown,
[data-bs-theme="dark"] .select2-dropdown {
    background-color: #1e1e2d !important;
    border-color: #323248 !important;
}

[data-theme="dark"] .select2-container--bootstrap5 .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap5 .select2-selection {
    background-color: #1b1b29 !important;
    border-color: #323248 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .select2-results__option,
[data-bs-theme="dark"] .select2-results__option {
    color: #cdcdde !important;
}

[data-theme="dark"] .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-results__option--highlighted {
    background-color: var(--kt-primary-light, #212e48) !important;
    color: #ffffff !important;
}

/* ── Menu & Bootstrap Dropdowns ── */
[data-theme="dark"] .menu-sub-dropdown,
[data-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .menu-sub-dropdown,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e1e2d !important;
    box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #323248 !important;
}

[data-theme="dark"] .menu-item .menu-link,
[data-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .menu-item .menu-link,
[data-bs-theme="dark"] .dropdown-item {
    color: #cdcdde !important;
}

[data-theme="dark"] .menu-item .menu-link:hover,
[data-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .menu-item .menu-link:hover,
[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #212e48 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .blazored-typeahead__result-selected,
[data-theme="dark"] .blazored-typeahead__result-hover,
[data-bs-theme="dark"] .blazored-typeahead__result-selected,
[data-bs-theme="dark"] .blazored-typeahead__result-hover {
    background-color: var(--kt-component-hover-bg, #2b2b40) !important;
}

[data-theme="dark"] .accordion-button:not(.collapsed),
[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: var(--kt-primary-active, #2b2b40) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .accordion-button.collapsed,
[data-bs-theme="dark"] .accordion-button.collapsed {
    background-color: var(--kt-card-bg, #1e1e2d) !important;
    color: var(--kt-text-gray-600, #7e8299) !important;
}

/* ── Sidebar Dark Mode ── */
[data-theme="dark"] #kt_app_sidebar,
[data-theme="dark"] .app-sidebar {
    background-color: #1a1a2e !important;
}

[data-theme="dark"] .app-sidebar .menu-title,
[data-theme="dark"] .app-sidebar .menu-link {
    color: #cdcdde !important;
}

[data-theme="dark"] .app-sidebar .menu-link:hover,
[data-theme="dark"] .app-sidebar .menu-link.active {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .app-sidebar-logo {
    background-color: #1a1a2e !important;
}

[data-theme="dark"] .app-sidebar-logo .text-dark {
    color: #cdcdde !important;
}

/* ── Neutralize Utility Classes in Dark Mode ── */
[data-theme="dark"] .bg-white {
    background-color: var(--kt-card-bg, #1e1e2d) !important;
}

[data-theme="dark"] .bg-light {
    background-color: #1b1b29 !important;
}

[data-theme="dark"] .bg-light-primary {
    background-color: var(--kt-primary-light, #212e48) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--kt-text-gray-900, #ffffff) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--kt-text-gray-500, #a1a5b7) !important;
}

[data-theme="dark"] .border {
    border-color: var(--kt-border-color, #2b2b40) !important;
}

[data-theme="dark"] .app-header {
    background-color: var(--kt-header-bg, #1a1a2e) !important;
}

[data-theme="dark"] .app-toolbar {
    background-color: var(--kt-toolbar-bg, #1a1a2e) !important;
}

/* ── Premium Pill Toggle (Dark / Light) ── */
.gb-theme-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gb-theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.gb-theme-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #87CEEB 0%, #E0F0FF 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .06);
    transition: background 0.5s cubic-bezier(.4, 0, .2, 1),
        box-shadow 0.5s cubic-bezier(.4, 0, .2, 1);
}

.gb-theme-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1),
        background 0.5s ease;
    z-index: 2;
}

.gb-theme-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 1;
}

.gb-sun {
    right: 7px;
    color: #F59E0B;
    opacity: 1;
    transform: translateY(-50%) rotate(0deg);
}

.gb-moon {
    left: 7px;
    color: #A78BFA;
    opacity: 0;
    transform: translateY(-50%) rotate(-90deg) scale(.5);
}

/* ── Checked = Dark Mode ── */
.gb-theme-switch input:checked+.gb-theme-slider {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3), 0 0 12px rgba(99, 102, 241, .15);
}

.gb-theme-switch input:checked+.gb-theme-slider::before {
    transform: translateX(28px);
    background: #1E1B4B;
    box-shadow: 0 0 8px rgba(167, 139, 250, .4), 0 2px 6px rgba(0, 0, 0, .25);
}

.gb-theme-switch input:checked+.gb-theme-slider .gb-sun {
    opacity: 0;
    transform: translateY(-50%) rotate(90deg) scale(.5);
}

.gb-theme-switch input:checked+.gb-theme-slider .gb-moon {
    opacity: 1;
    transform: translateY(-50%) rotate(0deg) scale(1);
    color: #C4B5FD;
}

/* ── Hover feedback ── */
.gb-theme-switch:hover .gb-theme-slider::before {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.gb-theme-switch input:checked:hover+.gb-theme-slider::before {
    box-shadow: 0 0 12px rgba(167, 139, 250, .5), 0 2px 8px rgba(0, 0, 0, .3);
}