/**
 * ArtistList.html (Artist Search & Album List) — Mobile-First Responsive
 * Shows artist detail with their albums, owned vs unowned status
 */

/* ============================================================================
   MOBILE-FIRST: HEADER & HERO (320px+)
   ============================================================================ */

.artist-search-title {
    position: relative;
    text-align: left;
    margin-bottom: var(--spacing-lg);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-xl);
    background-size: cover;
    background-position: center;
}

.artist-image-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.28;
}

.artist-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.artist-image-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.60) 42%, rgba(255, 255, 255, 0.94) 100%),
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.50), rgba(255,255,255,0));
    z-index: 1;
}

.artist-heading {
    position: relative;
    z-index: 2;
    color: #000;
    font-size: 1.65rem;
    font-weight: var(--font-weight-bold);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 18px;
    margin: 0;
    word-wrap: break-word;
    max-width: 18rem;
    box-shadow: 0 10px 28px rgba(17, 28, 39, 0.08);
}

.edit-artist-btn {
    position: absolute;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 2;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: var(--touch-target);
}

/* ============================================================================
   MOBILE-FIRST: STICKY SEARCH HEADER
   ============================================================================ */

.artist-search-container {
    position: relative;
    top: auto;
    z-index: 100;
    background-color: #fff;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-top: 0;
}

.artist-search-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.artist-search-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    align-items: stretch;
}

.form-control-borderless {
    border: 1px solid var(--border-color);
    background: #fff;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: var(--touch-target);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
}

.form-control-borderless:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-info,
.btn-danger {
    min-height: var(--touch-target);
    padding: var(--spacing-md) var(--spacing-lg);
    flex: 1;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-info {
    background-color: var(--info);
    color: #fff;
}

.btn-info:active {
    background-color: #0c5460;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:active {
    background-color: #bb2d3b;
}

/* ============================================================================
   MOBILE-FIRST: ALBUM LIST (320px+)
   ============================================================================ */

.album-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0 0;
    list-style: none;
    margin: 0;
}

.album-list li {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: 0;
}

.album-info-row {
    display: grid;
    grid-template-columns: 124px 1fr;
    gap: var(--spacing-lg);
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    align-items: center;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
}

.album-info-img {
    width: 100%;
    max-width: 124px;
    aspect-ratio: 1 / 1;
    border-radius: 0.15rem;
    object-fit: cover;
    background-color: var(--light);
    margin: 0;
}

.album-info-img.unowned {
    opacity: 0.5;
}

.album-info-img.owned {
    opacity: 1;
}

.album-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.album-info-row p {
    margin: 0;
    font-size: var(--font-size-base);
}

.album-title {
    font-weight: var(--font-weight-bold);
    font-size: 1.05rem;
    line-height: 1.2;
}

.album-year {
    color: var(--gray);
    font-size: var(--font-size-sm);
}

.album-owned,
.album-unowned {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    min-height: var(--touch-target);
    border-radius: 999px;
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    width: fit-content;
}

.album-owned {
    background-color: var(--success);
}

.album-unowned {
    background-color: var(--danger);
}

hr.rounded,
hr.rounded2 {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-lg) 0;
}

/* ============================================================================
   SMALL MOBILE BREAKPOINT (480px+)
   ============================================================================ */

@media (min-width: 480px) {
    .artist-heading {
        font-size: 1.75rem;
    }

    .artist-search-card-body {
        flex-direction: row;
        gap: var(--spacing-lg);
    }

    .form-control-borderless {
        flex: 1;
    }

    .album-info-row {
        grid-template-columns: 132px 1fr;
        align-items: center;
        gap: var(--spacing-lg);
        padding: 1rem 1.1rem;
    }

    .album-info-img {
        max-width: 132px;
        min-width: 132px;
        border-radius: 0.15rem;
    }
}

/* ============================================================================
   TABLET BREAKPOINT (768px+)
   ============================================================================ */

@media (min-width: 768px) {
    .artist-search-title {
        min-height: 300px;
        margin-bottom: var(--spacing-2xl);
    }

    .artist-heading {
        font-size: 2.25rem;
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    .artist-search-container {
        max-width: 1000px;
        margin: 0 auto;
        padding: var(--spacing-xl);
        border-radius: var(--radius-lg);
        margin-top: 1rem;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 50;
    }

    .artist-search-card-body {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xl);
    }

    .form-control-borderless {
        flex: 1;
        min-width: 250px;
    }

    .btn-info,
    .btn-danger {
        flex: 0 1 auto;
        min-width: 120px;
    }

    .album-list {
        max-width: 1000px;
        margin: 0 auto;
        padding: var(--spacing-xl);
    }

    .album-info-row {
        padding: 1.15rem 1.2rem;
        gap: 1.15rem;
        grid-template-columns: 140px 1fr;
    }

    .album-info-img {
        max-width: 140px;
        min-width: 140px;
        border-radius: 0.15rem;
    }
}

/* ============================================================================
   DESKTOP BREAKPOINT (1024px+)
   ============================================================================ */

@media (min-width: 1024px) {
    .artist-heading {
        font-size: 2.5rem;
    }

    .album-list {
        max-width: 1200px;
    }

    /* Grid layout for albums on larger screens */
    .album-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .album-list li {
        flex-direction: row;
    }

    .album-info-row {
        grid-template-columns: 156px 1fr;
    }

    .album-info-img {
        max-width: 156px;
        border-radius: 0.15rem;
    }
}

/* ============================================================================
   LARGE DESKTOP BREAKPOINT (1200px+)
   ============================================================================ */

@media (min-width: 1200px) {
    .album-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .artist-image-container::after,
    .btn-info,
    .btn-danger {
        transition: none;
    }
}

@media (prefers-color-scheme: dark) {
    .artist-search-card {
        background-color: #2d2d2d;
    }

    .album-info-row {
        background-color: #2d2d2d;
        border-color: #444;
    }

    .form-control-borderless {
        background: #1a1a1a;
        color: #fff;
        border-color: #444;
    }

    .album-info-text p {
        color: #e0e0e0;
    }
}
