/* Reusable card, button, input, chip, and state primitives. */

.card-surface,
.blueprint-panel,
.state-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-panel);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--color-text) 8%, transparent);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.card-body {
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
}

.card-body p {
    margin: 0;
    color: var(--color-subtle);
    font-size: 0.92rem;
}

.card-meta {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

.card-media,
.blueprint-media,
.blueprint-preview {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(var(--color-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px),
        var(--color-overlay);
    background-size: 20px 20px;
}

.blueprint-media {
    min-height: 8rem;
    padding: 0.75rem;
}

.button,
.viewer-route-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: fit-content;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-panel);
    padding: 0.55rem 0.8rem;
    color: var(--color-text);
    background: var(--color-surface);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.button:hover,
.viewer-route-nav a:hover {
    border-color: var(--color-primary);
    color: var(--color-tertiary);
    text-decoration: none;
}

.button-primary {
    border-color: var(--color-action);
    background: var(--color-action);
    color: var(--color-base);
}

.button-primary:hover {
    filter: brightness(1.04);
    color: var(--color-base);
}

.button-secondary {
    border-color: var(--color-primary);
    color: var(--color-tertiary);
}

.button-ghost {
    background: transparent;
}

.button-row,
.tab-row,
.product-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-field {
    display: grid;
    gap: 0.35rem;
    color: var(--color-subtle);
    font-size: 0.85rem;
}

.search-field span,
.eyebrow,
.product-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-field input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-panel);
    background: var(--color-base);
    color: var(--color-text);
    font-family: var(--font-ui);
}

.search-field input:focus {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    border-color: var(--color-primary);
}

.tab,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-panel);
    background: transparent;
    color: var(--color-subtle);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
}

.tab.is-active,
.status-pill {
    border-color: var(--color-primary);
    color: var(--color-tertiary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.status-muted {
    border-color: var(--color-muted);
    color: var(--color-muted);
    background: transparent;
}

.status-error {
    border-color: var(--color-error);
    color: var(--color-error);
    background: color-mix(in srgb, var(--color-error) 8%, transparent);
}

.skeleton-line,
.skeleton-box {
    background: linear-gradient(90deg, var(--color-overlay), var(--color-highlight), var(--color-overlay));
    background-size: 200% 100%;
    animation: blueprint-skeleton 1.8s linear infinite;
}

.skeleton-line {
    height: 0.7rem;
    width: 65%;
}

.skeleton-wide {
    width: 90%;
}

.skeleton-box {
    min-height: 5rem;
}

@keyframes blueprint-skeleton {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
