@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Override Tailwind Typography prose limitations on WordPress */
.prose .naromx-radio-wrapper,
.entry-content.prose .naromx-radio-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}

/* Main Wrapper Layout */
.naromx-radio-wrapper {
    margin: 20px 0;
    color: #f3f0e8;
    background: #070807;
    padding: 24px;
    border: 1px solid rgba(243, 240, 232, 0.10);
    box-shadow: 0 15px 45px rgba(0,0,0,0.85);
    font-family: 'Space Mono', monospace;
    position: relative;
    box-sizing: border-box;
}

.naromx-radio-wrapper.font-arabic {
    font-family: 'Alexandria', 'Space Mono', sans-serif;
}

/* Grid Layout */
.naromx-radio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 1024px) {
    .naromx-radio-grid {
        grid-template-columns: 420px 1fr;
    }
}

/* Player Column & Corner Ticks */
.naromx-radio-player-col {
    position: relative;
}

.naromx-corner-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 10;
}

.tick-tl { top: -4px; left: -4px; border-top: 2px solid #3aa99f; border-left: 2px solid #3aa99f; }
.tick-tr { top: -4px; right: -4px; border-top: 2px solid #3aa99f; border-right: 2px solid #3aa99f; }
.tick-bl { bottom: -4px; left: -4px; border-bottom: 2px solid #ff3b2f; border-left: 2px solid #ff3b2f; }
.tick-br { bottom: -4px; right: -4px; border-bottom: 2px solid #ff3b2f; border-right: 2px solid #ff3b2f; }

/* Cover Art and Waveform Overlay */
.naromx-radio-cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    box-shadow: 0 15px 40px rgba(0,0,0,0.9);
}

.naromx-radio-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Real-time Web Audio Visualizer Overlay */
.naromx-radio-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
}

/* Live/Auto DJ Badges */
.naromx-live-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.naromx-live-badge.live-dj {
    border-color: #ff3b2f;
    color: #ff3b2f;
}

.naromx-live-badge.auto-dj {
    border-color: #3aa99f;
    color: #3aa99f;
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3b2f;
    box-shadow: 0 0 8px #ff3b2f;
    animation: naromx-glow 1.5s infinite;
}

@keyframes naromx-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1.0; }
}

/* Control HUD Box */
.naromx-radio-hud {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(243, 240, 232, 0.15);
    padding: 20px;
    backdrop-filter: blur(10px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.naromx-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.naromx-station-meta {
    flex: 1;
    min-width: 0;
}

.naromx-transmission-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.transmission-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.transmission-light.active {
    background: #ff3b2f;
    box-shadow: 0 0 10px #ff3b2f;
    animation: naromx-glow 1s infinite;
}

.listeners-count {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(243, 240, 232, 0.45);
    letter-spacing: 0.1em;
    font-weight: bold;
}

.naromx-now-playing-title {
    margin: 0;
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.naromx-now-playing-artist {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: rgba(243, 240, 232, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Playback Control */
.naromx-radio-controls {
    flex-shrink: 0;
}

.naromx-radio-play-btn {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    padding: 0;
}

.naromx-radio-play-btn:hover,
.naromx-radio-play-btn:focus {
    border-color: #3aa99f;
    color: #3aa99f;
    background: rgba(58, 169, 159, 0.08);
}

.naromx-radio-play-btn.playing {
    border-color: #ff3b2f;
    color: #ff3b2f;
    background: rgba(255, 59, 47, 0.08);
}

/* HUD Footer, Quality & Lang */
.naromx-hud-footer {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
}

.naromx-quality-switch,
.naromx-radio-lang {
    display: flex;
    align-items: center;
    gap: 6px;
}

.naromx-quality-switch button,
.naromx-radio-lang button {
    border: none;
    background: none;
    color: rgba(243, 240, 232, 0.4);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.naromx-quality-switch button:hover,
.naromx-radio-lang button:hover {
    color: #ffffff;
}

.naromx-quality-switch button.active,
.naromx-radio-lang button.active {
    color: #3aa99f;
}

.naromx-hud-footer .divider {
    color: rgba(255, 255, 255, 0.1);
}

/* Station Details Column */
.naromx-radio-details-col {
    display: flex;
    flex-direction: column;
}

.naromx-radio-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.station-tag {
    margin: 0;
    font-size: 11px;
    color: #ff3b2f;
    font-weight: bold;
    letter-spacing: 0.15em;
}

.station-title {
    margin: 8px 0 0 0;
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .station-title { font-size: 32px; }
}

.station-desc {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: rgba(243, 240, 232, 0.6);
    line-height: 1.5;
}

/* Tabs */
.naromx-radio-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.tab-btn {
    border: none;
    background: none;
    color: rgba(243, 240, 232, 0.45);
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: #3aa99f;
    border-bottom-color: #3aa99f;
}

/* Tab Content & Play History List */
.naromx-tab-content {
    min-height: 200px;
}

.naromx-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.naromx-history-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.naromx-radio-wrapper[dir="rtl"] .naromx-history-item {
    grid-template-columns: auto 1fr 36px;
}

.history-art {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.history-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.history-name {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-artist {
    font-size: 10px;
    color: rgba(243, 240, 232, 0.45);
    margin-top: 2px;
}

.history-time {
    font-size: 10px;
    color: rgba(243, 240, 232, 0.4);
}

.naromx-empty-state {
    font-size: 11px;
    color: rgba(243, 240, 232, 0.4);
    text-align: center;
    padding: 40px 0;
}

/* Requests Panel & Search Box */
.naromx-request-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 12px 16px;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
}

.naromx-radio-wrapper[dir="rtl"] .search-input {
    text-align: right;
}

.search-input:focus {
    border-color: #3aa99f;
    background: rgba(0, 0, 0, 0.2);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255,255,255,0.3);
}

.naromx-radio-wrapper[dir="rtl"] .search-icon {
    right: auto;
    left: 14px;
}

/* Search results */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
}

.search-results-list::-webkit-scrollbar {
    width: 4px;
}

.search-results-list::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: rgba(243, 240, 232, 0.1);
    border-radius: 2px;
}

.naromx-search-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.naromx-radio-wrapper[dir="rtl"] .naromx-search-item {
    grid-template-columns: auto 1fr 32px;
}

.naromx-search-item:hover {
    border-color: rgba(58, 169, 159, 0.3);
    background: rgba(58, 169, 159, 0.03);
}

.search-item-art {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 2px;
}

.search-item-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-item-title {
    font-size: 11px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-artist {
    font-size: 9px;
    color: rgba(243, 240, 232, 0.45);
    margin-top: 2px;
}

.request-submit-btn {
    border: 1px solid #3aa99f;
    background: transparent;
    color: #3aa99f;
    padding: 6px 12px;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.request-submit-btn:hover:not(:disabled) {
    background: #3aa99f;
    color: #000000;
}

.request-submit-btn:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

/* Status alerts */
.request-status-notice {
    padding: 10px 14px;
    font-size: 10px;
    font-weight: bold;
    border-left: 3px solid transparent;
}

.request-status-notice.success {
    background: rgba(58, 169, 159, 0.05);
    border-left-color: #3aa99f;
    color: #3aa99f;
}

.request-status-notice.error {
    background: rgba(255, 59, 47, 0.05);
    border-left-color: #ff3b2f;
    color: #ff3b2f;
}

/* Queue styles */
.naromx-queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.naromx-queue-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.naromx-radio-wrapper[dir="rtl"] .naromx-queue-item {
    grid-template-columns: auto 1fr 36px;
}

.queue-art {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.queue-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.queue-name {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-artist {
    font-size: 10px;
    color: rgba(243, 240, 232, 0.45);
    margin-top: 2px;
}

.queue-time {
    font-size: 10px;
    color: #3aa99f;
    font-weight: bold;
}

.request-badge {
    background: rgba(58, 169, 159, 0.15);
    border: 1px solid #3aa99f;
    color: #3aa99f;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Schedule styles */
.naromx-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.naromx-schedule-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.naromx-radio-wrapper[dir="rtl"] .naromx-schedule-item {
    grid-template-columns: 1fr 140px;
}

.naromx-schedule-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.naromx-schedule-item.active {
    border-color: rgba(58, 169, 159, 0.4);
    background: rgba(58, 169, 159, 0.05);
}

.schedule-time-slot {
    font-size: 10px;
    font-weight: bold;
    color: rgba(243, 240, 232, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.naromx-radio-wrapper[dir="rtl"] .schedule-time-slot {
    flex-direction: row-reverse;
}

.schedule-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.schedule-title {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
}

.schedule-status-badge {
    background: rgba(255, 59, 47, 0.15);
    border: 1px solid #ff3b2f;
    color: #ff3b2f;
    padding: 2px 8px;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: naromx-pulse-bg 2s infinite;
}

@keyframes naromx-pulse-bg {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}
