@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&display=swap');

:root {
    --snh-sfm-height-reserve: 86px;
    --snh-sfm-bg: #B74869;
    --snh-sfm-white: #ffffff;
}

html.snh-sfm-nav-busy { cursor: progress; }

body { padding-bottom: var(--snh-sfm-height-reserve); }

.snh-sfm-shell {
    position: fixed;
    z-index: 999990;
    left: 50%;
    bottom: 12px;
    width: clamp(240px, 67vw, 680px);
    transform: translateX(-50%);
    margin: 0;
    pointer-events: none;
}

.snh-sfm-player {
    box-sizing: border-box;
    width: 100%;
    min-height: 60px;
    padding: 9px 11px 9px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--snh-sfm-bg);
    box-shadow: 0 8px 24px rgba(35, 18, 25, .20);
    color: var(--snh-sfm-white);
    font-family: 'Roboto', Arial, sans-serif;
    pointer-events: auto;
}

.snh-sfm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: stretch;
    column-gap: 10px;
    min-height: 42px;
}

.snh-sfm-info {
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    min-width: 0;
    row-gap: 7px;
}

.snh-sfm-topline {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: .45rem;
    line-height: 1;
}

.snh-sfm-title {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snh-sfm-quality {
    flex: 0 0 auto;
    color: rgba(255,255,255,.76);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: .01em;
}

.snh-sfm-timeline {
    display: grid;
    grid-template-columns: auto minmax(40px, 1fr) auto;
    align-items: center;
    column-gap: 6px;
    width: 100%;
    min-width: 0;
}

.snh-sfm-time {
    color: rgba(255,255,255,.82);
    font-size: .80rem;
    font-weight: 400;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.snh-sfm-track {
    position: relative;
    width: 100%;
    height: 2px;
    overflow: visible;
    border-radius: 999px;
    background: rgba(255,255,255,.28);
}

.snh-sfm-progress {
    position: relative;
    width: 0;
    height: 100%;
    overflow: visible;
    border-radius: inherit;
    background: #fff;
    transition: width .25s linear;
}

.snh-sfm-progress::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    pointer-events: none;
}

.snh-sfm-toggle,
.snh-sfm-toggle:hover,
.snh-sfm-toggle:focus,
.snh-sfm-toggle:focus-visible,
.snh-sfm-toggle:active {
    align-self: stretch;
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 42px;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.14) !important;
    box-shadow: none !important;
    outline: none;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .15s ease, transform .15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.snh-sfm-toggle:hover { background: rgba(255,255,255,.22) !important; }
.snh-sfm-toggle:active { transform: scale(.96); }
.snh-sfm-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.snh-sfm-toggle i { display: block; font-size: 1.15rem; line-height: 1; }
.snh-sfm-toggle .fa-play { margin-left: 2px; }

.snh-sfm-player audio { display: none; }

.snh-sfm-nav-indicator {
    position: fixed;
    z-index: 999989;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--snh-sfm-bg);
    opacity: 0;
    pointer-events: none;
    transition: width .18s ease, opacity .18s ease;
}

html.snh-sfm-nav-busy .snh-sfm-nav-indicator {
    width: 72%;
    opacity: 1;
}

@media (max-width: 640px) {
    :root { --snh-sfm-height-reserve: 78px; }

    .snh-sfm-shell {
        bottom: 9px;
        width: clamp(240px, 67vw, 680px);
    }

    .snh-sfm-player {
        min-height: 56px;
        padding: 8px 9px 8px 18px;
    }

    .snh-sfm-layout {
        grid-template-columns: minmax(0, 1fr) 40px;
        column-gap: 10px;
        min-height: 40px;
    }

    .snh-sfm-info { row-gap: 6px; }
    .snh-sfm-title { font-size: .95rem; }
    .snh-sfm-quality { font-size: .78rem; }
    .snh-sfm-time { font-size: .76rem; }
    .snh-sfm-timeline { column-gap: 6px; }

    .snh-sfm-toggle,
    .snh-sfm-toggle:hover,
    .snh-sfm-toggle:focus,
    .snh-sfm-toggle:focus-visible,
    .snh-sfm-toggle:active {
        width: 40px;
        min-height: 40px;
    }

    .snh-sfm-toggle i { font-size: 1.05rem; }
}

@media (max-width: 380px) {
    .snh-sfm-player { padding-left: 15px; }
    .snh-sfm-layout { column-gap: 6px; }
    .snh-sfm-topline { gap: .4rem; }
    .snh-sfm-quality { font-size: .78rem; }
    .snh-sfm-time { font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
    .snh-sfm-progress,
    .snh-sfm-toggle,
    .snh-sfm-nav-indicator { transition: none; }
}
