/* ============================================================
   GospelKingz — Artist Profile Extended Sections CSS
   Covers: Donations, Collabs, Similar Artists, Achievements,
           Podcasts, Livestreams, Booking, Contact, Copyright, Genres
   ============================================================ */

/* ── Section Wrapper ── */
.apx-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}
.apx-section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.apx-section-title span.apx-title-icon {
    font-size: 18px;
}

/* ── Genre Badges ── */
.apx-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.apx-genre-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: default;
}
.apx-genre-badge.gospel    { background: rgba(243,156,18,0.15); color: #f39c12; border: 1px solid rgba(243,156,18,0.3); }
.apx-genre-badge.worship   { background: rgba(155,89,182,0.15); color: #9b59b6; border: 1px solid rgba(155,89,182,0.3); }
.apx-genre-badge.hiphop    { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3);  }
.apx-genre-badge.dancehall { background: rgba(52,152,219,0.15); color: #3498db; border: 1px solid rgba(52,152,219,0.3); }
.apx-genre-badge.reggae    { background: rgba(39,174,96,0.15);  color: #27ae60; border: 1px solid rgba(39,174,96,0.3);  }
.apx-genre-badge.praise    { background: rgba(241,196,15,0.15); color: #f1c40f; border: 1px solid rgba(241,196,15,0.3); }
.apx-genre-badge.choir     { background: rgba(26,188,156,0.15); color: #1abc9c; border: 1px solid rgba(26,188,156,0.3); }
.apx-genre-badge.other     { background: rgba(149,165,166,0.15); color: #95a5a6; border: 1px solid rgba(149,165,166,0.3); }

/* ── Donation Section ── */
.apx-donate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.apx-donate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text);
}
.apx-donate-btn:hover {
    border-color: #f39c12;
    background: rgba(243,156,18,0.08);
    transform: translateY(-2px);
}
.apx-donate-btn .apx-donate-icon {
    font-size: 28px;
    line-height: 1;
}
.apx-donate-btn .apx-donate-label {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ccc;
}
.apx-donate-btn.apx-donate-primary {
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243,156,18,0.15), rgba(243,156,18,0.05));
}
.apx-donate-btn.apx-donate-primary .apx-donate-label { color: #f39c12; }
.apx-donate-note {
    font-size: 11px;
    color: #555;
    text-align: center;
    font-style: italic;
    margin-top: 8px;
}

/* ── Collaborations & Similar Artists Cards ── */
.apx-card-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}
.apx-card-scroll::-webkit-scrollbar { height: 4px; }
.apx-card-scroll::-webkit-scrollbar-track { background: transparent; }
.apx-card-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.apx-artist-card {
    flex-shrink: 0;
    width: 120px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.apx-artist-card:hover { transform: translateY(-3px); }
.apx-artist-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2a2a2a;
    display: block;
    margin: 0 auto 8px;
    transition: border-color 0.2s ease;
}
.apx-artist-card:hover img { border-color: #f39c12; }
.apx-artist-card .apx-card-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apx-artist-card .apx-card-sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Achievements ── */
.apx-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.apx-achievement {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.apx-achievement:hover { transform: translateY(-2px); border-color: #f39c12; }
.apx-achievement .apx-achv-icon { font-size: 32px; margin-bottom: 8px; }
.apx-achievement .apx-achv-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}
.apx-achievement .apx-achv-desc {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}
.apx-achievement--verified {
    border-color: #1d9bf0 !important;
    background: rgba(29, 155, 240, 0.08);
}
.apx-achievement--verified .apx-achv-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
}
.apx-achievement--verified .apx-achv-icon svg {
    width: 36px !important;
    height: 36px !important;
    display: block;
}
.apx-achievement--verified:hover { border-color: #1d9bf0 !important; }

/* ── Podcast Episodes ── */
.apx-podcast-list { display: flex; flex-direction: column; gap: 10px; }
.apx-podcast-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
    text-decoration: none;
}
.apx-podcast-item:hover { border-color: var(--muted); }
.apx-podcast-item img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.apx-podcast-item .apx-pod-cover-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--surface-2, var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.apx-podcast-item .apx-pod-info { flex: 1; min-width: 0; }
.apx-podcast-item .apx-pod-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apx-podcast-item .apx-pod-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.apx-podcast-item .apx-pod-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(243,156,18,0.15);
    border: 1.5px solid rgba(243,156,18,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f39c12;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.apx-podcast-item:hover .apx-pod-play { background: rgba(243,156,18,0.3); }

/* ── Livestreams ── */
.apx-live-list { display: flex; flex-direction: column; gap: 10px; }
.apx-live-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.apx-live-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}
.apx-live-item.type-worship::before    { background: #9b59b6; }
.apx-live-item.type-bible_study::before { background: #3498db; }
.apx-live-item.type-album_launch::before { background: #f39c12; }
.apx-live-item.type-qa::before         { background: #27ae60; }
.apx-live-item.type-concert::before    { background: #e74c3c; }
.apx-live-item.type-other::before      { background: #95a5a6; }

.apx-live-type-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--surface-2, var(--border));
}
.apx-live-info { flex: 1; min-width: 0; }
.apx-live-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apx-live-when { font-size: 11px; color: #888; margin-top: 3px; }
.apx-live-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.apx-live-badge.badge-live {
    background: rgba(231,76,60,0.2);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.4);
    animation: apx-pulse 1.5s infinite;
}
.apx-live-badge.badge-upcoming {
    background: rgba(39,174,96,0.15);
    color: #27ae60;
    border: 1px solid rgba(39,174,96,0.3);
}
@keyframes apx-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Booking Form ── */
.apx-booking-form { display: flex; flex-direction: column; gap: 14px; }
.apx-booking-form .apx-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) {
    .apx-booking-form .apx-form-row { grid-template-columns: 1fr; }
}
.apx-booking-form .apx-field { display: flex; flex-direction: column; gap: 5px; }
.apx-booking-form label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.apx-booking-form input,
.apx-booking-form select,
.apx-booking-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.apx-booking-form input:focus,
.apx-booking-form select:focus,
.apx-booking-form textarea:focus { border-color: #f39c12; }
.apx-booking-form select option { background: var(--bg, #0a0a0a); }
.apx-booking-submit {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    padding: 14px 24px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: transform 0.2s, opacity 0.2s;
    align-self: flex-start;
}
.apx-booking-submit:hover { transform: translateY(-1px); opacity: 0.9; }

/* ── Contact Info ── */
.apx-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.apx-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s;
}
.apx-contact-item:hover { border-color: var(--muted); }
.apx-contact-item .apx-ci-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(243,156,18,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f39c12;
    font-size: 15px;
    flex-shrink: 0;
}
.apx-contact-item .apx-ci-info { min-width: 0; }
.apx-contact-item .apx-ci-label { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.apx-contact-item .apx-ci-value { font-size: 12px; color: #ddd; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Social Links ── */
.apx-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.apx-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    border: 1px solid transparent;
}
.apx-social-btn:hover { transform: translateY(-2px); opacity: 0.85; }
.apx-social-btn.soc-facebook    { background: rgba(59,89,152,0.2);  color: #4a7de8; border-color: rgba(59,89,152,0.4);  }
.apx-social-btn.soc-instagram   { background: rgba(225,48,108,0.15); color: #e1306c; border-color: rgba(225,48,108,0.35);}
.apx-social-btn.soc-tiktok      { background: rgba(0,0,0,0.5);       color: var(--text);    border-color: #333;                 }
.apx-social-btn.soc-youtube     { background: rgba(255,0,0,0.15);    color: #ff4444; border-color: rgba(255,0,0,0.3);    }
.apx-social-btn.soc-spotify     { background: rgba(29,185,84,0.15);  color: #1db954; border-color: rgba(29,185,84,0.3);  }
.apx-social-btn.soc-apple-music { background: rgba(250,77,86,0.15);  color: #fa4d56; border-color: rgba(250,77,86,0.3);  }
.apx-social-btn.soc-x           { background: rgba(255,255,255,0.08); color: var(--text);   border-color: #333;                 }
.apx-social-btn.soc-threads     { background: rgba(255,255,255,0.08); color: #ccc;   border-color: #2a2a2a;              }

/* ── Copyright ── */
.apx-copyright-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.apx-copyright-item {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.apx-copyright-item .apx-cr-label { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.apx-copyright-item .apx-cr-value { font-size: 13px; color: var(--text); font-weight: 600; }

/* ── Mobile adaptations ── */
@media (max-width: 768px) {
    .apx-section { padding: 16px; border-radius: 10px; }
    .apx-donate-grid { grid-template-columns: repeat(2, 1fr); }
    .apx-achievements-grid { grid-template-columns: repeat(2, 1fr); }
    .apx-contact-grid { grid-template-columns: 1fr; }
    .apx-copyright-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Empty State ── */
.apx-empty {
    text-align: center;
    padding: 32px 16px;
    color: #555;
    font-size: 13px;
}
.apx-empty .apx-empty-icon { font-size: 36px; margin-bottom: 8px; }

/* Light Theme Overrides for Artist Profile */
:root.light-theme .apx-section,
:root.light-theme .apx-overview-card,
:root.light-theme .apx-achieve-card,
:root.light-theme .apx-podcast-item,
:root.light-theme .apx-latest-release {
    background: #ffffff;
    border-color: #e0e0e0;
}
:root.light-theme .apx-achieve-icon {
    background: rgba(243, 156, 18, 0.15);
}
:root.light-theme .apx-pod-play {
    background: rgba(243, 156, 18, 0.15);
}
:root.light-theme .apx-card-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
}


/* Similar Artists Grid */
.similar-artists-grid {
    grid-template-columns: repeat(5, 1fr) !important;
}
@media (max-width: 768px) {
    .similar-artists-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Fix hardcoded light colors ── */
.apx-contact-item .apx-ci-value { color: var(--text); }
.apx-donate-btn .apx-donate-label { color: var(--text-2, #aaa); }

/* ── Dark Mode: Fix areas showing white in dark theme ── */
/* GMP Legacy Desktop wrapper text color overrides */
.artist-legacy-ui h3.media-heading,
.artist-legacy-ui h5 {
    color: var(--text) !important;
}

/* Artist hub sections on the desktop profile */
.hub-legacy-wrapper,
.hub-legacy-wrapper .hub-section,
.hub-legacy-wrapper .hub-latest-card,
.hub-legacy-wrapper .stat-card,
.hub-legacy-wrapper .song-row {
    background-color: var(--surface);
    color: var(--text);
}

/* Desktop overview section white bg fixes */
.artist-hub-stats-section .stat-card {
    background: var(--surface-2, #1f1f1f);
}

/* apx-section always uses design tokens so it should work,
   but override any stray hardcoded backgrounds */
.apx-section {
    background: var(--surface) !important;
    color: var(--text) !important;
}
.apx-section-title { color: var(--text) !important; }
.apx-donate-btn { background: var(--surface-2, #1f1f1f); color: var(--text); }
.apx-achievement { background: var(--surface-2, #1f1f1f); }
.apx-achievement .apx-achv-title { color: var(--text); }
.apx-podcast-item { background: var(--surface-2, #1f1f1f); }
.apx-live-item { background: var(--surface-2, #1f1f1f); }
.apx-contact-item { background: var(--surface-2, #1f1f1f); }
.apx-copyright-item { background: var(--surface-2, #1f1f1f); }

/* Light Theme — restore white surfaces */
:root.light-theme .apx-section { background: #ffffff !important; }
:root.light-theme .apx-donate-btn { background: #f5f5f5; }
:root.light-theme .apx-achievement { background: #f9f9f9; }
:root.light-theme .apx-podcast-item { background: #f9f9f9; }
:root.light-theme .apx-live-item { background: #f9f9f9; }
:root.light-theme .apx-contact-item { background: #f9f9f9; }
:root.light-theme .apx-copyright-item { background: #f9f9f9; }
:root.light-theme .artist-hub-stats-section .stat-card { background: #f5f5f5; }
