/* valupe-dialog.css — Diálogos de Valupe (confirm / alert / prompt). 0.5.343
 *
 * Autónomo: cada token lleva su valor por defecto (los de assets/shared/tokens.css) para que
 * se vea igual en el dashboard, en las extensiones y en wp-admin, donde no hay tokens.
 * z-index por encima del `.ba-modal-overlay` (100) y de la barra de wp-admin (99999). */

.vd-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 120ms ease;
    font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}
.vd-overlay--open { opacity: 1; }
.vd-overlay--leaving { opacity: 0; }

.vd {
    box-sizing: border-box;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg, #ffffff);
    color: var(--fg, #0f172a);
    border: 1px solid var(--border, #e4e7ec);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, 0.12));
    padding: 24px 24px 20px;
    transform: translateY(6px) scale(0.985);
    transition: transform 140ms ease;
}
.vd-overlay--open .vd { transform: none; }
.vd *, .vd *::before, .vd *::after { box-sizing: border-box; }

.vd__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--fg, #0f172a);
}

.vd__body { margin: 0; }
.vd__text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--fg-muted, #475569);
    text-wrap: pretty;
    overflow-wrap: anywhere;
}
.vd__text:last-child { margin-bottom: 0; }
/* Sin título: el primer párrafo hace de titular. */
.vd__body--lead .vd__text:first-child {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--fg, #0f172a);
}

.vd__input {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 9px 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: var(--fg, #0f172a);
    background: var(--bg, #ffffff);
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: var(--radius, 8px);
    outline: none;
    resize: vertical;
}
.vd__input:focus {
    border-color: var(--accent, #4338ca);
    box-shadow: 0 0 0 3px var(--accent-ring, rgba(67, 56, 202, 0.18));
}
.vd__error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--danger, #b91c1c);
}

.vd__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.vd__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 88px;
    padding: 8px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius, 8px);
    border: 1px solid var(--border-strong, #cbd5e1);
    background: var(--bg, #ffffff);
    color: var(--fg, #0f172a);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.vd__btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring, rgba(67, 56, 202, 0.18)); }

.vd__btn--primary {
    background: var(--accent, #4338ca);
    border-color: var(--accent, #4338ca);
    color: var(--accent-fg, #ffffff);
}
.vd__btn--primary:hover { background: var(--accent-hover, #3730a3); border-color: var(--accent-hover, #3730a3); }

.vd__btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--fg-muted, #475569);
}
.vd__btn--ghost:hover { background: var(--bg-subtle, #f1f5f9); color: var(--fg, #0f172a); }

.vd__btn--danger {
    background: var(--danger, #b91c1c);
    border-color: var(--danger, #b91c1c);
    color: #fff;
}
.vd__btn--danger:hover { background: #991b1b; border-color: #991b1b; }

@media (max-width: 480px) {
    .vd { padding: 20px 18px 16px; }
    .vd__actions { flex-direction: column-reverse; }
    .vd__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .vd-overlay, .vd { transition: none; }
}
