/* ==========================================================
   AILEARNIST — STAR / FAVORITE TOGGLE BUTTONS
   Injected by includes/user-activity.js on tool + blog pages for
   logged-in users only. Reuses the --primary / --bg-card / --border
   variables already defined in includes/navbar.css so it matches
   both the light and dark theme without any extra setup.
   ========================================================== */

.ailearnist-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--bg-card, #ffffff);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ailearnist-toggle-btn:hover {
    transform: scale(1.08);
    border-color: var(--primary, #8b5cf6);
}

.ailearnist-toggle-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.ailearnist-toggle-btn--star.is-active {
    color: #f59e0b;
    border-color: #f59e0b;
}

.ailearnist-toggle-btn--heart.is-active {
    color: #ef4444;
    border-color: #ef4444;
}

/* Sitting on top of a whole-card link (.tool-card / .blog-card) — only
   used as a fallback when the card has no badge/pill to group with
   (see .ailearnist-card-topright below for the tools-index case). */
.ailearnist-toggle-btn--card {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Grouped inline next to a card's existing top-right badge (e.g.
   .tool-badge "Beginner"/"Intermediate") instead of floating on top of
   it — see initToolsIndex() in user-activity.js. */
.ailearnist-card-topright {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ailearnist-toggle-btn--inline {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex-shrink: 0;
}

/* Sitting next to a page/article heading */
.ailearnist-toggle-btn--heading {
    margin-left: 12px;
    vertical-align: middle;
}

@media (max-width: 640px) {
    .ailearnist-toggle-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* Guest "why sign in" tooltip + account menu styles live in includes/navbar.css. */
