/*
 * dialog.css — Base styles for the modal dialog control (controls/dialog.js).
 *
 * dialog.js renders a fixed overlay (default class .kanban-dialog-overlay,
 * overridable via opts.className), a centered card (.kanban-dialog), an
 * h3 title, and an action row (.dialog-actions) of buttons whose variant
 * maps to .btn-primary / .btn-secondary / .btn-danger.
 *
 * Wizard already scopes its own overrides under .wizard-overlay (see
 * wizard.css), so adding these base rules does not change wizard chrome —
 * those rules win on specificity. Apps that opt into a custom overlay
 * className (e.g. content-drawer's .lp-confirm-overlay) inherit the base
 * positioning here and can layer their own card chrome on top.
 *
 * Uses the project's theme tokens defined in shell.css (--bg-panel, --border,
 * --accent, --text-*, --radius). Light/dark themes swap automatically.
 */

/* ── Overlay (base + default class) ─────────────────────────────── */

.kanban-dialog-overlay,
.lp-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 16px;
    box-sizing: border-box;
}

/* ── Card ───────────────────────────────────────────────────────── */

.kanban-dialog {
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px 24px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
}

.kanban-dialog > h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* ── Form fields (e.g. rename input) ────────────────────────────── */

.kanban-dialog-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.kanban-dialog-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
}

.kanban-dialog-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Action row ─────────────────────────────────────────────────── */

.dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

/* ── Button variants ────────────────────────────────────────────── */

.kanban-dialog .btn-secondary,
.kanban-dialog .btn-primary,
.kanban-dialog .btn-danger {
    padding: 8px 18px;
    border-radius: var(--radius, 8px);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    transition: background 120ms ease, filter 120ms ease, border-color 120ms ease;
}

.kanban-dialog .btn-secondary {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.kanban-dialog .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.kanban-dialog .btn-primary {
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
}

.kanban-dialog .btn-primary:hover { background: var(--accent-hover, var(--accent)); filter: brightness(1.05); }
.kanban-dialog .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.kanban-dialog .btn-danger {
    border: 1px solid transparent;
    background: #ef4444;
    color: #fff;
}

.kanban-dialog .btn-danger:hover { filter: brightness(1.08); }
