/**
 * OnAir-Box – Stil wie udofm.de/sendung (mode=onairbox)
 * @author m-hosting.eu
 */

/* Basis: transparenter Hintergrund für iFrame-Einbindung */
html {
    margin: 0;
    padding: 0;
    height: auto;
    background: transparent !important;
}

body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 0;
    background: transparent !important;
}

body#onair_body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #fff;
    text-align: center;
    background: transparent !important;
    overflow: hidden;
    text-shadow: 5px 5px 5px #000;
    transform: scale(0.95);
    transition: transform 0.5s ease, opacity 0.5s ease;
    display: block;
    width: 280px;
    line-height: 1.45;
}

body#onair_body:hover {
    transform: scale(1);
}

.mhosting-radio-widget {
    display: block;
    max-width: 280px;
    margin: 0 auto;
    padding: 4px 8px 8px;
}

/* Avatar / Bild */
.onair-bild-wrap,
div#onair_bild {
    position: relative;
    display: inline-block;
    margin: 0 auto 8px;
    cursor: pointer;
}

img#onair_bildIMG,
.onair-bild-wrap img {
    width: 130px;
    height: 150px;
    object-fit: cover;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 0 10px rgb(238, 0, 119), 2px 2px 5px #000;
    display: block;
    background: #222;
}

.onair-bild-wrap.is-playing img#onair_bildIMG {
    box-shadow: 0 0 16px rgb(238, 0, 119), 0 0 8px rgb(255, 100, 180), 2px 2px 5px #000;
}

.onair-playhint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #fff;
    text-shadow: 0 0 8px #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.onair-bild-wrap:hover .onair-playhint,
.onair-bild-wrap.is-paused .onair-playhint {
    opacity: 0.85;
}

.onair-bild-wrap.is-playing .onair-playhint {
    opacity: 0;
}

/* Textzeilen wie udofm */
div#onair_currentsong,
.onair-currentsong {
    line-height: 1.45;
    margin-bottom: 4px;
    font-size: 16px;
    color: #fff;
}

.onair-currentsong strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.onair-track-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

img.onair-cover {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

img.onair-cover.d-none { display: none; }

/* Laufschrift Titel */
.onair-track-marquee {
    overflow: hidden;
    width: 100%;
    max-width: 264px;
    margin: 0 auto;
    line-height: 1.35;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.onair-track-scroll {
    display: inline-block;
    white-space: nowrap;
    min-width: 100%;
    text-align: center;
}

.onair-track-scroll.is-scrolling {
    text-align: left;
}

.onair-track-scroll.is-scrolling .mhosting-track {
    display: inline-block;
    padding-left: 100%;
    animation: onair-marquee var(--marquee-duration, 12s) linear infinite;
}

@keyframes onair-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.mhosting-track {
    font-weight: normal;
}

div#onair_anzeigename,
.mhosting-onairbox__row {
    line-height: 1.45;
    margin-bottom: 4px;
    font-size: 16px;
    color: #fff;
    word-wrap: break-word;
}

div#onair_anzeigename strong {
    font-weight: 700;
}

.mhosting-onairbox__row {
    word-wrap: break-word;
}

.mhosting-track-wrap {
    margin-bottom: 0;
}

/* Versteckter HTML5-Audio-Stream */
#mhostingAudio,
.mhosting-onairbox__audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Player-Icons wie udofm */
.onair-player-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px auto 2px;
    max-width: 264px;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.onair-player-label {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.onair-player-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.onair-player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    border-radius: 50%;
    line-height: 0;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.onair-player-btn:hover {
    transform: scale(1.08);
    box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.7);
}

.onair-player-btn svg {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.onair-player-html5 svg {
    border-radius: 4px;
}

.onair-player-html5.is-playing svg circle {
    fill: #43a047;
}

.mhosting-onairbox__hint {
    font-size: 13px;
    color: #ffb347;
    margin-top: 8px;
    text-shadow: 1px 1px 3px #000;
}

/* Legacy-Klassen (JS-Einbindung) */
.mhosting-onairbox {
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    color: #fff;
    text-shadow: 5px 5px 5px #000;
    background: transparent;
    max-width: 280px;
    margin: 0 auto;
}

.mhosting-onairbox__title {
    display: none;
}

.mhosting-onairbox__footer,
.mhosting-playbtn,
.mhosting-onairbox__player-wrap audio + .mhosting-playbtn {
    display: none !important;
}

.onair-donate {
    margin-top: 8px;
}

.onair-donate a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgb(238, 0, 119);
    border-radius: 4px;
    background: rgba(238, 0, 119, 0.25);
}

.onair-donate a:hover {
    background: rgba(238, 0, 119, 0.45);
}

/* Lautstärke */
.onair-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px auto 4px;
    max-width: 220px;
    padding: 0 4px;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.onair-volume-label {
    font-size: 16px;
    line-height: 1;
    cursor: default;
    user-select: none;
    flex-shrink: 0;
}

.onair-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    cursor: pointer;
    pointer-events: auto;
    touch-action: none;
}

.onair-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgb(238, 0, 119);
    box-shadow: 0 0 6px rgb(238, 0, 119);
    border: 1px solid #fff;
    cursor: pointer;
}

.onair-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgb(238, 0, 119);
    box-shadow: 0 0 6px rgb(238, 0, 119);
    border: 1px solid #fff;
    cursor: pointer;
}

.onair-volume-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
}

.onair-stream-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px auto 6px;
    max-width: 250px;
}

.onair-stream-switch label {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.onair-stream-switch select {
    flex: 1;
    min-width: 0;
    max-width: 180px;
    height: 28px;
    border: 0;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 13px;
    color: #111;
    background: #fff;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.45);
}

.onair-transport {
    margin: 8px auto 4px;
}

.stream-transport-audio,
.mhosting-onairbox__audio {
    display: none;
}

.stream-transport-btns {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stream-ctl {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, filter 0.12s ease;
}

.stream-ctl svg {
    display: block;
    pointer-events: none;
}

.stream-ctl:hover:not(:disabled) {
    transform: scale(1.08);
    filter: brightness(1.08);
}

.stream-ctl:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stream-ctl.is-active {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.stream-ctl-play { background: #22c55e; }
.stream-ctl-pause { background: #f59e0b; }
.stream-ctl-stop { background: #ef4444; }

.stream-vol {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 2px;
}

.stream-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 72px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.28);
    outline: none;
    cursor: pointer;
}

.stream-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgb(238, 0, 119);
    border: 1px solid #fff;
}

.stream-vol-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

