/* ── Textarea form ── */

.btn-primary {
    padding: 0.65rem 1.5rem;
    background: var(--accent-blue);
    color: var(--text-heading2);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-blue-hover); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-secondary {
    padding: 0.65rem 1rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.btn-secondary:hover { color: var(--text-secondary); border-color: var(--text-dimmed); }

/* ── Spinner ── */
.spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--text-heading2);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error / info alerts ── */
.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1.1rem;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 0.5rem;
    color: var(--error-text);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* ── Results card ── */
.results-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.results-header {
    background: var(--bg-page);
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-header-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cn-badge {
    margin-left: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue-dim);
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-all;
}

.field-rows {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field-rows li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-strong);
}

.field-rows li:last-child { border-bottom: none; }
.field-rows li:nth-child(odd) { background: var(--results-row-alt); }

.field-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 140px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.field-value {
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.field-value.plain {
    font-family: system-ui, -apple-system, sans-serif;
}

/* ── SAN list ── */
.san-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.san-list li {
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
}

/* ── Key info badge ── */
.key-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--info-bg);
    border: 1px solid var(--border-blue);
    color: var(--info-text);
    letter-spacing: 0.02em;
}

/* ── Mobile ── */
@media (max-width: 600px) {

    .field-rows li { flex-direction: column; gap: 0.25rem; }
    .field-label { min-width: unset; }

    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
