@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

#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;
    }

.dxbl-drawer .dxbl-drawer-content {
    padding: 0px !important;
    overflow: auto;
    padding-bottom : 10px;
}

.grid-toolbar-delete {
    -webkit-mask-image: url("images/icons/delete.svg");
    mask-image: url("images/icons/delete.svg");
}



.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    background-color: #00aaff;
    position: relative;
}

.login-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 300px;
}

.logo {
    width: 100px;
    margin-bottom: 1rem;
}

h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

h3 {
    margin: 0.5rem 0 1rem;
    font-size: 1.2rem;
    color: #666;
}

.login-button {
    display: block;
    width: 100%;
    margin-top: 1rem;
}

footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: white;
    padding: 1rem;
}

/* DevExpress Tabs Stabilization - Prevent ResizeObserver issues */
.dxbl-tabs {
    contain: layout style;
    overflow: hidden;
}

.dxbl-tabs .dxbl-tabs-content {
    contain: layout;
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden;
}

.dxbl-tab-page {
    contain: layout style;
    transform: translateZ(0);
}

/* Prevent layout shifts during tab transitions */
.dxbl-tabs .dxbl-tabs-content {
    min-height: 200px; /* Adjust as needed */
    transition: none; /* Disable transitions that might cause ResizeObserver loops */
}

/* Additional stability for project management page */
.card-body .dxbl-tabs {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body .dxbl-tabs .dxbl-tabs-content {
    flex: 1;
    overflow: auto;
}

/* Prevent ResizeObserver loops from dynamic content */
.project-management-container {
    contain: layout style;
    will-change: auto;
}

/* Google Maps Address Search Layout */
.d-flex.align-items-stretch {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.flex-fill .dx-textbox,
.flex-fill .dxbl-textbox {
    width: 100% !important;
    height: 100% !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

/* Ensure DevExpress TextBox inputs are clickable and have proper styling */
.dx-texteditor-input {
    pointer-events: auto !important;
    background-color: white !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    cursor: text !important;
    width: 100% !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
}

.dx-texteditor-input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

.dx-texteditor {
    width: 100% !important;
    display: block !important;
}

/* Modal form layout improvements */
.dx-popup-content .dx-formlayout {
    padding: 1rem;
}

.dx-popup-content .dx-formlayout-item {
    margin-bottom: 1rem;
}

.dx-popup-content .dx-formlayout-item-content {
    width: 100% !important;
}

/* Address search specific styling */
#siteAddressInput,
#siteLatitudeInput,
#siteLongitudeInput,
#siteNameInput {
    width: 100% !important;
    display: block !important;
}

#siteAddressInput .dx-texteditor-input,
#siteLatitudeInput .dx-texteditor-input,
#siteLongitudeInput .dx-texteditor-input,
#siteNameInput .dx-texteditor-input {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Force DevExpress TextBox to be editable and properly sized */
.dx-texteditor.dx-textbox {
    width: 100% !important;
    position: relative !important;
}

.dx-texteditor.dx-textbox .dx-texteditor-input {
    width: 100% !important;
    height: auto !important;
    min-height: 38px !important;
    padding: 6px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    background: white !important;
    color: #212529 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.dx-texteditor.dx-textbox .dx-texteditor-input:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.dx-texteditor.dx-textbox .dx-texteditor-input:disabled,
.dx-texteditor.dx-textbox .dx-texteditor-input[readonly] {
    background-color: #e9ecef !important;
    opacity: 1 !important;
}

/* Ensure placeholders are visible */
.dx-texteditor.dx-textbox .dx-texteditor-input::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

/* Fix for DevExpress container styling that might interfere */
.dx-popup-content .dx-formlayout-item-content {
    width: 100% !important;
}

.dx-popup-content .dx-formlayout-item-content > div {
    width: 100% !important;
}

/* Force proper sizing for DevExpress components in flex layouts */
.flex-fill {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
}

.flex-fill > .dx-textbox,
.flex-fill > .dxbl-textbox {
    width: 100% !important;
    display: block !important;
}

.flex-fill > .dx-textbox > .dx-texteditor-input,
.flex-fill > .dxbl-textbox > .dx-texteditor-input {
    width: 100% !important;
    min-width: 200px !important;
    display: block !important;
}

/* Ensure DevExpress components don't collapse */
.dx-textbox,
.dxbl-textbox {
    min-width: 200px !important;
    width: 100% !important;
}

/* Force proper height alignment in flex containers */
.d-flex.align-items-stretch > * {
    min-height: 38px !important;
}

.d-flex.align-items-stretch .dx-button,
.d-flex.align-items-stretch .dxbl-button {
    height: auto !important;
    align-self: stretch !important;
}

/* Bootstrap input-group styling for DevExpress components */
.input-group {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    width: 100% !important;
}

.input-group > .dx-textbox,
.input-group > .dxbl-textbox {
    position: relative !important;
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
}

.input-group > .dx-textbox .dx-texteditor-input,
.input-group > .dxbl-textbox .dx-texteditor-input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}

.input-group > .dx-button,
.input-group > .dxbl-button {
    position: relative !important;
    margin-left: -1px !important;
    z-index: 2 !important;
}

.input-group > .dx-button .dx-button-content,
.input-group > .dxbl-button .dx-button-content {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.form-control-like .dx-texteditor-input {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.form-control-like .dx-texteditor-input:focus {
    color: #212529 !important;
    background-color: #fff !important;
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Google Places Autocomplete styling */
.pac-container {
    background-color: #fff !important;
    z-index: 10000 !important;
    border-radius: 4px !important;
    border: 1px solid #ced4da !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    margin-top: 1px !important;
}

.pac-item {
    border-bottom: 1px solid #e9ecef !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.pac-item:hover {
    background-color: #f8f9fa !important;
}

.pac-item:last-child {
    border-bottom: none !important;
}

.pac-item-selected {
    background-color: #e3f2fd !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: #0d6efd !important;
}

.pac-item-query {
    color: #212529 !important;
}

.pac-icon {
    margin-right: 8px !important;
    margin-top: 2px !important;
}

/* Ensure autocomplete works well with DevExpress modals */
.dx-popup-content .pac-container {
    z-index: 10001 !important;
}

/* Full width textboxes in modal */
.dx-popup-content .dx-formlayout-item[data-col-span="12"] .dx-textbox,
.dx-popup-content .dx-formlayout-item[data-col-span="12"] .dxbl-textbox {
    width: 100% !important;
}

.dx-popup-content .dx-formlayout-item .dx-textbox,
.dx-popup-content .dx-formlayout-item .dxbl-textbox {
    width: 100% !important;
    min-width: 100% !important;
}

.dx-popup-content .input-group {
    width: 100% !important;
}

.dx-popup-content .input-group .flex-fill {
    flex: 1 1 auto !important;
    width: 100% !important;
}

.dx-popup-content .input-group .flex-shrink-0 {
    flex: 0 0 auto !important;
}

/* Enhanced modal footer styling */
.dx-popup-footer {
    border-top: 1px solid #dee2e6 !important;
    background-color: #f8f9fa !important;
}

.dx-popup-footer .d-flex {
    align-items: center !important;
}

/* Loading state for buttons */
.dx-button.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* TimeSheet Page - MwTabs fills MwFilterPage ChildContent 100% and responds to page height changes */
/* No media queries needed - using 100% height approach that automatically adjusts */


