/* =========================================================
   XERION — TRINITY HUB (Step 10b)
   ---------------------------------------------------------
   File: web/frontend/css/trinity.css
   Built only on global.css's own design tokens, so the dark
   theme comes for free -- same approach calendar.css's own
   header comment documents. Additive only: no existing class
   here is redefined, chat.css is never touched.
========================================================== */

.trinity-beta-note {
    margin: -10px 0 16px;
    font-size: 12px;
    color: var(--muted);
}

/* #trinityCard is the first .integration-card ever conditionally hidden
   via the `hidden` attribute (every other integration card is always
   shown) -- pages.css's own `.integration-card { display: flex; }` is an
   author-stylesheet rule, which always beats the browser's UA-stylesheet
   `[hidden] { display: none }` default at equal specificity, so without
   this explicit exception the card would stay visibly laid out even
   while `.hidden = true` (same bug class calendar.css's own
   `.sidebar-item[hidden]` exception already guards against). */
#trinityCard[hidden] {
    display: none !important;
}

.integration-card h3 .badge {
    margin-left: 8px;
    vertical-align: middle;
}

.page-header h1 .badge {
    margin-left: 10px;
    vertical-align: middle;
}


/* ---------- Trinity Hub page ---------- */

.trinity-page-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.trinity-page .page-header p {
    max-width: 640px;
}

.trinity-block {
    margin-top: 24px;
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.trinity-block h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.trinity-block-howto {
    margin: 0;
    color: var(--muted);
}

.trinity-agents-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.trinity-agent-card {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-soft);
}

.trinity-agent-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
}

.trinity-agent-avatar svg {
    display: block;
    width: 40px;
    height: 40px;
}

.trinity-agent-info {
    flex: 1;
    min-width: 0;
}

.trinity-agent-info h3 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.trinity-agent-info p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.trinity-agent-card .status-label {
    flex: 0 0 auto;
    white-space: nowrap;
}


/* ---------- Responsive: phone width, one column, no horizontal scroll ---------- */

@media (max-width: 760px) {
    .trinity-agents-grid {
        grid-template-columns: 1fr;
    }

    .trinity-agent-card {
        flex-wrap: wrap;
    }
}
