.lab-dialog-layer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lab-dialog-layer--show {
    display: flex;
}

.lab-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
}

.lab-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    padding: 24px;
    border: 1px solid var(--ds-gray-200, #e5e8f0);
    border-radius: 16px;
    background: var(--ds-gray-50, #ffffff);
    box-shadow: var(--ds-shadow-modal, 0 16px 40px rgba(15, 23, 42, 0.24));
    color: var(--ds-gray-900, #191f28);
}

.lab-dialog__icon {
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #eef0fb;
    color: #4a54c8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}

.lab-dialog__icon::before {
    content: "i";
}

.lab-dialog__icon--warning {
    background: #fff6e7;
    color: #d97706;
}

.lab-dialog__icon--warning::before,
.lab-dialog__icon--danger::before {
    content: "!";
}

.lab-dialog__icon--danger {
    background: #fff0f0;
    color: #e5484d;
}

.lab-dialog__icon--success {
    background: #e9f9f1;
    color: #0f8a5f;
}

.lab-dialog__icon--success::before {
    content: "✓";
}

.lab-dialog__title {
    margin: 0;
    color: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.lab-dialog__message {
    margin: 8px 0 0;
    color: var(--ds-gray-600, #6b7684);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
    word-break: keep-all;
}

.lab-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

.lab-dialog__button {
    min-width: 78px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #4a54c8;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.lab-dialog__button--cancel {
    border-color: var(--ds-gray-200, #d1d6e0);
    background: transparent;
    color: var(--ds-gray-700, #475569);
}

.lab-dialog__button--danger {
    background: #e5484d;
}

.lab-dialog__button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 84, 200, 0.25);
}

html[data-theme="dark"] .lab-dialog {
    border-color: var(--ds-gray-200, #4a5669);
    background: var(--ds-gray-50, #1d2430);
    color: var(--ds-gray-900, #f5f7fa);
}

html[data-theme="dark"] .lab-dialog__message {
    color: var(--ds-gray-600, #c4ccd7);
}

html[data-theme="dark"] .lab-dialog__button--cancel {
    border-color: var(--ds-gray-200, #4a5669);
    color: var(--ds-gray-800, #e5e8f0);
}

@media (max-width: 480px) {
    .lab-dialog {
        padding: 20px;
    }

    .lab-dialog__actions {
        margin-top: 20px;
    }

    .lab-dialog__button {
        flex: 1 1 0;
    }
}
