/* Common dialog styles for all themes */
.rz-dialog {
    height: auto;
    max-height: none;
}

.rz-dialog-content {
    height: auto;
    max-height: none;
    overflow-y: visible;
}

.rz-dialog-wrapper {
    max-height: 90vh;
}

/* Dark theme styles for Radzen dialogs */
html[data-theme='dark'] .rz-dialog {
    background-color: #2d2d2d;
    color: #e1e1e1;
    border: 1px solid #444;
}

html[data-theme='dark'] {
    --rz-dialog-title-color: #ffffff;
}

html[data-theme='dark'] .rz-dialog-titlebar {
    background-color: #333;
    border-bottom: 1px solid #444;
}

html[data-theme='dark'] .rz-dialog-content {
    background-color: #2d2d2d;
    color: #e1e1e1;
}

html[data-theme='dark'] .rz-dialog-mask {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Dialog form elements */
html[data-theme='dark'] .rz-textbox,
html[data-theme='dark'] .rz-dropdown,
html[data-theme='dark'] .rz-spinner,
html[data-theme='dark'] .rz-inputtext,
html[data-theme='dark'] .rz-dropdown-panel,
html[data-theme='dark'] .rz-dropdown-items-wrapper,
html[data-theme='dark'] .rz-dropdown-trigger {
    background-color: #333;
    color: #e1e1e1;
    border-color: #555;
}

/* Dialog content structure */
.dialog-content {
    display: flex;
    flex-direction: column;
}

.dialog-body {
    padding: 15px 0;
}

/* Dialog footer and buttons */
.dialog-buttons, .dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Dialog buttons */
html[data-theme='dark'] .rz-button.rz-primary {
    background-color: #4da6ff;
    color: #fff;
}

html[data-theme='dark'] .rz-button.rz-secondary {
    background-color: #555;
    color: #e1e1e1;
}

/* Dialog styling */
html[data-theme='dark'] .dialog-header {
    background-color: #333;
    border-bottom: 1px solid #444;
}

html[data-theme='dark'] .dialog-body {
    background-color: #2d2d2d;
}

html[data-theme='dark'] .dialog-footer {
    background-color: #2d2d2d;
}

/* Collection Configuration Dialog */
.collection-config-dialog {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.collection-config-dialog .form-group {
    margin-bottom: 15px;
}

.collection-config-dialog .form-control {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.collection-config-dialog .input-group {
    display: flex;
    gap: 5px;
}

.collection-config-dialog .text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

.collection-config-dialog .alert {
    padding: 10px;
    border-radius: 4px;
}

.collection-config-dialog .alert-info {
    background-color: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

.collection-config-dialog .form-check {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.collection-config-dialog .form-check-input {
    margin-right: 8px;
}

/* Confirmation Dialog */
.confirmation-dialog {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.confirmation-message {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.confirmation-detail {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Dark mode adjustments for confirmation dialog */
html[data-theme='dark'] .confirmation-message {
    color: #e1e1e1;
}

html[data-theme='dark'] .confirmation-detail {
    color: #aaa;
}

/* ===== PROPER Z-INDEX MANAGEMENT FOR DIALOGS ===== */
/* Create proper stacking context hierarchy */

.rz-dialog-wrapper {
    isolation: isolate;
    /* This creates a new stacking context for dialogs */
}

.rz-dialog {
    z-index: 1055;
    /* Standard dialog z-index, above modals (1050) */
}

.rz-dialog-content {
    position: relative;
    z-index: 1;
}


