html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/*Manual CSS*/
.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    min-width: 90px;
    text-align: center;
}

    .chip.approved {
        color: #28a745;
        border-color: #28a745;
    }

    .chip.draft {
        color: #ffc107;
        border-color: #ffc107;
    }

    .chip.all {
        color: #ffc107;
        border-color: #ffc107;
    }

    .chip.archived {
        color: #dc3545;
        border-color: #dc3545;
    }

    .chip.unknown {
        color: #6c757d;
        border-color: #6c757d;
    }


.editor-wrapper {
    height: 600px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.document-editor-container {
    height: 100%;
}

.e-de-container {
    height: 100% !important;
}

/*Page Loader Overlay*/

.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-container {
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}


/*Editor Overlay*/
.editor-wrapper {
    position: relative;
}

.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0); /* invisible */
    z-index: 10;
    cursor: not-allowed;
}


.fixed-dropdown .e-dropdownbase .e-list-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* or use width: 200px for strict fixed width */
}

.fixed-dropdown .e-dropdownbase {
    width: 220px !important; /* popup width */
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.3); /* semi-transparent overlay */
    display: flex;
    align-items: center;
    justify-content: center;
}

.e-list-item {
    height: 50px !important;
}

[draggable="true"] {
    user-select: none;
}

/*Used input version history component*/
.version-history-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.e-custom-grid .e-headercell {
    font-weight: 600;
    background-color: #f8f9fa;
}


.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease-in-out;
}

/* Animate Modal Appearance */
.animate-fade-in {
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom Modal Styles */
.app-sfmodal.e-dialog {
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0;
}

.app-sfmodal .e-dlg-header-content {
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    cursor: move; /* drag cue */
}

.app-sfmodal .e-dlg-header .e-icon-dlg-close {
    color: white;
    opacity: 0.85;
}

    .app-sfmodal .e-dlg-header .e-icon-dlg-close:hover {
        opacity: 1;
        color: #ffc107;
    }

.modal-body-custom {
    padding: 24px;
    font-size: 0.95rem;
    background-color: #fff;
}

/* LoginLayout */
#LoginLayout input {
    max-width: 100% !important;
}

/* MainLayout */
html, body {
    height: 100%;
    margin: 0;
    /*overflow: hidden;*/
}

#MainLayout.layout-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#MainLayout header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

#MainLayout footer {
    position: sticky;
    bottom: 0;
    z-index: 1050;
    background-color: white;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
}

#MainLayout .main-content-container {
    flex: 1 1 auto;
    display: flex;
    /*flex-direction: row;*/
    overflow: hidden;
    /*height: calc(100% - 120px);*/
}

#MainLayout .content-wrapper {
    flex-grow: 1;
    overflow: auto;
    /*display: flex;
    flex-direction: column;*/
    padding: 1rem;
    background-color: #f8f9fa;
}

.e-toast-container {
    z-index: 10005 !important;
}

/* NavMenu */
#sidebar .sidebar-bottom-link ul li button {
    color: #FFFFFF !important;
}

    #sidebar .sidebar-bottom-link ul li button .icon {
        width: 24px !important;
    }

#sidebar .sidebar-bottom-link ul li button {
    border-radius: 6px !important;
    font-size: 16px !important;
    line-height: normal !important;
    color: #949494 !important;
    border: 0 !important;
    width: 100% !important;
    padding: 8px 10px !important;
}

    #sidebar .sidebar-bottom-link ul li button:hover {
        color: #FFFFFF !important;
        background: #252525 !important;
        border-radius: 6px !important;
    }

        #sidebar .sidebar-bottom-link ul li button:hover .icon img {
            -webkit-filter: brightness(100) !important;
            filter: brightness(100) !important;
        }

/* AppModal */

/* Dialog container - keep black header, but not entire background */
#sfAppModal.app-sfmodal.e-dialog {
    background-color: transparent; /* Let child elements control bg */
    color: #fff;
    border-radius: 10px;
    /*box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);*/
    box-shadow: none;
}

/* Dialog header (black) */
#sfAppModal.app-sfmodal .e-dlg-header-content {
    background: #111;
    border-bottom: 1px solid #333;
    color: #fff;
}

    /* Header title */
    #sfAppModal.app-sfmodal .e-dlg-header-content .e-dlg-header {
        color: #fff !important;
        font-weight: 600;
    }

/* Close icon */
#sfAppModal.app-sfmodal .e-dlg-closeicon-btn {
    color: #fff;
}

/* Body background white, text black */
#sfAppModal.app-sfmodal .modal-body-custom {
    background-color: #fff;
    color: #000;
    padding: 1rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Buttons */

.btn-save {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-publish {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-back {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-clear {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-apply {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-select {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-approve {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-show {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-cancel {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.btn-new-add {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

#sfAppModal.app-sfmodal .e-btn {
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    margin: 0 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

    #sfAppModal.app-sfmodal .e-btn:hover {
        background-color: #444;
        border-color: #666;
    }

/* Red danger button */
#sfAppModal.app-sfmodal .e-btn-danger {
    background-color: #aa0000;
    border-color: #cc0000;
    color: #fff;
}

    #sfAppModal.app-sfmodal .e-btn-danger:hover {
        background-color: #cc0000;
        border-color: #ff0000;
    }

/* VersionHistory */
#VersionHistory .version-history-grid .e-gridheader th,
#VersionHistory .version-history-grid .e-rowcell {
    font-size: 0.925rem;
    padding: 0.75rem;
}

#VersionHistory .version-history-grid .e-row:hover {
    background-color: #f9f9f9;
}


/* Pdf Viewer Popup */
#pdfview-sfmodal .e-dlg-header-content {
    background: #111;
    border-bottom: 1px solid #333;
    color: #fff;
}

    /* Header title */
    #pdfview-sfmodal .e-dlg-header-content .e-dlg-header {
        color: #fff !important;
        font-weight: 600;
    }

/* Body background white, text black */
#pdfview-sfmodal .modal-body-custom {
    background-color: #fff;
    color: #000;
    padding: 1rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Remove white border around header */
.app-pdfview-sfmodal .e-dlg-header-content {
    background-color: #1a1a1a !important;
    border-bottom: none !important;
    color: white !important;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

/* Set dialog title text to white */
.app-pdfview-sfmodal .e-dlg-header {
    color: white !important;
}

/* Set close icon color to white */
.app-pdfview-sfmodal .e-btn-icon.e-icon-dlg-close::before {
    color: white !important;
}

/* Optional: Remove dialog box shadow or borders if needed */
.app-pdfview-sfmodal .e-dialog {
    border: none !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
}

.app-pdfview-sfmodal .btn.btn-secondary {
    background-color: #333 !important;
    color: white !important;
    border: none !important;
}

.e-icon-dlg-close.e-icons.e-btn-icon {
    margin-top: 5px !important;
}

.e-spinner-pane .e-spinner-inner .e-spin-bootstrap {
    animation: spin 1s linear infinite;
}

.project-custom-table .e-spinner-pane {
    display: none !important;
}

.costing-grid-shell .e-spinner-pane {
    display: none !important;
}

.custom-table .e-spinner-pane {
    display: none !important;
}

.project-stage-document-table .e-spinner-pane {
    display: none !important;
}

.section-table.custom-table .e-spinner-pane {
    display: none !important;
}

.region-table.custom-table .e-spinner-pane {
    display: none !important;
}

.client-region-table.custom-table .e-spinner-pane {
    display: none !important;
}

.client-group-table.custom-table .e-spinner-pane {
    display: none !important;
}

.user-table.custom-table .e-spinner-pane {
    display: none !important;
}

.authority-table.custom-table .e-spinner-pane {
    display: none !important;
}

.item-table.custom-table .e-spinner-pane {
    display: none !important;
}

.supplier-table.custom-table .e-spinner-pane {
    display: none !important;
}

.dashboard-task-table .e-spinner-pane {
    display: none !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#pdfview-sfmodal {
    height: 750px !important;
}

.custom-table {
    height: calc(100% - 25%) !important;
}

#contacts-table .form-control.e-input-group.e-valid-input.invalid {
    display: block !important;
}

.project-custom-table .e-content.e-yscroll {
    height: 200px !important; /* default for mobile */
}

@media (min-width: 768px) { /* tablet */
    .project-custom-table .e-content.e-yscroll {
        height: 300px !important;
    }
}

@media (min-width: 1024px) { /* laptop/desktop */
    .project-custom-table .e-content.e-yscroll {
        height: 450px !important;
    }
}

.e-grid .custom-anchor-link {
    cursor: pointer !important;
    color: inherit;
    text-decoration: none;
}

    .e-grid .custom-anchor-link:hover {
        color: #006bb7 !important;
        text-decoration: underline !important;
        cursor: pointer !important;
    }

.notification-title {
    font-size: 14px !important;
}

.notification-description {
    font-size: 11px !important;
}
