/* ═══════════════════════════════════════════════════════════════════════════
   Tracked Brands  (stylingTrackedBrands.css)
   All colors via global CSS variables. No hardcoded theme values.
   Shared selectors (.tb-confirm, .tb-empty, etc.) are also used by the
   PinnedInfluencers page until that page is refactored to its own stylesheet.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────────────── */
.tb-page {
    font-family: var(--font-ui);
    margin-bottom: -96px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.tb-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    margin: -60px 0 -110px 0;
}

.tb-header .container {
    min-height: 0;
    margin-top: 0;
    padding-top: 48px;
    padding-bottom: 40px;
}

.tb-header__badge {
    display: inline-flex;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(216, 90, 48, 0.25);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 12px;
    margin-bottom: 10px;
}

.tb-header__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.tb-header__title {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.tb-header__subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 560px;
    line-height: 1.6;
}

.tb-header__meta {
    flex-shrink: 0;
}

.tb-count-pill {
    display: inline-flex;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.tb-body.container {
    padding-top: 96px;
    padding-bottom: 80px;
}

/* ── Empty / Loading ────────────────────────────────────────────────────── */
.tb-loading,
.tb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 16px;
    text-align: center;
}

.tb-loading__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: tb-spin 0.75s linear infinite;
}

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

.tb-loading p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.tb-empty__icon {
    font-size: 2.8rem;
    color: var(--text-muted);
    line-height: 1;
}

.tb-empty__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tb-empty__sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 380px;
    line-height: 1.6;
}

.tb-cta-btn {
    margin-top: 8px;
    padding: 10px 24px;
    background: var(--accent-light);
    border: 1px solid rgba(216, 90, 48, 0.35);
    border-radius: 8px;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-ui);
}

.tb-cta-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Card grid ──────────────────────────────────────────────────────────── */
.tb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.tb-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.tb-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-light), 0 6px 24px rgba(44, 44, 42, 0.08);
}

[data-theme="dark"] .tb-card:hover {
    box-shadow: 0 0 0 1px var(--accent-light), 0 6px 24px rgba(0, 0, 0, 0.25);
}

.tb-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tb-card__identity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.tb-card__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-muted);
    flex-shrink: 0;
    padding: 4px;
}

.tb-card__logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent-light);
    border: 1px solid rgba(216, 90, 48, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.tb-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.tb-card__industry {
    display: inline-block;
    background: var(--accent-light);
    border: 1px solid rgba(216, 90, 48, 0.22);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 9px;
    margin-bottom: 6px;
}

.tb-card__domain {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 2px;
    transition: color 0.15s;
}

.tb-card__domain:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ── Color swatches ─────────────────────────────────────────────────────── */
.tb-card__colors {
    display: flex;
    gap: 7px;
}

.tb-card__swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    cursor: default;
}

/* ── Tagline ────────────────────────────────────────────────────────────── */
.tb-card__tagline {
    font-size: 0.80rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    line-height: 1.5;
    border-left: 2px solid var(--border);
    padding-left: 10px;
}

/* ── Value chips ────────────────────────────────────────────────────────── */
.tb-card__values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tb-card__tag {
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 999px;
    font-size: 0.70rem;
    font-weight: 500;
    padding: 3px 10px;
}

/* ── Card footer ────────────────────────────────────────────────────────── */
.tb-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid var(--border-subtle);
}

.tb-card__date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tb-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-card__open-btn {
    padding: 6px 14px;
    background: var(--accent-light);
    border: 1px solid rgba(216, 90, 48, 0.30);
    border-radius: 7px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font-ui);
}

.tb-card__open-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tb-card__untrack-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.18s;
}

.tb-card__untrack-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.35);
    color: #dc2626;
}

.tb-card__untrack-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Sidebar count badge ─────────────────────────────────────────────────── */
.sidebar-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 6px;
    line-height: 1;
}

/* ── Inline unpin confirmation ──────────────────────────────────────────── */
.tb-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: tb-confirm-in 0.16s ease;
}

@keyframes tb-confirm-in {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0);   }
}

.tb-confirm__label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.tb-confirm__yes {
    background: rgba(220, 38, 38, 0.10);
    border: 1px solid rgba(220, 38, 38, 0.30);
    color: #dc2626;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: var(--font-ui);
}
.tb-confirm__yes:hover {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(220, 38, 38, 0.50);
}

.tb-confirm__no {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: var(--font-ui);
}
.tb-confirm__no:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}
