/* ═══════════════════════════════════════════════════════════════════
   Shared dialog + Venn diagram styles.
   Used by: ListComparisonDialog, ContactsFromGroupsDialog, and any future
   Venn-based set-operation dialog. All tokens come from the theme.
   ═══════════════════════════════════════════════════════════════════ */

.dialog-backdrop {
    position: fixed;
    inset: 0;
    background: var(--backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-panel {
    background: var(--content-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    width: 640px;
    max-width: 90vw;
    padding: 1.5rem;
}

/* Narrower variant for simpler dialogs (e.g. ContactsFromGroupsDialog). */
.dialog-panel.dialog-panel-narrow {
    width: 560px;
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 0.25rem 0;
}

.dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.1s, color 0.1s;
}

.dialog-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.dialog-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

.dialog-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Field row (label over control) ── */

.field-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.field-input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1.5px solid var(--input-border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.field-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.source-info {
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1.5px solid var(--input-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ── Venn diagram operation selector ── */

.venn-row {
    display: flex;
    gap: 0.5rem;
}

.venn-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    border: 2px solid var(--divider);
    border-radius: 8px;
    background: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
}

.venn-option:hover {
    border-color: var(--color-darkblue-70);
    background: var(--color-darkblue-10);
}

.venn-selected {
    border-color: var(--accent-primary);
    background: var(--color-blue-10);
}

.venn-svg {
    width: 80px;
    height: 50px;
}

/* Larger variant (3-circle Venn, more breathing room). */
.venn-svg.venn-svg-3 {
    width: 90px;
    height: 70px;
}

.venn-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Bolder label variant with a subtitle line. */
.venn-label.venn-label-prominent {
    font-size: 0.85rem;
    font-weight: 600;
}

.venn-hint {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* ── Result preview ── */

.result-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-count {
    min-height: 1.4rem;
}

.preview-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preview-text strong {
    color: var(--accent-primary);
}

/* ── Footer ── */

.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divider);
}

/* Footer with only actions on the right. */
.dialog-footer.dialog-footer-end {
    justify-content: flex-end;
}

.dialog-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn {
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--content-bg);
    border-color: var(--accent-primary);
}

.btn-primary:hover:not(:disabled) { background: var(--accent-primary-hover); border-color: var(--accent-primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.btn-secondary {
    background: var(--content-bg);
    color: var(--text-primary);
    border-color: var(--input-border);
}

.btn-secondary:hover { border-color: var(--input-border-hover); background: var(--surface); }

/* ── Empty state ── */

.dialog-body.empty-body {
    align-items: center;
    padding: 2rem 1rem;
}

.empty-icon {
    color: var(--text-muted);
    opacity: 0.35;
}

.empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.5rem 0 0.25rem;
}

.empty-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    max-width: 320px;
    margin: 0;
}
