/* Askómedas Music Core 1.1.0 — final UI compatibility layer. */

/*
 * Automatic menu contrast. The JS layer first uses Croma's page state and,
 * when needed, inspects the actual surface immediately below the transparent
 * header. This survives Barba/PJAX navigation without maintaining a page list.
 */
html.ask-menu-on-light .classic-menu:not(.mini) > ul > li > a,
html.ask-menu-on-light .classic-menu:not(.mini) > ul > li.languages-selector a,
html.ask-menu-on-light .classic-menu:not(.mini) .classic-menu-hot-links a,
html.ask-menu-on-light .classic-menu:not(.mini) .classic-menu-hot-links a i,
html.ask-menu-on-light .classic-menu:not(.mini) .hotlink a,
html.ask-menu-on-light .classic-menu:not(.mini) .hotlink a i,
html.ask-menu-on-light .classic-menu:not(.mini) .responsive-header a,
html.ask-menu-on-light .classic-menu:not(.mini) .sandwich-icon,
html.ask-menu-on-light ul.header-top-menu li a {
    color: #131112 !important;
}
html.ask-menu-on-light .classic-menu:not(.mini) .classic-menu-logo,
html.ask-menu-on-light .classic-menu:not(.mini) > ul > li.logo img,
html.ask-menu-on-light .classic-menu:not(.mini) .site-logo img {
    filter: brightness(0) saturate(100%) !important;
}
html.ask-menu-on-light .menu-toggle rect,
html.ask-menu-on-light .menu-toggle path,
html.ask-menu-on-light .menu-toggle polygon,
html.ask-menu-on-light .classic-menu:not(.mini) svg rect,
html.ask-menu-on-light .classic-menu:not(.mini) svg path,
html.ask-menu-on-light .classic-menu:not(.mini) svg polygon {
    fill: #131112 !important;
}

html.ask-menu-on-dark .classic-menu:not(.mini) > ul > li > a,
html.ask-menu-on-dark .classic-menu:not(.mini) > ul > li.languages-selector a,
html.ask-menu-on-dark .classic-menu:not(.mini) .classic-menu-hot-links a,
html.ask-menu-on-dark .classic-menu:not(.mini) .classic-menu-hot-links a i,
html.ask-menu-on-dark .classic-menu:not(.mini) .hotlink a,
html.ask-menu-on-dark .classic-menu:not(.mini) .hotlink a i,
html.ask-menu-on-dark .classic-menu:not(.mini) .responsive-header a,
html.ask-menu-on-dark .classic-menu:not(.mini) .sandwich-icon,
html.ask-menu-on-dark ul.header-top-menu li a {
    color: #fff !important;
}
html.ask-menu-on-dark .classic-menu:not(.mini) .classic-menu-logo,
html.ask-menu-on-dark .classic-menu:not(.mini) > ul > li.logo img,
html.ask-menu-on-dark .classic-menu:not(.mini) .site-logo img {
    filter: brightness(0) saturate(100%) invert(1) !important;
}
html.ask-menu-on-dark .menu-toggle rect,
html.ask-menu-on-dark .menu-toggle path,
html.ask-menu-on-dark .menu-toggle polygon,
html.ask-menu-on-dark .classic-menu:not(.mini) svg rect,
html.ask-menu-on-dark .classic-menu:not(.mini) svg path,
html.ask-menu-on-dark .classic-menu:not(.mini) svg polygon {
    fill: #fff !important;
}

/*
 * CookieYes revisit button: when the fixed player opens, move the consent
 * button above its 90px bar instead of placing it over the album artwork.
 */
.cky-btn-revisit-wrapper,
.cky-revisit-bottom-left,
[data-cky-tag="revisit-consent"] {
    transition: bottom .75s ease !important;
}
body.continuousPlayer-enable .cky-btn-revisit-wrapper,
body.continuousPlayer-enable .cky-revisit-bottom-left,
body.continuousPlayer-enable [data-cky-tag="revisit-consent"],
html.askomedas-player-visible .cky-btn-revisit-wrapper,
html.askomedas-player-visible .cky-revisit-bottom-left,
html.askomedas-player-visible [data-cky-tag="revisit-consent"] {
    bottom: 105px !important;
}

/*
 * Give long song titles a real metadata area. Normal titles keep the same
 * look; only titles that need it receive the compact two-line treatment.
 */
html body .continuousPlayer {
    --askomedas-player-meta-width: clamp(250px, 22vw, 390px);
}
html body .continuousPlayer .playerNowPlaying .metadata {
    left: 100px !important;
    top: 12px !important;
    width: var(--askomedas-player-meta-width) !important;
    height: 66px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
html body .continuousPlayer .playerNowPlaying .metadata .track-name,
html body .continuousPlayer .playerNowPlaying .metadata .album-title {
    max-width: 100% !important;
    overflow: hidden !important;
}
html body .continuousPlayer .playerNowPlaying .metadata .album-title {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}
html body .continuousPlayer.ask-track-long .playerNowPlaying .metadata .track-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    font-size: clamp(18px, 1.2vw, 24px) !important;
    line-height: 1 !important;
    letter-spacing: clamp(1px, .14vw, 2.5px) !important;
    max-height: 48px !important;
}
html body .continuousPlayer.ask-track-long .playerNowPlaying .metadata .album-title {
    margin-top: 2px !important;
    font-size: clamp(10px, .72vw, 14px) !important;
    line-height: 1.05 !important;
}
html body .continuousPlayer .player {
    left: calc(100px + var(--askomedas-player-meta-width)) !important;
    width: calc(100% - 100px - var(--askomedas-player-meta-width)) !important;
}

@media (max-width: 900px) {
    html body .continuousPlayer .playerNowPlaying .metadata {
        width: calc(100% - 250px) !important;
        min-width: 140px !important;
    }
    html body .continuousPlayer .player {
        left: auto !important;
        right: 0 !important;
        width: 145px !important;
    }
    html body .continuousPlayer .player .wave,
    html body .continuousPlayer .player .progressLoading {
        display: none !important;
    }
}

@media (max-width: 600px) {
    html body .continuousPlayer .playerNowPlaying .album-art {
        left: 8px !important;
        top: 16px !important;
        width: 58px !important;
        height: 58px !important;
    }
    html body .continuousPlayer .playerNowPlaying .metadata {
        left: 76px !important;
        width: calc(100% - 211px) !important;
        top: 12px !important;
    }
    html body .continuousPlayer .player {
        width: 130px !important;
    }
    html body .continuousPlayer.ask-track-long .playerNowPlaying .metadata .track-name {
        font-size: 16px !important;
        line-height: 17px !important;
        letter-spacing: 1px !important;
        max-height: 34px !important;
    }
    body.continuousPlayer-enable .cky-btn-revisit-wrapper,
    body.continuousPlayer-enable .cky-revisit-bottom-left,
    body.continuousPlayer-enable [data-cky-tag="revisit-consent"],
    html.askomedas-player-visible .cky-btn-revisit-wrapper,
    html.askomedas-player-visible .cky-revisit-bottom-left,
    html.askomedas-player-visible [data-cky-tag="revisit-consent"] {
        bottom: 100px !important;
    }
}


/* 1.1.0 — fixed player usable on narrow phones without touching desktop. */
@media (max-width: 480px) {
    html body .continuousPlayer {
        min-width: 0 !important;
        height: 84px !important;
    }
    html body .continuousPlayer .playerNowPlaying {
        width: 100% !important;
        min-width: 0 !important;
    }
    html body .continuousPlayer .playerNowPlaying .album-art {
        top: 13px !important;
        width: 54px !important;
        height: 54px !important;
    }
    html body .continuousPlayer .playerNowPlaying .metadata {
        left: 70px !important;
        top: 10px !important;
        width: calc(100% - 178px) !important;
        min-width: 0 !important;
        height: 60px !important;
    }
    html body .continuousPlayer .player {
        width: 104px !important;
        min-width: 104px !important;
    }
    html body .continuousPlayer .player .control .previous,
    html body .continuousPlayer .player .control .next {
        transform: scale(.86);
    }
    html body .continuousPlayer .playerNowPlaying .metadata .track-name,
    html body .continuousPlayer .playerNowPlaying .metadata .album-title {
        overflow-wrap: anywhere !important;
    }
    body.continuousPlayer-enable,
    html.askomedas-player-visible body {
        padding-bottom: 84px;
    }
}
