/*
 * RunSLinux Radio branding
 * https://runslinux.com
 */

/* RunSLinux palette */
:root {
    --runslinux-bg: #0d1117;
    --runslinux-panel: #161b22;
    --runslinux-border: #30363d;
    --runslinux-text: #e6edf3;
    --runslinux-muted: #8b949e;
    --runslinux-blue: #58a6ff;
    --runslinux-green: #3fb950;
}

/* Overall typography */
html,
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: var(--runslinux-bg);
    color: var(--runslinux-text);
}

/* Header */
.webrx-top-container {
    background: var(--runslinux-bg) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--runslinux-border);
}

.webrx-top-bar {
    background: var(--runslinux-panel) !important;
}

/* Our RunSLinux brand block */
.runslinux-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 18px;
    min-width: 205px;
    border-right: 1px solid var(--runslinux-border);
}

.runslinux-terminal {
    color: var(--runslinux-blue);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 1.2;
}

.runslinux-name {
    color: var(--runslinux-text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.runslinux-name .runs,
.webrx-rx-title .runs {
    color: #f0f6fc;
}

.runslinux-name .linux,
.webrx-rx-title .linux {
    color: #3fb950;
}

.runslinux-brand {
    text-decoration: none !important;
}

/* Receiver name/location */
.webrx-rx-texts div,
.webrx-rx-texts h1 {
    color: var(--runslinux-text) !important;
}

.webrx-rx-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 12pt !important;
}

.webrx-rx-desc {
    color: var(--runslinux-muted) !important;
}

/* Receiver avatar */
.webrx-rx-avatar {
    background-color: var(--runslinux-panel) !important;
    border: 1px solid var(--runslinux-border);
}

/* Main navigation */
.openwebrx-main-buttons {
    color: var(--runslinux-text) !important;
    text-shadow: none !important;
}

.openwebrx-main-buttons .button {
    transition: background 0.15s ease;
}

.openwebrx-main-buttons .button:hover {
    background-color: rgba(88, 166, 255, 0.15) !important;
}

.openwebrx-main-buttons .button:active {
    background-color: rgba(63, 185, 80, 0.20) !important;
}

/* Expanded station details */
.openwebrx-description-container {
    background: var(--runslinux-panel);
    border-top: 1px solid var(--runslinux-border);
}

.webrx-rx-photo-title {
    color: var(--runslinux-text) !important;
    text-shadow: none !important;
}

.webrx-rx-photo-desc {
    color: var(--runslinux-muted) !important;
    text-shadow: none !important;
}

.webrx-rx-photo-desc a {
    color: var(--runslinux-blue) !important;
}

/* General panels */
.openwebrx-panel {
    border-color: var(--runslinux-border) !important;
}

/* Mobile */
@media (max-width: 767px) {
    .runslinux-brand {
        min-width: auto;
        padding: 0 10px;
    }

    .runslinux-terminal {
        display: none;
    }

    .runslinux-name {
        font-size: 14px;
    }
}

.runslinux-logo {
    width: 180px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.runslinux-brand {
    display: flex;
    align-items: center;
    padding: 0 14px;
    min-width: 200px;
    border-right: 1px solid #30363d;
    text-decoration: none !important;
}

/* RunsLinux branding block */
.runslinux-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    min-width: 160px;
    height: 67px;
    text-decoration: none !important;
    flex: 0 0 auto;
}

.runslinux-logo {
    width: 140px;
    height: 48px;
    object-fit: contain;
    display: block;
}

/* divider between brand and receiver details */
.runslinux-divider {
    width: 1px;
    height: 42px;
    background: #30363d;
    margin: auto 18px auto 4px;
    flex: 0 0 auto;
}

/* receiver info */
.webrx-rx-texts {
    flex: 1;
    width: auto !important;
    min-width: 0;
    margin: auto 0;
    padding-right: 20px;
}

.webrx-rx-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #f0f6fc !important;
}

.webrx-rx-desc {
    font-size: 12px !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    color: #8b949e !important;
}

.webrx-rx-title .runs {
    color: #f0f6fc;
}

.webrx-rx-title .linux {
    color: #3fb950;
}

.openwebrx-main-buttons {
    padding: 5px 12px !important;
    margin-left: auto !important;
}

.openwebrx-main-buttons .button {
    width: 58px !important;
}

/*
 * OpenWebRX updates .webrx-rx-title dynamically.
 * Keep it in the DOM for JS compatibility, but don't display it.
 */
.webrx-rx-title {
    display: none !important;
}

/* Persistent RunsLinux branded receiver title */
.runslinux-rx-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 10px;
    padding: 3px;
    white-space: nowrap;
}

.runslinux-rx-title .runs {
    color: #f0f6fc;
}

.runslinux-rx-title .linux {
    color: #3fb950;
}

/*
 * ============================================================
 * PUBLIC RunsLinux Radio presentation
 * radio.runslinux.com only
 *
 * Local webrx.home.arpa retains the complete OpenWebRX UI.
 * ============================================================
 */

/* Hide Log button publicly */
.runslinux-public
.openwebrx-main-buttons
[data-toggle-panel="openwebrx-panel-log"] {
    display: none !important;
}

/* Hide Settings button publicly */
.runslinux-public
.openwebrx-main-buttons
a[href*="settings"] {
    display: none !important;
}

/*
 * Keep the Log DOM intact because OpenWebRX JavaScript expects it,
 * but never allow the panel itself to display publicly.
 */
.runslinux-public #openwebrx-panel-log {
    display: none !important;
}

/* Do not expose station location / locator / ASL publicly */
.runslinux-public .webrx-rx-desc {
    font-size: 0 !important;
}

.runslinux-public .webrx-rx-desc::after {
    content: "Software Defined Radio";
    font-size: 12px;
    color: #8b949e;
}

/*
 * Public audio behavior:
 * OpenWebRX initializes normally, but its full-screen autoplay
 * overlay is suppressed on the public site.
 *
 * The JavaScript fallback in index.html attempts audio resume
 * on the visitor's first interaction if required by the browser.
 */
.runslinux-public #openwebrx-autoplay-overlay {
    display: none !important;
}
