@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ── Global Modern Alert Dialog — targets ALL dialogService.AlertAsync() calls ── */
.e-alert-dialog .e-dialog,
.e-alert-dialog.e-dialog {
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
    border: none !important;
    min-width: 300px !important;
    max-width: 420px !important;
}

.e-alert-dialog .e-dlg-header-content {
    background: #0d5480 !important;
    padding: 16px 20px !important;
    border-radius: 12px 12px 0 0 !important;
    text-align: center !important;
}

.e-alert-dialog .e-dlg-header {
    background: transparent !important;
    color: white !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}

.e-alert-dialog .e-dlg-content {
    background: white !important;
    padding: 24px 20px 16px !important;
    font-size: 0.93rem !important;
    color: #374151 !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

.e-alert-dialog .e-footer-content {
    background: white !important;
    padding: 0 20px 20px !important;
    border-top: none !important;
    display: flex !important;
    justify-content: center !important;
}

.e-alert-dialog .e-footer-content .e-btn {
    background: #1e4d8c !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 9px 32px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
    transition: background 0.2s ease !important;
    min-width: 80px !important;
}

.e-alert-dialog .e-footer-content .e-btn:hover {
    background: #163b6e !important;
}

.e-alert-dialog .e-dlg-closeicon-btn {
    display: none !important;
}

/* ── Same style via explicit CssClass="modern-alert-dialog" (kept for compatibility) ── */
.modern-alert-dialog .e-dlg-header-content
 { background: #0d5480 !important;
     padding: 16px 20px !important; 
     border-radius: 12px 12px 0 0 !important;
      text-align: center !important;
 }
.modern-alert-dialog .e-dlg-header { background: transparent !important; color: white !important; font-size: 1rem !important; font-weight: 600 !important; padding: 0 !important; text-align: center !important; width: 100% !important; display: block !important; }
.modern-alert-dialog .e-dlg-content { background: white !important; padding: 24px 20px 16px !important; font-size: 0.93rem !important; color: #374151 !important; line-height: 1.6 !important; text-align: center !important; }
.modern-alert-dialog .e-footer-content { background: white !important; padding: 0 20px 20px !important; border-top: none !important; display: flex !important; justify-content: center !important; }
.modern-alert-dialog .e-footer-content .e-btn { background: #1e4d8c !important; color: white !important; border: none !important; border-radius: 6px !important; padding: 9px 32px !important; font-weight: 600 !important; font-size: 0.9rem !important; min-width: 80px !important; }
.modern-alert-dialog .e-footer-content .e-btn:hover { background: #163b6e !important; }
.modern-alert-dialog .e-dlg-closeicon-btn { display: none !important; }

/* ── Warning dialog — same layout, amber title text ── */
.modern-warning-dialog .e-dlg-header-content { background: #0d5480 !important; padding: 16px 20px !important; border-radius: 12px 12px 0 0 !important; text-align: center !important; }
.modern-warning-dialog .e-dlg-header { background: transparent !important; color: #fbbf24 !important; font-size: 1rem !important; font-weight: 700 !important; padding: 0 !important; text-align: center !important; width: 100% !important; display: block !important; }
.modern-warning-dialog .e-dlg-content { background: white !important; padding: 24px 20px 16px !important; font-size: 0.93rem !important; color: #374151 !important; line-height: 1.6 !important; text-align: center !important; }
.modern-warning-dialog .e-footer-content { background: white !important; padding: 0 20px 20px !important; border-top: none !important; display: flex !important; justify-content: center !important; }
.modern-warning-dialog .e-footer-content .e-btn { background: #d97706 !important; color: white !important; border: none !important; border-radius: 6px !important; padding: 9px 32px !important; font-weight: 600 !important; font-size: 0.9rem !important; min-width: 80px !important; }
.modern-warning-dialog .e-footer-content .e-btn:hover { background: #b45309 !important; }
.modern-warning-dialog .e-dlg-closeicon-btn { display: none !important; }
.modern-warning-dialog .e-dialog { border-radius: 12px !important; box-shadow: 0 16px 48px rgba(0,0,0,0.2) !important; overflow: hidden !important; border: none !important; min-width: 300px !important; max-width: 420px !important; }

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Page container */
.page {
    overflow: hidden;
    height: 100vh;
}

/* Scrollbar styling for main content */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.main-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #1e40af;
}

.btn-primary {
    color: #fff;
    background-color: #1e40af;
    border-color: #1d4ed8;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgM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MDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* AGGRESSIVE FIX: Force all Syncfusion dialogs to be non-modal */

/* Completely disable and hide all modal overlays */
.e-dlg-overlay,
.e-dialog-wrapper .e-dlg-overlay,
.e-popup-overlay,
body .e-dlg-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}

/* Remove modal class behavior entirely */
.e-dialog-wrapper.e-dlg-modal {
    pointer-events: none !important;
}

.e-dialog-wrapper.e-dlg-modal .e-dialog {
    pointer-events: auto !important;
}

/* Force all dialog wrappers to be non-blocking */
.e-dialog-wrapper {
    pointer-events: none !important;
    z-index: 1050 !important;
}

/* Only the dialog itself should be interactive */
.e-dialog {
    pointer-events: auto !important;
    z-index: 1051 !important;
    position: fixed !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Ensure dialog content is accessible */
.e-dlg-content,
.e-dlg-header,
.e-dialog .e-footer-content {
    pointer-events: auto !important;
    z-index: 1052 !important;
    position: relative !important;
}

/* Dialog open state — vertical scroll only, never horizontal */
body.e-dialog-open {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Prevent any modal backdrop from being created */
.e-dlg-target {
    pointer-events: auto !important;
}

/* Override any modal styling */
.e-dialog-wrapper.e-dlg-modal .e-dlg-overlay {
    display: none !important;
}


/* Force remove modal classes via CSS */
.e-dialog-wrapper[class*="e-dlg-modal"] {
    pointer-events: none !important;
}

.e-dialog-wrapper[class*="e-dlg-modal"] .e-dialog {
    pointer-events: auto !important;
}

/* Style for better visual separation */
.e-dialog {
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.e-dlg-header {
    background: #1e40af !important;
    /*border-bottom: 1px solid #1e40af !important;*/
    padding: 15px 20px !important;
}

.e-dlg-header .e-dlg-header-content {
    font-weight: 600 !important;
    color: #495057 !important;
}

.e-dlg-content {
    padding: 20px !important;
    background: white !important;
}

.e-dialog .e-footer-content {
    padding: 15px 20px !important;
    background: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
}

/* Body must never scroll horizontally */
html, body {
    overflow-x: hidden !important;
}

/* Prevent any modal backdrop creation */
.e-popup-overlay,
.e-backdrop,
.modal-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Global Dialog Centering Styles */
.centered-dialog .e-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* Apply centering to all common dialog CSS classes */
.modern-organization-dialog .e-dialog,
.modern-user-dialog .e-dialog,
.custom-login-dialog .e-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* Ensure modal dialogs maintain centering */
.e-dialog-wrapper.e-dlg-modal .e-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

.e-dlg-center-center {
    -webkit-align-items: center !important;
    -webkit-justify-content: center !important;
    align-items: center !important;
    justify-content: center !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    z-index: 1060 !important;
}

.e-dlg-center-center .e-dialog {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: auto !important;
}

/* Dialog header text color */
.e-dlg-header,
.e-dlg-header-content,
.e-dialog .e-dlg-header,
.e-dialog .e-dlg-header-content {
    color: #ffffff !important;
}

/* Specific dialog service header text color */
.e-dlg-center-center .e-dlg-header,
.e-dlg-center-center .e-dlg-header-content,
.e-dialog-warning .e-dlg-header,
.e-dialog-warning .e-dlg-header-content,
.e-dialog-error .e-dlg-header,
.e-dialog-error .e-dlg-header-content,
.e-dialog-info .e-dlg-header,
.e-dialog-info .e-dlg-header-content,
.e-dialog-success .e-dlg-header,
.e-dialog-success .e-dlg-header-content {
    color: #ffffff !important;
}
.e-dialog-warning .e-dlg-header,
.e-dialog-warning .e-dlg-header-content{
    text-align: center;
}
/* Dialog header background colors - Uniform blue for all dialogs */
.e-dialog-warning .e-dlg-header,
.e-dialog-warning .e-dlg-header-content,
.e-dialog-error .e-dlg-header,
.e-dialog-error .e-dlg-header-content,
.e-dialog-success .e-dlg-header,
.e-dialog-success .e-dlg-header-content,
.e-dialog-info .e-dlg-header,
.e-dialog-info .e-dlg-header-content{
    /*background: #1e40af !important;*/
    background: linear-gradient(90deg, #0c4a6e, #0369a1) !important;
   
}
.e-dlg-center-center .e-dlg-header {
   /*background: #1e3a6e !important;*/
   background: #0c4a6e !important;
}
.e-dlg-header{
    text-align: center !important;
}

/* Override specific dialog header text colors */
.dialog-title,
.dialog-subtitle,
.login-header,
.login-header span,
.modern-dialog-header,
.modern-dialog-header h4,
.modern-dialog-header p,
.dialog-title-content h4,
.dialog-title-content p {
    color: #ffffff !important;
}

.login-header {
    background: #0369a1 !important;
    border-left: none !important;
}

/* Target all header text elements in dialogs */
.e-dialog h1,
.e-dialog h2,
.e-dialog h3,
.e-dialog h4,
.e-dialog h5,
.e-dialog h6,
.e-dialog .e-dlg-header *,
.e-dialog header *,
.modern-organization-dialog .dialog-title,
.modern-user-dialog .dialog-title,
.custom-login-dialog .login-header span {
    color: #ffffff !important;
}

/* Login dialog header - lighter shade of the default blue gradient */
.custom-login-dialog .e-dlg-header,
.custom-login-dialog .e-dlg-header-content,
.custom-login-dialog .e-dlg-header-content .e-dlg-header {
    /*background: #0369a1 !important;*/
    background: linear-gradient(90deg, #0c4a6e 0%, #0369a1 100%) !important;
    border: none !important;
    border-bottom: 1px solid #0369a1 !important;
}

/* ============================================
   DROPDOWN MENU STYLES (Global - Body Level)
   HIGH SPECIFICITY TO OVERRIDE SYNCFUSION
   ============================================ */

/* ── Glassmorphism navbar dropdown popup ── */
html body .e-dropdown-popup,
html body .e-dropdown-popup.e-popup,
html body div.e-dropdown-popup {
    z-index: 99999 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 4px !important;
    overflow: visible !important;
}

html body .e-dropdown-popup ul,
html body .e-dropdown-popup .e-ul,
html body .e-dropdown-popup ul.e-ul {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    list-style: none !important;
    overflow: hidden !important;
}

html body .e-dropdown-popup ul .e-item,
html body .e-dropdown-popup ul li.e-item,
html body .e-dropdown-popup .e-ul .e-item,
html body .e-dropdown-popup .e-ul li.e-item {
    background: transparent !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1a1a2e !important;
    list-style: none !important;
    transition: background 0.12s ease !important;
}

html body .e-dropdown-popup ul .e-item:hover,
html body .e-dropdown-popup ul li.e-item:hover,
html body .e-dropdown-popup ul .e-item.e-focused,
html body .e-dropdown-popup ul .e-item.e-active,
html body .e-dropdown-popup ul .e-item.e-hover,
html body .e-dropdown-popup .e-ul .e-item:hover,
html body .e-dropdown-popup .e-ul li.e-item:hover,
html body .e-dropdown-popup .e-ul .e-item.e-focused,
html body .e-dropdown-popup .e-ul .e-item.e-active {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #1e40af !important;
    opacity: 1 !important;
}

html body .e-dropdown-popup ul .e-item .e-menu-icon,
html body .e-dropdown-popup .e-ul .e-item .e-menu-icon {
    margin-right: 10px !important;
    color: #1e40af !important;
    font-size: 15px !important;
}

html body .e-dropdown-popup .e-ripple-container,
html body .e-dropdown-popup .e-ripple-element {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: transparent !important;
}

html body .e-dropdown-popup ul .e-item:focus,
html body .e-dropdown-popup ul .e-item:active,
html body .e-dropdown-popup .e-ul .e-item:focus,
html body .e-dropdown-popup .e-ul .e-item:active {
    outline: none !important;
    background: rgba(255, 255, 255, 0.7) !important;
}

html body .e-dropdown-popup ul .e-item::before,
html body .e-dropdown-popup ul .e-item::after,
html body .e-dropdown-popup .e-ul .e-item::before,
html body .e-dropdown-popup .e-ul .e-item::after {
    display: none !important;
    content: none !important;
}


html body .e-ddl.e-popup .e-list-item {
    background: transparent !important;
    color: #1a1a2e !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    min-height: 38px !important;
    line-height: 20px !important;
    border: none !important;
}

html body .e-ddl.e-popup .e-list-item:hover,
html body .e-ddl.e-popup .e-list-item.e-item-focus,
html body .e-ddl.e-popup .e-list-item.e-hover {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #1e40af !important;
}

html body .e-ddl.e-popup .e-list-item.e-active {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #1e40af !important;
    font-weight: 500 !important;
}

/* ── Global Textbox Focus Border ── */
.e-input-group.e-input-focus:not(.e-disabled),
.e-input-group.e-control-wrapper.e-input-focus:not(.e-disabled),
.e-float-input.e-input-focus:not(.e-disabled),
.e-float-input.e-control-wrapper.e-input-focus:not(.e-disabled),
.e-input-group:not(.e-disabled):focus-within,
.e-input-group.e-control-wrapper:not(.e-disabled):focus-within,
.e-float-input:not(.e-disabled):focus-within,
.e-float-input.e-control-wrapper:not(.e-disabled):focus-within {
    border: 2px solid #0369a1 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Kill Syncfusion's animated bottom focus line — globally */
.e-input-group::before,
.e-input-group::after,
.e-input-group.e-control-wrapper::before,
.e-input-group.e-control-wrapper::after,
.e-float-input::before,
.e-float-input::after,
.e-float-input.e-control-wrapper::before,
.e-float-input.e-control-wrapper::after,
.e-input-group.e-input-focus::before,
.e-input-group.e-input-focus::after,
.e-input-group.e-control-wrapper.e-input-focus::before,
.e-input-group.e-control-wrapper.e-input-focus::after,
.e-float-input.e-input-focus::before,
.e-float-input.e-input-focus::after {
    display: none !important;
    content: '' !important;
    width: 0 !important;
    height: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
    animation: none !important;
    transition: none !important;
    visibility: hidden !important;
}