/* ==========================================================================
   UA Radio Player — Topbar Dropdown
   ========================================================================== */

/* ---------- Topbar Now-Playing-Pille ---------- */

.ua-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    max-width: 340px;
    padding: 0 13px 0 10px;
    margin-left: 10px;
    border-radius: 999px;
    cursor: pointer;
    vertical-align: middle;
    color: rgba(255,255,255,0.88);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ua-radio-pill:hover,
.ua-radio-pill:focus-visible {
    background: rgba(255,255,255,0.16);
    border-color: rgba(250,190,12,0.65);
    color: #fff;
    outline: none;
}
.ua-radio-pill__icon { display: inline-flex; flex-shrink: 0; color: #fabe0c; }
.ua-radio-pill__name {
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.6px;
    text-transform: uppercase; flex-shrink: 0;
}
.ua-radio-pill__live {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
    color: #10b981; flex-shrink: 0;
}
.ua-radio-pill__dot {
    width: 6px; height: 6px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.55);
    animation: ua-radio-pill-pulse 1.8s ease-out infinite;
}
@keyframes ua-radio-pill-pulse {
    70%  { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.ua-radio-pill__sep { opacity: 0.4; flex-shrink: 0; font-size: 12px; }
.ua-radio-pill__now {
    font-size: 12px; font-weight: 500; opacity: 0.92;
    overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.ua-radio-pill.is-offline .ua-radio-pill__live { color: rgba(255,255,255,0.4); }
.ua-radio-pill.is-offline .ua-radio-pill__dot { background: rgba(255,255,255,0.4); animation: none; box-shadow: none; }
@media (max-width: 900px) {
    .ua-radio-pill__now, .ua-radio-pill__sep, .ua-radio-pill__live { display: none; }
    .ua-radio-pill { max-width: none; }
}

/* ---------- Topbar Button (alt, ungenutzt) ---------- */

.ua-radio-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    color: rgba(255,255,255,0.75);
    vertical-align: middle;
    margin-left: 8px;
}

.ua-radio-topbar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fabe0c;
}

.ua-radio-topbar-btn.is-active {
    color: #fabe0c;
}

.ua-radio-topbar-btn.is-playing {
    color: #fabe0c;
}

/* Pulsierender Dot wenn aktiv */
.ua-radio-topbar-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s;
}

.ua-radio-topbar-btn.is-playing .ua-radio-topbar-dot {
    background: #10b981;
    animation: ua-radio-pulse 1.5s ease-in-out infinite;
}

@keyframes ua-radio-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- Dropdown Panel ---------- */

.ua-radio-dropdown {
    position: fixed;
    top: 0;
    right: 16px;
    z-index: 100000;
    width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    pointer-events: none;
}

.ua-radio-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.ua-radio-dropdown__inner {
    background: #2f4449;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.05) 6px,
        transparent 6px,
        transparent 12px
    );
    color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- Header Row ---------- */

.ua-radio-dropdown__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.ua-radio-dropdown__live {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    transition: color 0.3s;
}

.ua-radio-dropdown.is-live .ua-radio-dropdown__live {
    color: #10b981;
}

.ua-radio-dropdown.is-offline .ua-radio-dropdown__live {
    color: rgba(255,255,255,0.35);
}

.ua-radio-dropdown__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: background 0.3s;
}

.ua-radio-dropdown.is-live .ua-radio-dropdown__live-dot {
    background: #10b981;
    animation: ua-radio-pulse 1.5s ease-in-out infinite;
}

.ua-radio-dropdown.is-offline .ua-radio-dropdown__live-dot {
    background: rgba(239, 68, 68, 0.6);
    animation: none;
}

.ua-radio-dropdown__station {
    flex: 1;
    font-weight: 600;
    color: #fabe0c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ua-radio-dropdown__listeners {
    display: flex;
    align-items: center;
    gap: 3px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

/* ---------- Track Info ---------- */

.ua-radio-dropdown__track {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ua-radio-dropdown__cover {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ua-radio-dropdown__cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.ua-radio-dropdown__cover-img[src]:not([src=""]) {
    display: block;
}

.ua-radio-dropdown__cover-img[src]:not([src=""]) + .ua-radio-dropdown__cover-placeholder {
    display: none;
}

.ua-radio-dropdown__cover-placeholder {
    color: rgba(255,255,255,0.2);
    width: 24px;
    height: 24px;
}

.ua-radio-dropdown__cover-placeholder svg {
    width: 100%;
    height: 100%;
}

.ua-radio-dropdown__info {
    flex: 1;
    min-width: 0;
}

.ua-radio-dropdown__title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.ua-radio-dropdown__artist {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* ---------- Controls ---------- */

.ua-radio-dropdown__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ua-radio-dropdown__play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #fabe0c;
    color: #2f4449;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.ua-radio-dropdown__play:hover {
    transform: scale(1.08);
    background: #e5ab00;
}

.ua-radio-dropdown__play:active {
    transform: scale(0.95);
}

.ua-radio-dropdown__play svg {
    width: 16px;
    height: 16px;
}

.ua-radio-dropdown__icon-pause {
    display: none;
}

.ua-radio-dropdown.is-playing .ua-radio-dropdown__icon-play {
    display: none;
}

.ua-radio-dropdown.is-playing .ua-radio-dropdown__icon-pause {
    display: block;
}

/* ---------- Volume ---------- */

.ua-radio-dropdown__volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.ua-radio-dropdown__mute {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.ua-radio-dropdown__mute:hover {
    color: #fff;
}

.ua-radio-dropdown__mute svg {
    width: 16px;
    height: 16px;
}

.ua-radio-dropdown__icon-muted {
    display: none;
}

.ua-radio-dropdown.is-muted .ua-radio-dropdown__icon-vol {
    display: none;
}

.ua-radio-dropdown.is-muted .ua-radio-dropdown__icon-muted {
    display: block;
}

.ua-radio-dropdown__volume {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.ua-radio-dropdown__volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fabe0c;
    border: none;
    cursor: pointer;
}

.ua-radio-dropdown__volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fabe0c;
    border: none;
    cursor: pointer;
}

.ua-radio-dropdown__volume::-moz-range-track {
    background: rgba(255,255,255,0.15);
    height: 4px;
    border-radius: 2px;
    border: none;
}

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

@media (max-width: 600px) {
    .ua-radio-dropdown {
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
    }

    .ua-radio-dropdown__inner {
        border-radius: 0 0 8px 8px;
    }
}
