/* Explain: Styles for single cards, including cover art background effects. */
/* --- כפתורי הפעולה בכרטיסי הסינגלים: ריבועים לבנים בהירים עם אייקון כחול חזק שבולט מעל התמונה הכהה --- */
.single-fav-btn,
.single-play-btn,
.single-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    min-height: 2.35rem !important;
    min-width: 2.35rem !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(6px);
    transition: transform 300ms ease, box-shadow 300ms ease, background-color 300ms ease;
}

.single-fav-btn:hover,
.single-play-btn:hover,
.single-download-btn:hover {
    background: #FFFFFF !important;
    transform: translateY(-2px) scale(1.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.single-fav-btn:active,
.single-play-btn:active,
.single-download-btn:active {
    transform: scale(0.94) !important;
}

.single-fav-btn i,
.single-play-btn i,
.single-download-btn i {
    font-size: 1.25rem !important;
    background-image: none !important;
    -webkit-text-fill-color: #14100A !important;
    color: #14100A !important;
}

.single-fav-btn:hover i,
.single-play-btn:hover i,
.single-download-btn:hover i,
.single-play-btn.is-playing i,
.single-fav-btn[aria-pressed="true"] i {
    -webkit-text-fill-color: #B8901C !important;
    color: #B8901C !important;
}

/* --- כפתור הורדה בתחתית כרטיס הסינגל --- */
.single-card-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-radius: 999px !important;
    background-image: linear-gradient(100deg, #1F4E8C 0%, #24509A 24%, #2E6FBF 44%, #C9A227 72%, #E0BC55 100%) !important;
    background-size: 240% auto !important;
    animation: colorfulMove 9s linear infinite;
    color: #FFFFFF !important;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(31, 78, 140, 0.28);
    cursor: pointer;
    transition: transform 300ms ease, box-shadow 300ms ease, background 300ms ease;
}

.single-card-download-btn i {
    margin-inline-end: 0.5rem;
    font-size: 0.95rem;
    -webkit-text-fill-color: #FFFFFF !important;
    color: #FFFFFF !important;
}

.single-card-download-btn:hover,
.single-card-download-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(31, 78, 140, 0.42);
    background-image: linear-gradient(100deg, #24509A 0%, #2E6FBF 22%, #128C8E 44%, #C9A227 66%, #E0BC55 100%) !important;
    background-size: 240% auto !important;
}

.single-card-download-btn:active {
    transform: scale(0.97);
}

/* --- כפתור ההאזנה המרכזי מעל עטיפת הסינגל --- */
.single-play-btn {
    height: 3.5rem !important;
    width: 3.5rem !important;
}

.single-play-btn i {
    font-size: 1.5rem !important;
}

/* --- מצב טעינה: סמל מסתובב ולחיצה מושבתת --- */
.single-play-btn.is-loading {
    cursor: progress !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.single-play-btn.is-loading i {
    -webkit-text-fill-color: #B8901C !important;
    color: #B8901C !important;
}

/* --- מצב מתנגן: סמל השהיה עם פעימת זוהר זהובה --- */
.single-play-btn.is-playing {
    background: #FFFFFF !important;
    animation: singlePlayingPulse 1.8s ease-out infinite;
}

.single-play-btn.is-playing i {
    -webkit-text-fill-color: #B8901C !important;
    color: #B8901C !important;
}

@keyframes singlePlayingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.55), 0 8px 24px rgba(0, 0, 0, 0.55); }
    50% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0), 0 8px 24px rgba(0, 0, 0, 0.55); }
}

/* --- מצב שגיאה: כפתור אדום עם סמל אזהרה --- */
.single-play-btn.is-error {
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    background: rgba(192, 57, 43, 0.95) !important;
}

.single-play-btn.is-error i {
    -webkit-text-fill-color: #FFFFFF !important;
    color: #FFFFFF !important;
}

.single-play-error {
    margin: 0.5rem 0 0;
    border: 1px solid rgba(192, 57, 43, 0.4);
    border-radius: 0.85rem;
    background: rgba(192, 57, 43, 0.14);
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.5;
    color: #B23A2E;
}

/* --- כפתור ההאזנה מוצג רק כשהעכבר על משבצת השיר (במכשירים עם עכבר); במסכי מגע הוא תמיד גלוי --- */
@media (hover: hover) {
    .single-play-wrap {
        opacity: 0;
        visibility: hidden;
        transition: opacity 250ms ease, visibility 250ms ease;
    }

    .song-card:hover .single-play-wrap,
    .song-card:focus-within .single-play-wrap {
        opacity: 1;
        visibility: visible;
    }
}

/* --- מסגרת עטיפת סינגל: תמיד מלבנית (16:9), והתמונה מוצגת במלואה ללא חיתוך --- */
.single-cover-frame {
    position: relative;
    aspect-ratio: 16 / 9;
}

/* --- מילוי הצדדים: כשהתמונה אינה ממלאת את המלבן, הצדדים הריקים מתמלאים בגרסה מטושטשת של אותה התמונה עצמה --- */
.single-cover-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--cover-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(16px) brightness(0.98) saturate(1.1) contrast(1.02);
    transform: scale(1.22);
    pointer-events: none;
}

/* --- שכבת עומק מעל המילוי הצדדי: גרדיאנט כהה-זהוב עדין עם הילה מוארת במרכז, כדי שהצדדים ייראו מעוצבים ויוקרתיים --- */
.single-cover-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(20, 16, 10, 0.06), rgba(20, 16, 10, 0.14));
    pointer-events: none;
}

.single-cover-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.single-cover-frame iframe {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- כפתור ההורדה בשורת פרטי הסינגל: עגול, מוזהב ועדין, משתלב עם רקע הכרטיס הבהיר --- */
.single-download-btn {
    border: 1px solid var(--glass-border) !important;
    background: var(--accent-soft) !important;
    box-shadow: none !important;
}

.single-download-btn i {
    font-size: 1rem !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
    color: var(--accent-strong) !important;
}

.single-download-btn:hover,
.single-download-btn:focus-visible {
    border-color: var(--button-color) !important;
    background: var(--button-color) !important;
    transform: translateY(-2px) scale(1.06) !important;
    box-shadow: var(--shadow-button) !important;
}

.single-download-btn:hover i,
.single-download-btn:focus-visible i {
    -webkit-text-fill-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}