/* Table styles live on the AI Hub shell (ai-hub.css) so Conversations and
   Traces share the exact same look. Only the Traces-only drawer stays here. */

/* Drawer */
.aih-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 3000;
}

.aih-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(720px, 90vw);
    background: var(--rz-base-background-color);
    border-left: 1px solid var(--rz-base-200);
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    z-index: 3001;
    display: flex;
    flex-direction: column;
    animation: aih-drawer-in 0.2s ease;
}

@keyframes aih-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.aih-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rz-base-200);
}

.aih-drawer-title { font-size: 1.05rem; font-weight: 700; color: var(--rz-text-title-color); }
.aih-drawer-sub { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; font-size: 0.75rem; color: var(--rz-text-secondary-color); }
.aih-drawer-sub code { background: var(--rz-base-100); padding: 0.1rem 0.4rem; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.aih-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aih-drawer-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--rz-base-50, var(--rz-base-100));
    border-radius: 8px;
}
.aih-drawer-meta div { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; }
.aih-drawer-meta span { color: var(--rz-text-tertiary-color); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; }
.aih-drawer-meta strong { color: var(--rz-text-primary-color); font-size: 0.8rem; }
.aih-drawer-meta code { font-size: 0.7rem; }

.aih-drawer-section { display: flex; flex-direction: column; gap: 0.35rem; }
.aih-drawer-section h3 {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-text-tertiary-color);
    font-weight: 700;
}
.aih-drawer-section pre {
    margin: 0;
    padding: 0.75rem;
    background: var(--rz-base-50, var(--rz-base-100));
    border-radius: 8px;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 360px;
    overflow-y: auto;
}

.aih-drawer-section--danger pre {
    background: color-mix(in srgb, var(--rz-danger) 8%, transparent);
    color: var(--rz-danger);
}
