/* Bot Access (/bot-access) — js/bot-access-page.js.
   Cards, tables and feeds come from page-user-activity.css (.ua-*). */

/* Wide enough that the columns keep their shape; the card scrolls sideways
   on a phone instead of crushing the name column. */
.ba-table { min-width: 1040px; }
.ba-table td { vertical-align: top; }

.ba-name { display: block; font-weight: 600; color: var(--color-text); }
.ba-sub { display: block; font-size: 0.75rem; }

.ba-key {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.ba-key + .ba-key { margin-top: 4px; }

.ba-key code,
.ba-call code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 4px;
    padding: 1px 5px;
}

.ba-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.ba-actions .btn { white-space: nowrap; }
.ba-nowrap { white-space: nowrap; }
.ba-refused { color: #c53030; font-weight: 600; }

.ba-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.75rem;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
}

.ba-link-danger { color: #c53030; }

.ba-foot { font-size: 0.8125rem; max-width: 760px; }

/* ── Dialogs ── */

.ba-dialog {
    width: min(520px, 92vw);
    /* main.css zeroes every margin, which un-centres a modal dialog. */
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}

.ba-form { padding: 20px 22px; }

.ba-dialog-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--color-text);
}

.ba-hint { font-size: 0.75rem; margin-top: 4px; }

.ba-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    padding: 2px 0;
}

.ba-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    margin: 4px 0 0 22px;
}

.ba-rate { max-width: 120px; }

.ba-error { color: #c53030; font-size: 0.8125rem; margin-bottom: 8px; }

.ba-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.ba-warn {
    background: #feebc8;
    color: #7b341e;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.8125rem;
    margin-bottom: 12px;
}

.ba-keyrow { display: flex; gap: 8px; margin-bottom: 14px; }

.ba-keybox {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
}

.ba-code {
    background: var(--color-bg-secondary);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.75rem;
    overflow-x: auto;
    white-space: pre;
    margin-top: 4px;
}

/* ── Activity drawer ── */

.ba-range { margin-bottom: 12px; }

.ba-section {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 18px 0 6px;
    color: var(--color-text);
}

.ba-loglink { font-size: 0.8125rem; margin-top: 6px; }

.ba-call { min-width: 0; overflow-wrap: anywhere; }

.ba-chip-denied { margin-left: auto; flex-shrink: 0; background: #fed7d7; color: #9b2c2c; }

@media (max-width: 520px) {
    .ba-checks { grid-template-columns: 1fr; }
    .ba-keyrow { flex-direction: column; }
}

@media (max-width: 900px) {
    .ba-actions { flex-wrap: wrap; justify-content: flex-start; }
}

/* "Also, only if you tick it" — the opt-in extras under the record types. */
.ba-extra-label { display: block; margin-top: 12px; }
