:host {
    display: block;
}

.ai-visibility__stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.ai-visibility__stat-strip--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-visibility__stat {
    min-width: 0;
    border: 1px solid var(--p-surface-border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--p-surface-0) 72%, transparent);
    padding: 0.625rem 0.75rem;
}

.ai-visibility__stat dt {
    overflow: hidden;
    color: var(--p-text-muted-color);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-visibility__stat dd {
    margin: 0.125rem 0 0;
    color: var(--p-text-color);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25rem;
    overflow-wrap: anywhere;
}

.ai-visibility__stat-skeleton {
    display: block;
    width: 4rem;
    height: 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--p-surface-100), var(--p-surface-200), var(--p-surface-100));
    background-size: 200% 100%;
    animation: ai-visibility-stat-pulse 1.2s ease-in-out infinite;
}

@keyframes ai-visibility-stat-pulse {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

@media (min-width: 1024px) {
    .ai-visibility__stat-strip {
        grid-template-columns: repeat(5, minmax(6rem, 1fr));
        max-width: 42rem;
    }

    .ai-visibility__stat-strip--wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }
}

@media (max-width: 340px) {
    .ai-visibility__stat-strip,
    .ai-visibility__stat-strip--wide {
        grid-template-columns: 1fr;
    }
}
