
/*
|--------------------------------------------------------------------------
| ALPHA RADIO SYSTEM
| RADIO INTERFACE
|--------------------------------------------------------------------------
*/

:root {

    color-scheme: dark;

    --radio-background: #080d14;
    --radio-surface: #101a26;
    --radio-surface-light: #162434;
    --radio-border: #24384a;

    --radio-primary: #24b8e8;
    --radio-primary-light: #65d8ff;

    --radio-green: #25d995;
    --radio-yellow: #f5c451;
    --radio-red: #f05265;

    --radio-text: #e5edf5;
    --radio-text-secondary: #8295a9;
    --radio-text-muted: #53677b;

    --radio-radius: 14px;

}


/*
|--------------------------------------------------------------------------
| RESET
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--radio-background);
}

body {

    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -15%,
            rgba(36, 184, 232, 0.12),
            transparent 38%
        ),
        var(--radio-background);

    color: var(--radio-text);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;

}

button,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/*
|--------------------------------------------------------------------------
| MAIN CONTAINER
|--------------------------------------------------------------------------
*/

.radio-system {

    width: 100%;
    max-width: 620px;

    min-height: 100vh;

    margin: 0 auto;
    padding: 20px 16px 30px;

    display: flex;
    flex-direction: column;

    gap: 16px;

}


/*
|--------------------------------------------------------------------------
| SYSTEM HEADER
|--------------------------------------------------------------------------
*/

.radio-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 8px 2px 18px;

    border-bottom: 1px solid var(--radio-border);

}

.radio-header-brand {

    display: flex;
    align-items: center;

    gap: 12px;

}

.radio-brand-icon {

    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(36, 184, 232, 0.3);

    border-radius: 12px;

    background: rgba(36, 184, 232, 0.1);

    color: var(--radio-primary-light);

    font-size: 19px;

}

.radio-brand-information {

    display: flex;
    flex-direction: column;

    gap: 4px;

}

.radio-brand-information strong {

    font-size: 15px;
    letter-spacing: 1.4px;

}

.radio-brand-information span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;

}

.radio-system-status {

    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--radio-green);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

}

.radio-system-status-indicator {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--radio-green);

    box-shadow: 0 0 10px rgba(37, 217, 149, 0.6);

    animation: radio-pulse 2s infinite;

}


/*
|--------------------------------------------------------------------------
| COMMON PANEL
|--------------------------------------------------------------------------
*/

.radio-operator-panel,
.radio-channel-panel,
.radio-main-panel,
.radio-audio-panel,
.radio-microphone-panel,
.radio-peers-panel {

    padding: 17px;

    border: 1px solid var(--radio-border);

    border-radius: var(--radio-radius);

    background:
        linear-gradient(
            145deg,
            rgba(22, 36, 52, 0.96),
            rgba(13, 23, 35, 0.98)
        );

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.16);

}

.radio-section-heading {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 17px;

    color: var(--radio-text-secondary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;

}

.radio-section-heading i {

    color: var(--radio-primary);

    font-size: 15px;

}


/*
|--------------------------------------------------------------------------
| OPERATOR INFORMATION
|--------------------------------------------------------------------------
*/

.radio-operator-information {

    display: flex;
    align-items: center;

    gap: 13px;

}

.radio-operator-icon {

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(36, 184, 232, 0.25);

    border-radius: 12px;

    background: rgba(36, 184, 232, 0.09);

    color: var(--radio-primary-light);

    font-size: 19px;

}

.radio-operator-details {

    display: flex;
    flex-direction: column;

    gap: 5px;

    min-width: 0;

}

.radio-operator-details span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.2px;

}

.operator-callsign {

    color: var(--radio-primary-light);

    font-size: 20px;
    font-weight: 800;

    letter-spacing: 1.5px;

}

.radio-operator-connection {

    display: flex;
    align-items: center;

    gap: 6px;

    margin-left: auto;

    color: var(--radio-green);

    font-size: 9px;
    font-weight: 800;

}

.radio-operator-connection-indicator {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--radio-green);

}


/*
|--------------------------------------------------------------------------
| CHANNEL SELECTOR
|--------------------------------------------------------------------------
*/

.radio-channel {

    display: flex;
    flex-direction: column;

    gap: 9px;

}

.radio-channel label {

    color: var(--radio-text-secondary);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;

}

.radio-channel-select-wrapper {

    position: relative;

    display: flex;
    align-items: center;

}

.radio-channel-select-wrapper > i:first-child {

    position: absolute;
    left: 14px;

    color: var(--radio-primary);

    pointer-events: none;

}

.radio-channel-select-wrapper > i:last-child {

    position: absolute;
    right: 14px;

    color: var(--radio-text-secondary);

    font-size: 11px;

    pointer-events: none;

}

#radio-channel-select {

    width: 100%;
    height: 49px;

    padding: 0 42px;

    appearance: none;
    -webkit-appearance: none;

    outline: none;

    border: 1px solid var(--radio-border);

    border-radius: 10px;

    background: #0b1420;

    color: var(--radio-text);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1px;

    cursor: pointer;

}

#radio-channel-select:focus {

    border-color: var(--radio-primary);

    box-shadow:
        0 0 0 3px rgba(36, 184, 232, 0.1);

}

#radio-channel-select option {

    background: #101a26;
    color: var(--radio-text);

}

.radio-channel-selection-status {

    color: var(--radio-green);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1px;

}


/*
|--------------------------------------------------------------------------
| PTT STATUS
|--------------------------------------------------------------------------
*/

.radio-main-panel {
    padding-bottom: 20px;
}

.radio-ptt {

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 20px;

}

.radio-ptt-status {

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 115px;

    padding: 9px 17px;

    border: 1px solid var(--radio-border);

    border-radius: 30px;

    background: #0b1420;

}

.radio-ptt-indicator {

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--radio-text-muted);

}

#radio-ptt-status-text {

    color: var(--radio-text-secondary);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1.5px;

}


/*
|--------------------------------------------------------------------------
| PTT BUTTON
|--------------------------------------------------------------------------
*/

.radio-ptt-button {

    position: relative;

    width: min(100%, 270px);
    aspect-ratio: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 13px;

    border: 8px solid rgba(36, 184, 232, 0.09);

    border-radius: 50%;

    outline: none;

    background:
        radial-gradient(
            circle at 35% 25%,
            #1d4862,
            #102b41 55%,
            #0b1c2b
        );

    color: white;

    box-shadow:
        0 0 0 1px rgba(36, 184, 232, 0.35),
        0 12px 35px rgba(0, 0, 0, 0.45),
        inset 0 2px 10px rgba(255, 255, 255, 0.08),
        inset 0 -8px 18px rgba(0, 0, 0, 0.3);

    cursor: pointer;

    touch-action: none;
    user-select: none;
    -webkit-user-select: none;

    transition:
        transform 0.12s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;

}

.radio-ptt-button i {

    font-size: 38px;

    color: var(--radio-primary-light);

    filter: drop-shadow(
        0 0 12px rgba(36, 184, 232, 0.45)
    );

}

.radio-ptt-button strong {

    font-size: 14px;
    font-weight: 900;

    letter-spacing: 1.5px;

}

.radio-ptt-button span {

    color: #9bb8ca;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.4px;

}

.radio-ptt-button:active {

    transform: scale(0.96);

}

.radio-ptt-button:focus-visible {

    box-shadow:
        0 0 0 4px rgba(36, 184, 232, 0.2),
        0 0 30px rgba(36, 184, 232, 0.25);

}


/*
|--------------------------------------------------------------------------
| PTT INFORMATION
|--------------------------------------------------------------------------
*/

.radio-ptt-information {

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 9px;

}

.radio-ptt-information span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.2px;

}

#radio-ptt-microphone {

    color: var(--radio-text-muted);

}


/*
|--------------------------------------------------------------------------
| TRANSMISSION STATES
|--------------------------------------------------------------------------
*/

.radio-ptt-status.tx,
.radio-ptt-status[data-status="TX"] {

    border-color: rgba(37, 217, 149, 0.35);

    background: rgba(37, 217, 149, 0.08);

}

.radio-ptt-status.tx .radio-ptt-indicator,
.radio-ptt-status[data-status="TX"] .radio-ptt-indicator {

    background: var(--radio-green);

    box-shadow: 0 0 12px var(--radio-green);

}

.radio-ptt-status.tx #radio-ptt-status-text,
.radio-ptt-status[data-status="TX"] #radio-ptt-status-text {

    color: var(--radio-green);

}

.radio-ptt-button.tx,
.radio-ptt-button[data-status="TX"] {

    background:
        radial-gradient(
            circle at 35% 25%,
            #247d63,
            #105b47 55%,
            #073d30
        );

    border-color: rgba(37, 217, 149, 0.2);

    box-shadow:
        0 0 0 1px rgba(37, 217, 149, 0.6),
        0 0 35px rgba(37, 217, 149, 0.18),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);

}

.radio-ptt-button.tx i,
.radio-ptt-button[data-status="TX"] i {

    color: #75ffca;

}

.radio-ptt-status.busy,
.radio-ptt-status[data-status="BUSY"] {

    border-color: rgba(240, 82, 101, 0.35);

    background: rgba(240, 82, 101, 0.08);

}

.radio-ptt-status.busy .radio-ptt-indicator,
.radio-ptt-status[data-status="BUSY"] .radio-ptt-indicator {

    background: var(--radio-red);

    box-shadow: 0 0 12px var(--radio-red);

}

.radio-ptt-status.busy #radio-ptt-status-text,
.radio-ptt-status[data-status="BUSY"] #radio-ptt-status-text {

    color: var(--radio-red);

}

.radio-ptt-status.rx,
.radio-ptt-status[data-status="RX"] {

    border-color: rgba(36, 184, 232, 0.35);

    background: rgba(36, 184, 232, 0.08);

}

.radio-ptt-status.rx .radio-ptt-indicator,
.radio-ptt-status[data-status="RX"] .radio-ptt-indicator {

    background: var(--radio-primary);

    box-shadow: 0 0 12px var(--radio-primary);

}

.radio-ptt-status.rx #radio-ptt-status-text,
.radio-ptt-status[data-status="RX"] #radio-ptt-status-text {

    color: var(--radio-primary-light);

}


/*
|--------------------------------------------------------------------------
| AUDIO MONITOR
|--------------------------------------------------------------------------
*/

.radio-audio-monitor {

    padding: 15px;

    border: 1px solid rgba(36, 184, 232, 0.15);

    border-radius: 11px;

    background: #09131e;

}

.radio-audio-monitor-header,
.radio-audio-monitor-footer {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

}

.radio-audio-monitor-information {

    display: flex;
    flex-direction: column;

    gap: 6px;

}

.radio-audio-monitor-information span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.3px;

}

.radio-audio-monitor-information strong {

    color: var(--radio-text);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;

}

.radio-audio-monitor-indicator {

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--radio-border);

    border-radius: 50%;

}

.radio-audio-monitor-indicator span {

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--radio-text-muted);

}


/*
|--------------------------------------------------------------------------
| AUDIO LEVEL BARS
|--------------------------------------------------------------------------
*/

.radio-audio-level {

    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    margin: 19px 0;

    overflow: hidden;

}

.radio-audio-bar {

    flex: 1;

    max-width: 10px;
    height: 4px;

    border-radius: 5px;

    background: #1e3d50;

    opacity: 0.65;

    transition:
        height 70ms linear,
        background 100ms linear,
        opacity 100ms linear;

}

/* Decorative standby heights */

.radio-audio-bar:nth-child(3n) {
    height: 9px;
}

.radio-audio-bar:nth-child(4n) {
    height: 15px;
}

.radio-audio-bar:nth-child(5n) {
    height: 22px;
}

/* Active audio bars */

.radio-audio-bar.active,
.radio-audio-bar.is-active {

    background: var(--radio-primary-light);

    opacity: 1;

    box-shadow:
        0 0 9px rgba(36, 184, 232, 0.4);

}

.radio-audio-monitor-footer {

    padding-top: 11px;

    border-top: 1px solid rgba(36, 184, 232, 0.1);

}

.radio-audio-monitor-footer span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.7px;

}

#radio-audio-volume {

    color: var(--radio-primary-light);

}


/*
|--------------------------------------------------------------------------
| AUDIO CONNECTION STATES
|--------------------------------------------------------------------------
*/

.radio-audio-monitor.connected
.radio-audio-monitor-indicator span {

    background: var(--radio-green);

    box-shadow: 0 0 10px var(--radio-green);

}

.radio-audio-monitor.playing
.radio-audio-bar.active,
.radio-audio-monitor.playing
.radio-audio-bar.is-active {

    background: var(--radio-green);

    box-shadow: 0 0 10px rgba(37, 217, 149, 0.45);

}

.radio-audio-monitor.blocked
.radio-audio-monitor-indicator span {

    background: var(--radio-yellow);

    box-shadow: 0 0 10px var(--radio-yellow);

}


/*
|--------------------------------------------------------------------------
| MICROPHONE MONITOR
|--------------------------------------------------------------------------
*/

.radio-microphone-information {

    display: flex;
    align-items: center;

    gap: 13px;

}

.radio-microphone-icon {

    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid var(--radio-border);

    border-radius: 11px;

    background: #0b1420;

    color: var(--radio-text-secondary);

    font-size: 17px;

}

.radio-microphone-details {

    display: flex;
    flex-direction: column;

    gap: 6px;

    min-width: 0;

}

.radio-microphone-details strong {

    color: var(--radio-text);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.7px;

}

.radio-microphone-details span {

    color: var(--radio-text-secondary);

    font-size: 10px;

    line-height: 1.5;

}


/*
|--------------------------------------------------------------------------
| CONNECTED OPERATORS
|--------------------------------------------------------------------------
*/

.radio-peers-information {

    display: flex;
    flex-direction: column;

    gap: 14px;

}

.radio-peers-count {

    display: flex;
    align-items: baseline;

    gap: 9px;

}

.radio-peers-count strong {

    color: var(--radio-primary-light);

    font-size: 25px;
    font-weight: 900;

}

.radio-peers-count span {

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

}

.radio-peers-list {

    display: flex;
    flex-direction: column;

    gap: 8px;

}

.radio-peers-empty {

    min-height: 65px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px dashed var(--radio-border);

    border-radius: 10px;

    color: var(--radio-text-muted);

}

.radio-peers-empty i {

    font-size: 17px;

}

.radio-peers-empty span {

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

}


/*
|--------------------------------------------------------------------------
| FOOTER
|--------------------------------------------------------------------------
*/

.radio-footer {

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 3px;

    gap: 10px;

}

.radio-footer-brand {

    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--radio-text-secondary);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

}

.radio-footer-brand i {
    color: var(--radio-primary);
}

.radio-footer-version {

    color: var(--radio-text-muted);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.8px;

}


/*
|--------------------------------------------------------------------------
| ANIMATIONS
|--------------------------------------------------------------------------
*/

@keyframes radio-pulse {

    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 217, 149, 0.5);
    }

    70% {
        opacity: 0.75;
        box-shadow: 0 0 0 6px rgba(37, 217, 149, 0);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 217, 149, 0);
    }

}


/*
|--------------------------------------------------------------------------
| MOBILE ADJUSTMENTS
|--------------------------------------------------------------------------
*/

@media (max-width: 380px) {

    .radio-system {
        padding: 15px 11px 25px;
        gap: 12px;
    }

    .radio-operator-panel,
    .radio-channel-panel,
    .radio-main-panel,
    .radio-audio-panel,
    .radio-microphone-panel,
    .radio-peers-panel {
        padding: 14px;
    }

    .radio-ptt-button {
        width: min(100%, 245px);
    }

    .radio-brand-information strong {
        font-size: 13px;
    }

    .radio-system-status {
        font-size: 8px;
    }

}


/*
|--------------------------------------------------------------------------
| ACCESSIBILITY
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;

    }

}

/*
|--------------------------------------------------------------------------
| CONNECTED OPERATOR ITEMS
|--------------------------------------------------------------------------
*/

.radio-peer-item {

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 11px;

    border: 1px solid var(--radio-border);
    border-radius: 10px;

    background: #0b1420;

}

.radio-peer-icon {

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: rgba(36, 184, 232, 0.1);

    color: var(--radio-primary);

}

.radio-peer-information {

    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;

}

.radio-peer-information strong {

    color: var(--radio-text);

    font-size: 12px;
    letter-spacing: 0.7px;

}

.radio-peer-information span {

    color: var(--radio-text-secondary);

    font-size: 9px;

}

.radio-peer-status {

    margin-left: auto;

    color: var(--radio-green);

    font-size: 9px;
    font-weight: 800;

}
/*
|--------------------------------------------------------------------------
| ALPHA RADIO SYSTEM
| PTT STATUS COLORS
|--------------------------------------------------------------------------
*/

/* IDLE */

.radio-ptt-status.is-idle {
    color: #999999;
    text-shadow: none;
}

.radio-ptt-status.is-idle .radio-ptt-indicator {
    background: #888888;
    box-shadow: none;
}

/* RX */

.radio-ptt-status.is-receiving {
    color: lime;
    text-shadow: 0 0 12px lime;
}

.radio-ptt-status.is-receiving .radio-ptt-indicator {
    background: lime;
    box-shadow: 0 0 12px lime;
}

/* TX */

.radio-ptt-status.is-transmitting {
    color: orange;
    text-shadow: 0 0 12px orange;
}

.radio-ptt-status.is-transmitting .radio-ptt-indicator {
    background: orange;
    box-shadow: 0 0 12px orange;
}

/* BUSY */

.radio-ptt-status.is-busy {
    color: #ff5252;
    text-shadow: 0 0 12px #ff5252;
}

.radio-ptt-status.is-busy .radio-ptt-indicator {
    background: #ff5252;
    box-shadow: 0 0 12px #ff5252;
}