/* ── Doc / Audio Picker ──────────────────────────────────────────────────── */

.doc-picker-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.doc-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.9rem;
    border: 1.5px solid var(--dbn-line, #d0cfc8);
    border-radius: 6px;
    background: transparent;
    color: var(--dbn-text, #16130f);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.doc-picker-btn:hover {
    border-color: var(--dbn-accent, #00205B);
    background: color-mix(in srgb, var(--dbn-accent, #00205B) 5%, transparent);
}
.doc-picker-btn:focus-visible {
    outline: 2px solid var(--dbn-accent, #00205B);
    outline-offset: 2px;
}
.doc-picker-btn__icon { flex-shrink: 0; }

/* selected doc chips */
.doc-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}
.doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
    background: color-mix(in srgb, var(--dbn-accent, #00205B) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--dbn-accent, #00205B) 30%, transparent);
    border-radius: 4px;
    font-size: 0.79rem;
    color: var(--dbn-text, #16130f);
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-chip__remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.55;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
}
.doc-chip__remove:hover { opacity: 1; }

/* ── Modal overlay ───────────────────────────────────────────────────────── */

.doc-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.doc-picker-backdrop[hidden] { display: none; }

.doc-picker-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    width: min(640px, 94vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.doc-picker-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--dbn-line, #d0cfc8);
    flex-shrink: 0;
}
.doc-picker-dialog__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dbn-text, #16130f);
}
.doc-picker-dialog__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(22, 19, 15, 0.5);
    padding: 0 0.2rem;
}
.doc-picker-dialog__close:hover { color: var(--dbn-text, #16130f); }

.doc-picker-dialog__search {
    margin: 0.75rem 1.25rem 0;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--dbn-line, #d0cfc8);
    border-radius: 6px;
    font-size: 0.88rem;
    width: calc(100% - 2.5rem);
    box-sizing: border-box;
}
.doc-picker-dialog__search:focus { outline: none; border-color: var(--dbn-accent, #00205B); }

.doc-picker-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem 1.25rem 0.75rem;
    margin-top: 0.5rem;
}
.doc-picker-list__empty {
    text-align: center;
    color: rgba(22, 19, 15, 0.45);
    font-size: 0.88rem;
    padding: 2rem 0;
}
.doc-picker-list__loading {
    text-align: center;
    color: rgba(22, 19, 15, 0.45);
    font-size: 0.88rem;
    padding: 1.5rem 0;
}

.doc-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}
.doc-item:hover, .doc-item.is-selected { background: color-mix(in srgb, var(--dbn-accent, #00205B) 7%, transparent); }
.doc-item input[type="checkbox"] { margin-top: 0.1rem; flex-shrink: 0; accent-color: var(--dbn-accent, #00205B); }
.doc-item__title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--dbn-text, #16130f);
    line-height: 1.4;
}
.doc-item__meta {
    font-size: 0.76rem;
    color: rgba(22, 19, 15, 0.5);
    margin-top: 0.1rem;
}

.doc-picker-dialog__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--dbn-line, #d0cfc8);
    flex-shrink: 0;
}
.doc-picker-dialog__count { font-size: 0.84rem; color: rgba(22, 19, 15, 0.55); }
.doc-picker-dialog__confirm {
    padding: 0.48rem 1.1rem;
    background: var(--dbn-accent, #00205B);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}
.doc-picker-dialog__confirm:disabled { opacity: 0.45; cursor: not-allowed; }
.doc-picker-dialog__confirm:not(:disabled):hover { background: color-mix(in srgb, var(--dbn-accent, #00205B) 80%, #000); }

/* ── Upgrade modal ───────────────────────────────────────────────────────── */

.doc-picker-upgrade-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.doc-picker-upgrade-backdrop[hidden] { display: none; }

.doc-picker-upgrade-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    width: min(400px, 92vw);
    padding: 2rem 1.75rem;
    text-align: center;
}
.doc-picker-upgrade-card__icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: block;
}
.doc-picker-upgrade-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--dbn-text, #16130f);
}
.doc-picker-upgrade-card p {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: rgba(22, 19, 15, 0.65);
    line-height: 1.6;
}
.doc-picker-upgrade-card__actions { display: flex; gap: 0.65rem; justify-content: center; }
.doc-picker-upgrade-card__cta {
    padding: 0.55rem 1.25rem;
    background: var(--dbn-accent, #00205B);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.doc-picker-upgrade-card__cta:hover { background: color-mix(in srgb, var(--dbn-accent, #00205B) 80%, #000); }
.doc-picker-upgrade-card__dismiss {
    padding: 0.55rem 1rem;
    background: none;
    border: 1.5px solid var(--dbn-line, #d0cfc8);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    color: rgba(22, 19, 15, 0.7);
}
.doc-picker-upgrade-card__dismiss:hover { border-color: rgba(22, 19, 15, 0.4); }

/* ── Audio upload zone inside transcribe picker section ──────────────────── */

.audio-corpus-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.9rem;
    border: 1.5px dashed var(--dbn-line, #d0cfc8);
    border-radius: 6px;
    background: transparent;
    color: rgba(22, 19, 15, 0.55);
    font-size: 0.84rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.audio-corpus-upload:hover { border-color: var(--dbn-accent, #00205B); color: var(--dbn-accent, #00205B); }


/* ── Redacted document badge ─────────────────────────────────────────────── */

.doc-item__badge {
    display: inline-block;
    margin-left: 0.45em;
    padding: 0.1em 0.45em;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
    line-height: 1.4;
}

.doc-item__badge--redact {
    background: #ede8f7;
    color: #5b35a8;
    border: 1px solid rgba(91, 53, 168, 0.2);
}
