/* ==========================================================================
   Radio Platform – Premium Station Cards
   ========================================================================== */

.station-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.station-card--modern {
    position: relative;
    min-width: 0;
    overflow: hidden;

    border: 1px solid rgba(91, 77, 245, 0.10);
    border-radius: 26px;
    background: #ffffff;

    box-shadow:
        0 12px 34px rgba(15, 23, 42, 0.07);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.station-card--modern:hover {
    transform: translateY(-8px);
    border-color: rgba(91, 77, 245, 0.22);

    box-shadow:
        0 28px 68px rgba(15, 23, 42, 0.15);
}

/* Gornji dio kartice */

.station-card--modern .station-card-image {
    position: relative;

    display: grid;
    width: 100%;
    height: 290px;
    place-items: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(139, 92, 246, 0.13),
            transparent 55%
        ),
        linear-gradient(
            145deg,
            #f9faff,
            #eef1fb
        );

    text-decoration: none;
}

.station-card--modern .station-card-image img {
    display: block;

    width: 86%;
    height: 86%;

    padding: 0;
    object-fit: contain;

    filter:
        drop-shadow(
            0 14px 24px rgba(31, 41, 55, 0.12)
        );

    transform: scale(1);
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.station-card--modern:hover .station-card-image img {
    transform: scale(1.08);

    filter:
        drop-shadow(
            0 20px 32px rgba(31, 41, 55, 0.17)
        );
}

.station-card--modern .station-card-placeholder {
    display: grid;
    width: 126px;
    height: 126px;
    place-items: center;

    border-radius: 32px;

    background:
        linear-gradient(
            135deg,
            rgba(91, 77, 245, 0.13),
            rgba(139, 92, 246, 0.18)
        );

    font-size: 62px;
}

/* Status */

.station-card--modern .station-card-status-dot {
    position: absolute;
    top: 16px;
    right: 16px;

    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.90);

    box-shadow:
        0 8px 22px rgba(15, 23, 42, 0.13);

    backdrop-filter: blur(10px);
}

.station-card--modern .station-card-status-dot > span {
    width: 9px;
    height: 9px;

    border-radius: 50%;
    background: #94a3b8;
}

.station-card--modern .station-card-status-dot.is-online > span {
    background: #22c55e;

    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.14);
}

.station-card--modern .station-card-status-dot.is-offline > span {
    background: #ef4444;

    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.13);
}

.station-card--modern .station-card-status-dot.is-unknown > span {
    background: #94a3b8;

    box-shadow:
        0 0 0 4px rgba(148, 163, 184, 0.14);
}

/* Donji dio */

.station-card--modern .station-card-body {
    padding: 22px 22px 24px;
}

.station-card--modern .station-card-title {
    margin: 0;

    overflow: hidden;

    color: var(--public-text);

    font-size: 21px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -0.025em;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-card--modern .station-card-title a {
    color: inherit;
    text-decoration: none;
}

.station-card--modern .station-card-title a:hover {
    color: var(--public-primary);
}

.station-card--modern .station-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: 14px;
}

.station-card--modern .station-card-location {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;

    overflow: hidden;

    color: var(--public-text-soft);

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    white-space: nowrap;
}

.station-card--modern .station-card-location > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-card--modern .station-card-location-icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;

    border-radius: 50%;

    background: rgba(91, 77, 245, 0.10);
    color: var(--public-primary);

    font-size: 11px;
    font-weight: 900;
}

/* Play dugme */

.station-card--modern .station-card-play-button {
    position: relative;

    display: inline-grid;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    flex: 0 0 50px;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--public-primary),
            var(--public-secondary)
        );

    color: transparent;

    box-shadow:
        0 12px 28px rgba(91, 77, 245, 0.30);

    font-size: 0;
    line-height: 1;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease;
}

.station-card--modern .station-card-play-button > span {
    display: none !important;
}

.station-card--modern .station-card-play-button::before {
    display: block;

    content: "▶";

    color: #f0e9e9;

    font-size: 19px;
    font-weight: 700;
    line-height: 1;

    transform: translateX(1px);
}

.station-card--modern .station-card-play-button:hover {
    transform: scale(1.09);

    box-shadow:
        0 18px 38px rgba(1, 0, 12, 0.4);
}

.station-card--modern
.station-card-play-button.is-playing::before {
    content: "Ⅱ";

    font-size: 21px;
    font-weight: 900;

    transform: translateY(6px);
}

.station-card--modern
.station-card-play-button.is-loading::before {
    width: 19px;
    height: 19px;

    content: "";

    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #ffffff;
    border-radius: 50%;

    transform: none;

    animation:
        premiumStationButtonSpin
        0.75s
        linear
        infinite;
}

@keyframes premiumStationButtonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */

@media (max-width: 1100px) {
    .station-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .station-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .station-card--modern .station-card-image {
        height: 240px;
    }

    .station-card--modern .station-card-body {
        padding: 20px;
    }

    .station-card--modern .station-card-title {
        font-size: 19px;
    }

    .station-card--modern .station-card-play-button {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        flex-basis: 46px;
    }
}
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Poskrbi, da je kartica vedno kvadratna */
}

/*
 * ============================================================
 * RADIO PLATFORM – FAVORITE BUTTON LIGHT THEME FIX v1.0
 * ============================================================
 */

/*
 * Neaktivni favorit – LIGHT.
 */
html[data-theme="light"]
.favorite-toggle {

    background:
        #ffffff;

    color:
        #8a97aa;

    border:
        1px solid
        rgba(148, 163, 184, 0.28);

    box-shadow:
        0 6px 18px
        rgba(15, 23, 42, 0.06);
}


/*
 * Hover – LIGHT.
 */
html[data-theme="light"]
.favorite-toggle:hover {

    background:
        #f8f9ff;

    color:
        #6557f5;

    border-color:
        rgba(101, 87, 245, 0.28);
}


/*
 * Aktivni favorit – LIGHT.
 */
html[data-theme="light"]
.favorite-toggle.is-favorite {

    background:
        #fff1f4;

    color:
        #ff5f7e;

    border-color:
        rgba(255, 95, 126, 0.34);

    box-shadow:
        0 6px 18px
        rgba(255, 95, 126, 0.10);
}


/*
 * Aktivni hover – LIGHT.
 */
html[data-theme="light"]
.favorite-toggle.is-favorite:hover {

    background:
        #ffe8ee;

    color:
        #f04468;

    border-color:
        rgba(240, 68, 104, 0.40);
}


/* ==========================================================================
   RADIO PLATFORM – CARD NOW PLAYING POLISH v1.0 START
   ========================================================================== */


/*
|--------------------------------------------------------------------------
| Now Playing red
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 10px;

    padding:
        7px
        9px;

    border-radius: 9px;

    background:
        rgba(91, 77, 245, 0.045);

    transition:
        background 160ms ease,
        border-color 160ms ease;
}


/*
|--------------------------------------------------------------------------
| Music ikona
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex:
        0
        0
        18px;

    width: 18px;
    height: 18px;

    font-size: 13px;

    transform-origin:
        center;

    opacity: 0.72;
}


/*
|--------------------------------------------------------------------------
| Naziv pjesme
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-text {
    min-width: 0;
    max-width: 100%;

    display: block;

    overflow: hidden;

    color:
        var(--public-text-soft);

    font-size: 12.5px;

    font-weight: 650;

    line-height: 1.35;

    white-space: nowrap;

    text-overflow: ellipsis;

    transition:
        color 160ms ease,
        opacity 160ms ease;
}


/*
|--------------------------------------------------------------------------
| Metadata uspješno učitana
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-text[
    data-metadata-state="ready"
] {
    color:
        var(--public-text);
}


.latest-station-card__now-playing:has(
    .latest-station-card__now-playing-text[
        data-metadata-state="ready"
    ]
) {
    background:
        rgba(91, 77, 245, 0.065);
}


/*
 * Diskretan LIVE puls.
 */
.latest-station-card__now-playing:has(
    .latest-station-card__now-playing-text[
        data-metadata-state="ready"
    ]
)
.latest-station-card__now-playing-icon {

    opacity: 1;

    animation:
        radio-card-now-playing-pulse
        2.4s
        ease-in-out
        infinite;
}


@keyframes radio-card-now-playing-pulse {

    0%,
    100% {
        transform:
            scale(1);

        opacity:
            0.76;
    }

    50% {
        transform:
            scale(1.12);

        opacity:
            1;
    }

}


/*
|--------------------------------------------------------------------------
| Loading
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-text[
    data-metadata-state="loading"
] {
    opacity: 0.62;

    animation:
        radio-card-metadata-loading
        1.25s
        ease-in-out
        infinite;
}


@keyframes radio-card-metadata-loading {

    0%,
    100% {
        opacity:
            0.42;
    }

    50% {
        opacity:
            0.82;
    }

}


/*
|--------------------------------------------------------------------------
| Nema metadata
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-text[
    data-metadata-state="empty"
] {
    opacity:
        0.68;

    font-weight:
        550;
}


/*
|--------------------------------------------------------------------------
| Metadata greška
|--------------------------------------------------------------------------
*/

.latest-station-card__now-playing-text[
    data-metadata-state="error"
] {
    color:
        #b76c72;

    opacity:
        0.85;

    font-weight:
        550;
}


/*
|--------------------------------------------------------------------------
| Hover kartice
|--------------------------------------------------------------------------
*/

.latest-station-card:hover
.latest-station-card__now-playing {

    background:
        rgba(91, 77, 245, 0.085);
}


.latest-station-card:hover
.latest-station-card__now-playing-text[
    data-metadata-state="ready"
] {
    color:
        var(--public-primary);
}


/*
|--------------------------------------------------------------------------
| Dark theme
|--------------------------------------------------------------------------
*/

html[data-theme="dark"]
.latest-station-card__now-playing {

    background:
        rgba(56, 189, 248, 0.045);
}


html[data-theme="dark"]
.latest-station-card__now-playing:has(
    .latest-station-card__now-playing-text[
        data-metadata-state="ready"
    ]
) {

    background:
        rgba(56, 189, 248, 0.065);
}


html[data-theme="dark"]
.latest-station-card:hover
.latest-station-card__now-playing {

    background:
        rgba(56, 189, 248, 0.085);
}


html[data-theme="dark"]
.latest-station-card:hover
.latest-station-card__now-playing-text[
    data-metadata-state="ready"
] {
    color:
        #63c9f4;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .latest-station-card__now-playing {
        margin-top:
            8px;

        padding:
            6px
            8px;
    }


    .latest-station-card__now-playing-text {
        font-size:
            12px;
    }

}


/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    .latest-station-card__now-playing-icon,
    .latest-station-card__now-playing-text {

        animation:
            none !important;
    }

}


/* ==========================================================================
   RADIO PLATFORM – CARD NOW PLAYING POLISH v1.0 END
   ========================================================================== */


/* ==========================================================================
   RADIO PLATFORM – CARD NOW PLAYING DARK READABILITY v1.1 START
   ========================================================================== */

html[data-theme="dark"]
.latest-station-card__now-playing-text[
    data-metadata-state="ready"
] {
    color:
        #b9cbe0;

    opacity:
        1;
}


html[data-theme="dark"]
.latest-station-card__now-playing-icon {
    color:
        #63c9f4;

    opacity:
        0.88;
}


html[data-theme="dark"]
.latest-station-card__now-playing {

    background:
        rgba(56, 189, 248, 0.065);

    border:
        1px solid
        rgba(56, 189, 248, 0.035);
}


html[data-theme="dark"]
.latest-station-card:hover
.latest-station-card__now-playing-text[
    data-metadata-state="ready"
] {
    color:
        #72d4f8;
}


html[data-theme="dark"]
.latest-station-card__now-playing-text[
    data-metadata-state="error"
] {
    color:
        #ef8d98;
}


/* ==========================================================================
   RADIO PLATFORM – CARD NOW PLAYING DARK READABILITY v1.1 END
   ========================================================================== */
