/* Currently Playing Widget - TTNS Terminal Theme */

:root {
    --background: transparent;
    --text-primary: #00ff00;
    --text-secondary: #ff4444;
    --text-muted: #00cc00;
    --border: #333333;
    --font-mono: 'Courier New', 'SFMono-Regular', Menlo, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: var(--font-mono);
    background: transparent !important;
    color: var(--text-primary);
    overflow: hidden;
}

#serverData {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
    text-align: left;
}

/* Container for the scrolling text */
.now-playing-container {
    display: inline-flex;
    align-items: center;
    width: auto;
    overflow: hidden;
    position: relative;
}

/* Prefix text */
.now-playing-prefix {
    color: var(--text-primary);
    margin-right: 6px;
    white-space: nowrap;
    vertical-align: middle;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

/* Track text */
.now-playing-track {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    white-space: nowrap;
    font-weight: bold;
}

/* Marquee animation for long text */
.now-playing-track.marquee {
    animation: marquee 15s linear;
    padding-left: 100%;
    display: inline-block;
}

/* Marquee that runs once then stops */
.now-playing-track.marquee-once {
    overflow: hidden;
    white-space: nowrap;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Fixed width container - 50 characters typical for radio displays */
.now-playing-container {
    max-width: 50ch; /* 50 characters */
    min-width: 30ch; /* Minimum 30 characters */
}

/* Ellipsis for overflow when not scrolling */
.now-playing-track.ellipsis {
    max-width: calc(50ch - 12ch); /* Account for "Now Playing: " prefix */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #serverData {
        font-size: 14px;
        padding: 6px 8px;
    }
    
    .now-playing-container {
        max-width: 40ch;
        min-width: 25ch;
    }
}

@media (min-width: 1200px) {
    #serverData {
        font-size: 18px;
    }
    
    .now-playing-container {
        max-width: 60ch;
    }
}
