/*
 * Artists directory styles, linked in <head> via $GLOBALS['page_stylesheets'] (includes/header.php).
 *
 * Moved verbatim from an inline <style> block in artists.php on 2026-10-24. Emitted
 * after the content it styles, it let the browser paint that content without
 * these rules and then reflow it whenever the HTML arrived in more than one
 * piece: the desktop CLS class fixed for gig pages in #1782 (see gig.css).
 */

/* Hero */
.artists-hero {
    position: relative;
    padding: 50px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.artists-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
}

.artists-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.1;
    mix-blend-mode: overlay;
}

.artists-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.artists-hero h1 {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    color: white;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    margin: 0 0 10px;
    letter-spacing: 2px;
}

.artists-hero .subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin: 0 0 30px;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 5px;
    backdrop-filter: blur(10px);
}

.hero-search input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.hero-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.hero-search button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #764ba2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.hero-search button:hover {
    transform: scale(1.05);
}

.hero-search button svg {
    width: 22px;
    height: 22px;
}

/* Filters */
.filters-section {
    padding: 25px 0;
}

.filters-form {
    display: flex;
    justify-content: center;
}

.filter-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-chip {
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid transparent;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover, .filter-chip:focus {
    border-color: var(--pink);
}

.clear-btn {
    padding: 10px 20px;
    color: var(--pink);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.clear-btn:hover {
    text-decoration: underline;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-color);
}

.title-icon {
    color: var(--pink);
    font-size: 1.2rem;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.featured-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-8px);
}

.featured-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-placeholder-wrap {
    width: 100%;
    height: 100%;
}
.featured-placeholder-wrap .musick-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover .featured-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.featured-card:hover .play-icon {
    transform: scale(1);
}

.featured-info {
    padding: 15px 5px 5px;
    text-align: center;
}

.featured-info h3 {
    margin: 0 0 5px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Sort Controls */
.sort-section {
    padding: 0 0 15px;
}

.sort-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 4px;
}

.sort-btn {
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: #aaa;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.sort-btn:hover {
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.sort-btn.active {
    background: linear-gradient(135deg, var(--purple, #8338EC), var(--pink, #FF006E));
    color: white;
    border-color: transparent;
}

/* Artists List */
.artists-list {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
}

.artist-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s;
}

.artist-row:last-child {
    border-bottom: none;
}

.artist-row:hover {
    background: rgba(255,255,255,0.05);
}

.artist-row:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

.artist-row:nth-child(even):hover {
    background: rgba(255,255,255,0.06);
}

.artist-row--header {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted) !important;
    border-bottom: 2px solid rgba(255,255,255,0.1) !important;
    padding: 10px 20px;
}

.artist-row--header:hover {
    background: transparent !important;
}

[data-theme="light"] .artist-row--header {
    border-bottom-color: rgba(0,0,0,0.1) !important;
}

.artist-row__name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary, #fff);
    font-size: 0.95rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-row__city {
    width: 120px;
    flex-shrink: 0;
    color: var(--text-secondary, rgba(255,255,255,0.85));
    font-size: 0.85rem;
    text-align: center;
}

.artist-row__genre {
    width: 200px;
    flex-shrink: 0;
    color: var(--text-secondary, rgba(255,255,255,0.85));
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.artist-row__stats {
    width: 120px;
    flex-shrink: 0;
    color: var(--text-secondary, rgba(255,255,255,0.85));
    font-size: 0.85rem;
    text-align: right;
    white-space: nowrap;
}

/* Featured Show More (mobile) */
.featured-show-more {
    display: none;
    text-align: center;
    margin-top: 15px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--pink);
    color: var(--pink);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--pink);
    color: white;
}

/* Results Info */
.results-info {
    padding: 0 0 10px;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: 25px;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--pink);
    color: white;
}

.page-btn svg {
    width: 18px;
    height: 18px;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: all 0.2s;
}

.page-num:hover, .page-num.active {
    background: var(--pink);
    color: white;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 25px;
}

/* Light mode fixes */
[data-theme="light"] .artists-list {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[data-theme="light"] .artist-row {
    border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .artist-row:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

[data-theme="light"] .artist-row:hover {
    background: rgba(100,126,234,0.06) !important;
}

[data-theme="light"] .artist-row__name {
    color: #1a1a2e;
}

[data-theme="light"] .artist-row__city,
[data-theme="light"] .artist-row__genre,
[data-theme="light"] .artist-row__stats {
    color: #444;
}

[data-theme="light"] .sort-btn {
    color: #666;
    background: rgba(0,0,0,0.04);
}

[data-theme="light"] .sort-btn:hover {
    color: #1a1a2e;
    border-color: rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .artists-hero h1 {
        font-size: 2.5rem;
    }

    .artists-hero .subtitle {
        font-size: 1rem;
    }

    .hero-search {
        flex-direction: row;
    }

    .hero-search input {
        padding: 12px 20px;
    }

    .hero-search button {
        width: 44px;
        height: 44px;
    }

    .filter-chips {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-chip {
        flex-shrink: 0;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .featured-hidden-mobile {
        display: none;
    }

    .featured-show-more {
        display: block;
    }

    .artist-row__genre,
    .artist-row__stats {
        display: none;
    }

    .artist-row__city {
        width: auto;
        flex-shrink: 1;
    }

    .artist-row {
        padding: 10px 15px;
    }

    .pagination {
        gap: 10px;
    }

    .page-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .page-numbers {
        display: none;
    }

    .sort-controls {
        gap: 6px;
    }

    .sort-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .artists-hero {
        padding: 30px 15px 25px;
    }

    .artists-hero h1 {
        font-size: 2rem;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
