/* Followers / Following tabs on followerstat.php (follow_stats_script.js switches them).
   Placed in the search card so they work before a search (choosing what to load) and
   after it (switching lists without leaving the page). */

.follow-mode-tabs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.follow-mode-tab {
    flex: 1 1 0;
    padding: 11px 16px;
    border: 2px solid #d5dce8;
    border-radius: 10px;
    background: #fff;
    color: #34404f;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.follow-mode-tab:hover {
    border-color: #0a7afc;
}

.follow-mode-tab.active {
    background: #0a7afc;
    border-color: #0a7afc;
    color: #fff;
}

.follow-mode-count {
    margin-left: 4px;
    font-weight: 500;
    opacity: 0.85;
}

.follow-mode-count:not(:empty)::before {
    content: "· ";
}

@media (max-width: 576px) {
    .follow-mode-tab { padding: 9px 10px; font-size: 14px; }
    .follow-mode-count { display: block; margin: 2px 0 0; }
    .follow-mode-count:not(:empty)::before { content: none; }
}

/* --- Since your last check (follow_stats_script.js renderTracking) --- */

.tracking-card {
    margin: 0 0 24px;
    padding: 20px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #0a7afc;
    color: #26303f;
}

.tracking-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.tracking-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf1fe;
    font-size: 20px;
}

.tracking-head h3 { margin: 2px 0 4px; font-size: 18px; }
.tracking-head p { margin: 0; font-size: 14px; line-height: 1.55; color: #4a5568; }

.tracking-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 4px;
}

.tracking-chip {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.tracking-chip-gained { background: #e8f7ef; color: #1f7a4d; }
.tracking-chip-lost   { background: #fdeaea; color: #b42318; }
.tracking-chip-gone   { background: #eef0f3; color: #4a5568; }

.tracking-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.tracking-col h4 {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7a8496;
}

.tracking-col h4 span { color: #26303f; }
.tracking-col-lost h4 { color: #b42318; }
.tracking-col-gained h4 { color: #1f7a4d; }

.tracking-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tracking-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tracking-person img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #e8ecf2;
}

.tracking-person-text { display: flex; flex-direction: column; min-width: 0; }
.tracking-person-name { font-size: 14px; font-weight: 700; color: #26303f; text-decoration: none; overflow-wrap: anywhere; }
.tracking-person-name:hover { text-decoration: underline; }
.tracking-person-handle { font-size: 12px; color: #7a8496; overflow-wrap: anywhere; }

.tracking-col details summary,
.tracking-history summary {
    margin-top: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2f5fd0;
}

.tracking-col details ul { margin-top: 8px; }
.tracking-note { margin: 6px 0 0; font-size: 12px; color: #7a8496; }
/* Who came and went, by account type (2026-10-22) */
.tracking-types { margin: -2px 0 8px; font-size: 12px; line-height: 1.5; color: #5b6476; }
.tracking-type { white-space: nowrap; color: #5b6476; font-weight: 600; }
.tracking-none { margin: 14px 0 0; font-size: 14px; color: #4a5568; }

.tracking-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e8ecf2; }
.tracking-day { margin-top: 10px; font-size: 13px; }
.tracking-day ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tracking-ev { color: #4a5568; }
.tracking-ev a { color: #26303f; font-weight: 600; }
.tracking-ev-gained::before { content: "＋ "; color: #1f7a4d; font-weight: 700; }
.tracking-ev-lost::before   { content: "− "; color: #b42318; font-weight: 700; }
.tracking-ev-gone::before   { content: "· "; color: #7a8496; font-weight: 700; }

@media (max-width: 576px) {
    .tracking-card { padding: 16px; }
    .tracking-head h3 { font-size: 16px; }
}

/* --- Audience quality (follow_stats_script.js renderQuality) --- */

.quality-card {
    margin: 0 0 24px;
    padding: 20px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #1f9d61;
    color: #26303f;
}

.q-head h3 { margin: 0 0 4px; font-size: 18px; }
.q-head p { margin: 0; font-size: 14px; color: #4a5568; }

.q-headline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 16px;
}

.q-score { font-size: 34px; font-weight: 800; color: #1f9d61; line-height: 1; }
.q-score-pending { color: #c9d1dd; animation: q-pulse 1.2s ease-in-out infinite; }
@keyframes q-pulse { 50% { opacity: 0.35; } }
.q-score-text { font-size: 15px; color: #34404f; }
.q-score-text em { font-style: normal; font-size: 12px; color: #7a8496; }

.q-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.q-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border: 2px solid #e8ecf2;
    border-radius: 12px;
    background: #f9fafc;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}

.q-tile:hover { border-color: #b9c8e6; }
.q-tile.active { border-color: #0a7afc; background: #eef4ff; }
.q-tile-icon { font-size: 18px; }
.q-tile-value { font-size: 22px; font-weight: 800; }
.q-tile-label { font-size: 13px; font-weight: 600; color: #34404f; }
.q-tile-sub { font-size: 12px; color: #7a8496; }

.q-filtering { margin: 12px 0 0; font-size: 13px; color: #24427a; }

.q-clear {
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #b9c8e6;
    background: #fff;
    color: #2f5fd0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.q-note { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: #8a94a6; }

/* Badges on list rows and cards */
.q-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.q-badge { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.q-badge-bot      { background: #fdeaea; color: #b42318; }
.q-badge-inactive { background: #eef0f3; color: #4a5568; }
.q-badge-new      { background: #e8f7ef; color: #1f7a4d; }
.q-badge-flagged  { background: #fff3df; color: #8a5600; }

@media (max-width: 768px) {
    .q-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
    .quality-card { padding: 16px; }
    .q-score { font-size: 28px; }
    .q-tile { padding: 10px; }
    .q-tile-value { font-size: 19px; }
}
