/* The "connect your agent" posts: status table, code samples, the note for
   agents and the request form. Versioned file name: the deploy caches blog
   assets for a week as immutable, so a change ships as agent-access.v2.css. */

.blog-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 1px 5px;
    /* Long paths like /api/connectors/v1/intakes/{intake_id} break on a phone. */
    overflow-wrap: anywhere;
}

.blog-content pre {
    background: var(--primary);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 20px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.55;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 24px;
    font-size: 0.95rem;
}

.status-table th,
.status-table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.status-table th {
    color: var(--primary);
    font-weight: 700;
    background: var(--accent-light);
}

.table-scroll {
    overflow-x: auto;
}

.pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

.pill.live { background: #dcfce7; color: #166534; }
.pill.ask { background: #fef3c7; color: #92400e; }
.pill.next { background: #e2e8f0; color: #334155; }

.agent-note {
    border: 2px dashed var(--accent);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 32px 0 8px;
    background: #f8fbfe;
}

.agent-note h2 {
    margin-top: 0;
}

/* The request form */
.access-form {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.access-form h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.access-form > p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.access-form .field {
    margin-bottom: 16px;
}

.access-form label,
.access-form legend {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.access-form .optional {
    font-weight: 400;
    color: var(--text-muted);
}

.access-form input[type="text"],
.access-form input[type="email"],
.access-form input[type="url"],
.access-form select,
.access-form textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
}

.access-form textarea {
    min-height: 110px;
    resize: vertical;
}

.access-form input:focus,
.access-form select:focus,
.access-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.access-form fieldset {
    border: none;
    margin-bottom: 16px;
}

.access-form .choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.access-form .choices label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

.access-form .choices input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.access-form .two-up {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* Hidden from people; a bot that fills every field fills this one too. */
.access-form .trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.access-form button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.access-form button[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.access-form .form-status {
    margin-top: 16px;
    font-weight: 600;
}

.access-form .form-status.ok { color: #166534; }
.access-form .form-status.error { color: #b91c1c; }

@media (max-width: 768px) {
    .access-form {
        padding: 24px 20px;
    }

    .access-form .two-up {
        grid-template-columns: 1fr;
    }

    .agent-note {
        padding: 16px 18px;
    }
}
