/* ============================================================
   Jamtab — Creator Directory
   ------------------------------------------------------------
   Uses the tokens declared in Layout.css :root. Card surfaces
   match cards.css (#121212 on #050505) so the directory reads
   as the same product as the rails.
   ============================================================ */


.jt-creators-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 30px 20px;
    height: auto;
}

.jt-creators-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}


/* ==============================
   Header
   ============================== */

.jt-creators-head {
    margin-bottom: 20px;
}

.jt-creators-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--jt-text);
    margin: 0 0 6px 0;
    letter-spacing: 0.3px;
}

.jt-creators-sub {
    font-size: 13px;
    color: #8a8a8a;
    margin: 0;
}


/* ==============================
   All creators / Following tabs
   ============================== */

.jt-creator-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}

.jt-creator-tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #8a8a8a;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--jt-transition), border-color var(--jt-transition);
}

    .jt-creator-tab:hover {
        color: var(--jt-text);
        text-decoration: none;
    }

    .jt-creator-tab.active {
        color: var(--jt-text);
        border-bottom-color: var(--jt-blue-accent);
    }

.jt-creator-tab-count {
    display: inline-block;
    background: #282828;
    color: #ccc;
    font-size: 11px;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 4px;
}


/* ==============================
   Search + facets
   ============================== */

.jt-creator-search {
    margin-bottom: 14px;
}

    /* The shared .search-bar is sized for the 250px left pane; here it
       gets the full content width. */
    .jt-creator-search .search-bar {
        max-width: 100%;
    }

.jt-creator-facets {
    margin-bottom: 20px;
}

    .jt-creator-facets .channel-filter-bar {
        align-items: center;
        justify-content: space-between;
    }

.jt-creator-total {
    font-size: 12px;
    color: #8a8a8a;
    white-space: nowrap;
}


/* ==============================
   Grid
   ============================== */

.jt-creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.jt-creator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 22px 16px 16px;
    text-align: center;
    transition: border-color var(--jt-transition), box-shadow var(--jt-transition);
}

    .jt-creator-card:hover {
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

.jt-creator-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

    .jt-creator-link:hover {
        text-decoration: none;
        color: inherit;
    }

.jt-creator-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: #1f1f1f;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    transition: border-color var(--jt-transition);
}

.jt-creator-card:hover .jt-creator-avatar {
    border-color: var(--jt-blue-accent);
}

.jt-creator-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--jt-text);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jt-creator-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
    color: #8a8a8a;
    min-height: 17px;
}

.jt-creator-instrument {
    color: var(--jt-blue-light);
}

.jt-creator-location {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jt-creator-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #8a8a8a;
}

    .jt-creator-stats strong {
        color: #ccc;
        font-weight: 600;
    }

.jt-creator-stat-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #444;
}


/* ==============================
   Subscribe button
   ============================== */

.jt-subscribe-btn {
    margin-top: 14px;
    width: 100%;
    max-width: 160px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--jt-blue-accent);
    background: var(--jt-blue);
    color: var(--jt-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--jt-transition), border-color var(--jt-transition), color var(--jt-transition);
}

    .jt-subscribe-btn:hover {
        background: var(--jt-blue-accent);
    }

    /* Subscribed is the "done" state — outlined, so Subscribe stays the
       louder of the two. Hover previews the undo. */
    .jt-subscribe-btn.subscribed {
        background: transparent;
        border-color: #444;
        color: var(--jt-text-dim);
    }

        .jt-subscribe-btn.subscribed:hover {
            border-color: #b00020;
            color: #ff6b6b;
            background: transparent;
        }

    .jt-subscribe-btn:disabled {
        opacity: 0.6;
        cursor: default;
    }

    .jt-subscribe-btn:focus-visible {
        outline: 2px solid var(--jt-blue-accent);
        outline-offset: 2px;
    }

.jt-creator-you {
    margin-top: 14px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding: 8px 0;
}


/* ==============================
   Load more / empty
   ============================== */

.jt-creator-more {
    text-align: center;
    margin-top: 24px;
}

.jt-creator-empty {
    text-align: center;
    padding: 48px 20px;
    color: #8a8a8a;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

    .jt-creator-empty p {
        margin: 0 0 16px 0;
        font-size: 14px;
    }


/* ==============================
   Mobile
   ============================== */

@media (max-width: 768px) {
    .jt-creator-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .jt-creator-card {
        padding: 16px 10px 12px;
    }

    .jt-creator-avatar {
        width: 68px;
        height: 68px;
    }

    .jt-creators-title {
        font-size: 22px;
    }

    .jt-creator-facets .channel-filter-bar {
        flex-wrap: wrap;
    }
}


/* Reduced motion — kill the transitions, keep the states. */
@media (prefers-reduced-motion: reduce) {
    .jt-creator-card,
    .jt-creator-avatar,
    .jt-subscribe-btn,
    .jt-creator-tab {
        transition: none;
    }
}


/* Sort control. Doesn't lean on CreatorChannel.css, which this page
   doesn't load — the native select is unreadable on a dark background. */
#creatorSort {
    appearance: none;
    -webkit-appearance: none;
    background: #1f1f1f;
    color: var(--jt-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 38px 8px 16px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23b3b3b3' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: border-color var(--jt-transition), background-color var(--jt-transition);
}

    #creatorSort:hover {
        background-color: #252525;
        border-color: rgba(255, 255, 255, 0.18);
    }

    #creatorSort:focus {
        outline: none;
        border-color: var(--jt-blue-accent);
        box-shadow: 0 0 0 3px rgba(13, 131, 221, 0.18);
    }

    /* The open list is drawn by the OS — this is the only hook we get. */
    #creatorSort option {
        background: #121212;
        color: var(--jt-text);
    }



/* Deliberately not .filter-pill — Layout.js binds a library-search handler
   to that class on every page, which hijacks these clicks. */
.jt-facet-pill {
    background: #282828;
    color: #ddd;
    border: 1px solid transparent;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

    .jt-facet-pill:hover {
        background: #333;
        color: #fff;
    }

    .jt-facet-pill.active {
        background: var(--jt-blue);
        color: #fff;
        border-color: var(--jt-blue-accent);
    }

    .jt-facet-pill:focus-visible {
        outline: 2px solid var(--jt-blue-accent);
        outline-offset: 2px;
    }