/* 
 * Global Modals
 * ----------------------------------------------------------------------------
 * Unified styles for all modal containers in the application
 */

.ce-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ce-modal-window {
    background: var(--theme-ui-surface-solid, #ffffff);
    color: var(--theme-ui-text-main, #111827);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);

    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ce-modal-window.ce-modal-sm {
    max-width: 400px;
}

.ce-modal-window.center-text {
    text-align: center;
}


.ce-modal-body {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ce-modal-text {
    color: var(--theme-ui-text-muted, #6b7280);
    margin-bottom: 2rem;
}

.ce-modal-loading-text {
    text-align: center;
    color: var(--theme-ui-text-muted, #6b7280);
    padding: 2rem;
}

.ce-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Block Settings Specifics */
.ce-modal-error-details {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--theme-ui-bg);
    border-radius: 4px;
    font-family: var(--font-monospace);
    font-size: 0.85em;
    color: var(--theme-ui-text-muted);
}

.ce-modal-textarea {
    width: 100%;
    min-height: 250px;
    border: 1px solid var(--theme-ui-border, #d1d5db);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-monospace);
    font-size: 0.875rem;
    color: var(--theme-ui-text-main, #111827);
    background: var(--theme-ui-glass-bg, #f9fafb);
    resize: vertical;
    line-height: 1.5;

}

.ce-modal-textarea:focus {
    outline: none;
    border-color: var(--theme-ui-primary, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}


/* Modal Tabs Layout (Standard) */
.ce-modal-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: -1px;
    z-index: 2;
    position: relative;
    padding-left: 20px;
}

.ce-modal-tab-btn {
    padding: 10px 16px;
    border: 1px solid var(--theme-ui-border, #e5e7eb);
    border-bottom: 1px solid var(--theme-ui-primary, #3b82f6);
    border-radius: 4px 4px 0 0;
    background: var(--theme-ui-surface-alt, #f3f4f6);
    color: var(--theme-ui-text-main, #111827);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.ce-modal-tab-btn:hover:not(.active) {
    background: var(--theme-ui-surface-hover, #e5e7eb);
}

.ce-modal-tab-btn.active {
    background: var(--theme-ui-primary, #3b82f6);
    color: white;
    border-color: var(--theme-ui-primary, #3b82f6);
    border-bottom-color: var(--theme-ui-primary, #3b82f6);
}

.ce-modal-tab-content-wrapper {
    border: 1px solid var(--theme-ui-primary, #3b82f6);
    border-radius: 4px;
    padding: 24px;
    background: var(--theme-ui-surface-solid, #ffffff);
    min-height: 300px;
    position: relative;
    z-index: 1;
}
