/*
 * 10k Pucks public iframe embeds.
 * Three widgets: team leaderboard, team total-shots counter, association leaderboard.
 * Goal: minimal weight, design tokens from tokens.css, screenshot-faithful styling.
 */

html, body {
    margin: 0;
    padding: 0;
    background: transparent;
}

body.tk-embed-body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Outer card — thin red border per the legacy embed look.
   Sized for a 300px-wide iframe; padding kept tight so names + counts breathe. */
.tk-embed {
    border: 1px solid var(--color-danger);
    border-radius: 4px;
    background: #ffffff;
    padding: 0.875rem 0.875rem 0.75rem;
    max-width: 100%;
    box-sizing: border-box;
}

/* ---------- Header (logo + titles) ---------- */
.tk-embed__header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.tk-embed__logo {
    max-width: 180px;
    width: 80%;
    height: auto;
    margin: 0 auto 0.5rem;
    display: block;
}

.tk-embed__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.125rem 0 0;
}

.tk-embed__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.125rem 0 0;
}

/* ---------- Leaderboard list ---------- */
.tk-embed__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tk-embed__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--color-gray-200);
}

.tk-embed__row:first-child {
    border-top: none;
}

.tk-embed__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-embed__team {
    display: block;
    font-size: 0.7rem;
    color: var(--color-gray-400);
    margin-top: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-embed__shots {
    flex: 0 0 auto;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.tk-embed__empty {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* ---------- Total-shots counter widget ---------- */
.tk-embed__counter {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.tk-embed__counter-team {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    word-wrap: break-word;
}

.tk-embed__counter-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-danger);
    margin: 0;
    line-height: 1.15;
}

/* ---------- 404 / error fallback ---------- */
.tk-embed__error {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem 0.5rem;
}

.tk-embed__error-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}
