/* ==========================================
   EXTERNAL IMPORTS
   ========================================== */

@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css");

/* ==========================================
   BASE STYLES
   ========================================== */

html, body {
    font-family: Segoe UI, Helvetica, Arial, sans-serif;
    height: 100%;
}

/* ==========================================
   LAYOUT COMPONENTS
   ========================================== */

/* Logo */
.logo {
    text-align: left;
    width: 208px;
    height: 48px;
}

/* Header */
.headerTitle {
    float: left;
    font-size: 25px;
    width: 80%;
}

.top-row {
    height: 4.5em;
}

.py-2 {
    padding-left: 1rem !important;
    padding-top: 1rem !important;
    padding-bottom: .5rem !important;
}

/* ==========================================
   FORM VALIDATION
   ========================================== */

.valid.modified:not([type=checkbox]) {
    font-size: 1.5em;
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ==========================================
   NAVIGATION & BUTTONS
   ========================================== */

.button-link {
    text-decoration: unset;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #0078be;
}

.dxbl-btn.dxbl-btn-primary {
    background-color: #0078be;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */

.global-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-text {
    color: white;
    margin-top: 15px;
    font-size: 1.2rem;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================
   PDF VIEWER
   ========================================== */

.pdf-viewer-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

    .pdf-viewer-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: #2a5885;
    }

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.dx-toast-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
}

.dx-toast {
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* ==========================================
   ERROR UI
   ========================================== */

#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 .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ==========================================
   DEVEXPRESS BLAZOR OVERRIDES
   ========================================== */

/* Grid */
.dxbl-grid .dxbl-grid-highlighted-text {
    color: inherit;
    background-color: transparent;
}

    .dxbl-grid .dxbl-grid-highlighted-text:hover {
        color: inherit;
        background-color: transparent;
    }

/* Group */
.dxbl-group .dxbl-group-header .dxbl-text {
    font-size: 20px;
}

/* Toolbar */
.dxbl-toolbar.dxbl-toolbar-adaptive .dxbl-virtual-toolbar,
.dxbl-toolbar.dxbl-toolbar-adaptive > .dxbl-btn-toolbar {
    font-size: 3em;
    padding: 0rem;
}

.dxbl-toolbar {
    font-size: 3em;
}

/* Text Edit */
.dxbl-text-edit .dxbl-text-edit-input {
    font-size: 1.2em;
    padding-top: .5rem !important;
    padding-bottom: .5rem !important;
}

.dxbl-text-edit-input {
    font-size: 1.5em;
    padding-top: .5rem !important;
    padding-bottom: .5rem !important;
}

/* TreeView */
.dxbl-treeview .dxbl-treeview-item > .dxbl-treeview-item-content > .dxbl-treeview-item-container:not(.dxbl-disabled):not(:disabled).dxbl-active {
    background-color: #8bb0ca;
}

/* Report Viewer */
.dxbrv-wrapper {
    border: 0px;
}

/* Form Layout */
.dxbl-fl .dxbl-fl-item .dxbl-fl-ctrl-nc,
.dxbl-fl .dxbl-fl-item .dxbl-fl-empty-caption + .dxbl-fl-ctrl {
    margin-top: 0 !important;
}

/* Popup */
.custom-popup {
    max-width: 700px !important;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .dx-toast-wrapper {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
    }
}

@media (max-width: 600.98px) {
    html, body {
        font-size: 0.9em;
        overflow: scroll;
    }

    .headerTitle {
        font-size: 1.5em;
    }

    .dxbl-text-edit .dxbl-text-edit-input {
        font-size: 1.2em;
        padding-top: .5rem !important;
        padding-bottom: .5rem !important;
    }

    .dxbl-text-edit-input {
        font-size: 1.5em;
        padding-top: .5rem !important;
        padding-bottom: .5rem !important;
    }

    .valid.modified:not([type=checkbox]) {
        font-size: 1.5em;
        outline: 1px solid #26b050;
    }

    .invalid {
        outline: 1px solid red;
    }

    .validation-message {
        color: red;
    }
}
