@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-player-wrapper,
.entry-content.prose .naromx-player-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}

/* Main Wrapper Styling */
.naromx-player-wrapper {
    margin: 20px 0;
    color: #f3f0e8;
    background: #090a09;
    padding: 24px;
    border: 1px solid rgba(243, 240, 232, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    position: relative;
    font-family: 'Space Mono', monospace;
    min-height: 400px;
    selection-background-color: #ff3b2f;
    selection-color: #000;
}

.naromx-player-wrapper ::selection {
    background: #ff3b2f;
    color: #000;
}

/* Bilingual Arabic Font Fallback */
.naromx-player-wrapper.font-arabic {
    font-family: 'Alexandria', 'Space Mono', sans-serif;
}

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

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

/* Cover Column & Geometric Ticks */
.naromx-cover-column {
    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;
}

/* Album Cover Image */
.naromx-album-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    display: block;
}

/* Controls Box */
.naromx-controls-box {
    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%);
}

/* Metadata Row */
.naromx-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.naromx-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.naromx-status-ping {
    position: relative;
    display: flex;
    height: 8px;
    width: 8px;
}

.naromx-ping-ring {
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background-color: #ff3b2f;
    opacity: 0.75;
    animation: naromx-ping-anim 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.naromx-ping-dot {
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    height: 8px;
    width: 8px;
    background-color: #ff3b2f;
}

.naromx-status-dot-idle {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

.naromx-status-label {
    margin: 0;
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(243, 240, 232, 0.45);
    letter-spacing: 0.15em;
    font-weight: bold;
    line-height: 1;
}

.naromx-track-title-text {
    margin: 6px 0 0 0;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Control Buttons */
.naromx-media-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.naromx-btn-control {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    padding: 0;
}

.naromx-btn-control svg {
    display: block;
}

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

.naromx-btn-control.btn-stop:hover,
.naromx-btn-control.btn-stop:focus {
    border-color: #ff3b2f;
    color: #ff3b2f;
    background: rgba(255, 59, 47, 0.05);
}

/* Progress bar (Segmented LED VU Meter style) */
.naromx-progress-container {
    margin-top: 20px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.naromx-progress-bar {
    height: 100%;
    /* Creates a beautiful segmented LED block appearance */
    background: repeating-linear-gradient(
        90deg,
        #3aa99f,
        #3aa99f 6px,
        transparent 6px,
        transparent 8px
    );
    width: 0%;
    transition: width 0.25s linear;
}

.naromx-time-row {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(243, 240, 232, 0.45);
    font-weight: bold;
}

/* Action Buttons (Restart, Stop, Next) */
.naromx-action-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
}

.naromx-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 6px;
    color: rgba(243, 240, 232, 0.60);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

.naromx-action-btn:hover,
.naromx-action-btn:focus {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.naromx-action-btn.btn-danger-hover:hover,
.naromx-action-btn.btn-danger-hover:focus {
    border-color: #ff3b2f;
    color: #ff3b2f;
    background: rgba(255, 59, 47, 0.05);
}

.naromx-action-btn.btn-primary-hover:hover,
.naromx-action-btn.btn-primary-hover:focus {
    border-color: #3aa99f;
    color: #3aa99f;
    background: rgba(58, 169, 159, 0.05);
}

/* Track List Column Styling */
.naromx-track-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.naromx-header-row {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.naromx-header-row h2 {
    margin: 0;
}

.naromx-edition-tag {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    color: #ff3b2f;
    font-weight: bold;
    letter-spacing: 0.15em;
    line-height: 1;
}

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

@media (min-width: 640px) {
    .naromx-edition-title {
        font-size: 28px;
    }
}

/* Lang Switch */
.naromx-lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.naromx-lang-switch 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-lang-switch button:hover {
    color: #ffffff;
}

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

.naromx-lang-switch .divider {
    color: rgba(255, 255, 255, 0.1);
}

/* Track List Container */
.naromx-track-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Track Item */
.naromx-track-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.6);
    padding: 16px;
    text-align: left;
    color: #f3f0e8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

.naromx-player-wrapper[dir="rtl"] .naromx-track-item {
    text-align: right;
    grid-template-columns: auto 1fr 42px;
}

.naromx-track-item:hover,
.naromx-track-item:focus {
    border-color: #3aa99f;
    background: rgba(0, 0, 0, 0.9);
}

.naromx-track-item.active {
    border-color: #3aa99f;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: inset 0 0 15px rgba(58, 169, 159, 0.1);
}

.track-index {
    font-size: 12px;
    color: rgba(243, 240, 232, 0.45);
}

@media (min-width: 640px) {
    .track-index {
        font-size: 14px;
    }
}

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

.track-name {
    display: block;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 640px) {
    .track-name {
        font-size: 14px;
    }
}

.track-mix {
    margin-top: 4px;
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(243, 240, 232, 0.45);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 640px) {
    .track-mix {
        font-size: 12px;
    }
}

.track-item-play-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(243, 240, 232, 0.65);
    transition: all 0.3s ease;
    background: transparent;
}

.naromx-track-item:hover .track-item-play-icon {
    border-color: #ff3b2f;
    color: #ff3b2f;
    background: rgba(255, 59, 47, 0.05);
}

.track-item-play-icon.active {
    border-color: #ff3b2f;
    color: #ff3b2f;
    background: rgba(255, 59, 47, 0.1);
}

/* Keyframes */
@keyframes naromx-ping-anim {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Real-time Web Audio Visualizer */
.naromx-visualizer-container {
    margin-top: 16px;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(58, 169, 159, 0.2);
    box-shadow: inset 0 0 10px rgba(58, 169, 159, 0.05);
    position: relative;
    overflow: hidden;
}

.naromx-visualizer {
    width: 100%;
    height: 100%;
    display: block;
}
