/* ============================================ */
/* DevExpress Component Overrides */
/* ============================================ */

/* DxCheckBox Switch - Green variant */
.dxbl-checkbox.switch-green {
    --dxbl-checkbox-switch-checked-bg: #16a34a;
    --dxbl-checkbox-switch-checked-hover-bg: #15803d;
}

[data-mode="dark"] .dxbl-checkbox.switch-green {
    --dxbl-checkbox-switch-checked-bg: #22c55e;
    --dxbl-checkbox-switch-checked-hover-bg: #16a34a;
}

/* DxMemoEditor */
dxbl-memo-editor {
    width: 100%;
}

/* DxLoadingPanel - Light mode */
.dxbl-loading-panel-container.dxbl-loading-panel-shading {
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.7) !important;
}

.dxbl-loading-panel .dxbl-loading-panel-underlay {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

.dxbl-loading-panel .dxbl-loading-panel-message,
.dxbl-loading-panel-container .dxbl-loading-panel-message {
    color: rgba(0, 0, 0, 0.6) !important;
}

.dxbl-loading-panel .dxbl-wait-indicator,
.dxbl-loading-panel-container .dxbl-wait-indicator {
    --dxbl-wait-indicator-color: rgba(0, 0, 0, 0.6) !important;
}

/* DxLoadingPanel - Dark mode */
[data-mode="dark"] .dxbl-loading-panel-container.dxbl-loading-panel-shading {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

[data-mode="dark"] .dxbl-loading-panel .dxbl-loading-panel-underlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

[data-mode="dark"] .dxbl-loading-panel .dxbl-loading-panel-message,
[data-mode="dark"] .dxbl-loading-panel-container .dxbl-loading-panel-message {
    color: rgba(255, 255, 255, 0.8) !important;
}

[data-mode="dark"] .dxbl-loading-panel .dxbl-wait-indicator,
[data-mode="dark"] .dxbl-loading-panel-container .dxbl-wait-indicator {
    --dxbl-wait-indicator-color: rgba(255, 255, 255, 0.8) !important;
}

/* ============================================ */
/* Toast Notifications */
/* ============================================ */

/* Full width toaster */
dxbl-toast-portal[name="FullWidthToast"] {
    padding: 0 !important;
    border-radius: 0 !important;
}

dxbl-toast-portal[name="FullWidthToast"] .dxbl-toast {
    margin: 1px !important;
}

dxbl-toast-portal[name="FullWidthToast"] .dxbl-toast .dxbl-toast-accent-line {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

dxbl-toast-portal[name="FullWidthToast"] .dxbl-toast-portal .dxbl-toast {
    --dxbl-toast-border-radius: 0 !important;
}

/* Toast z-index */
.dxbl-toast-portal {
    z-index: 9999 !important;
}

/* Toast word wrapping */
.dxbl-toast {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.dxbl-toast .dxbl-toast-body {
    word-break: break-word !important;
    line-height: 1.5 !important;
}

/* Toast icon alignment */
.dxbl-toast .dxbl-toast-icon-column {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 3rem !important;
    width: 3rem !important;
}

/* Toast icon size */
.dxbl-toast .dxbl-toast-icon-column svg,
.dxbl-toast .dxbl-toast-icon-column i {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 2rem !important;
}

/* Toast content spacing */
.dxbl-toast .dxbl-toast-content {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
}

/* Toast header and body padding */
.dxbl-toast .dxbl-toast-header {
    padding: 0 !important;
}

.dxbl-toast .dxbl-toast-body {
    padding: 0 !important;
}

/* Mobile toast adjustments */
@media (max-width: 480px) {
    .main-content .dxbl-toast-portal {
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: calc(100% - 1rem) !important;
        max-width: none !important;
    }

    .main-content .dxbl-toast-portal .dxbl-toast {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 0.5rem 0 !important;
    }

    .dxbl-toast .dxbl-toast-header {
        padding: 0.625rem 0.75rem !important;
    }

    .dxbl-toast .dxbl-toast-body {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    .dxbl-toast .dxbl-toast-title {
        font-size: 0.875rem !important;
    }

    .dxbl-toast .dxbl-toast-icon-column {
        align-self: center !important;
        vertical-align: middle !important;
    }

    .dxbl-toast .dxbl-toast-content {
        display: flex !important;
        align-items: center !important;
    }

    .dxbl-toast .dxbl-toast-text-column {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
}

/* Small tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .main-content .dxbl-toast-portal {
        max-width: 320px !important;
    }
}
