/**
 * LOF Audio Player Styles
 * Mobile-first, sticky bottom design
 */

/* Player Root */
.lof-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lof-audio-player[data-position="inline"] {
    position: relative;
    margin: 20px 0;
}

/* Container */
.lof-audio-player__container {
    background: #1a1a1a;
    color: #ffffff;
    border-top: 2px solid #ff6b6b;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Main Bar */
.lof-audio-player__bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.lof-audio-player__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.lof-audio-player__info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.lof-audio-player__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lof-audio-player__artist {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toggle Button */
.lof-audio-player__toggle {
    background: #ff6b6b;
    border: none;
    border-radius: 24px; /* Changed from 50% to pill shape */
    min-width: 80px; /* Wide enough for text */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Smaller text */
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0 20px;
}

.lof-audio-player__toggle:hover {
    background: #ff8585;
    transform: scale(1.05);
}

.lof-audio-player__toggle:active {
    transform: scale(0.95);
}

.lof-audio-player__toggle .pause-icon {
    display: none;
}

.lof-audio-player__toggle[data-action="pause"] .play-icon {
    display: none;
}

.lof-audio-player__toggle[data-action="pause"] .pause-icon {
    display: inline;
}

/* Status Bar */
.lof-audio-player__status {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    color: #aaa;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lof-audio-player__sync-indicator {
    font-size: 14px;
}

.lof-audio-player__sync-text {
    flex: 1;
}

/* Playing State */
.lof-audio-player__container.playing {
    border-top-color: #4ade80;
}

.lof-audio-player__container.playing .lof-audio-player__toggle {
    background: #4ade80;
}

.lof-audio-player__container.playing .lof-audio-player__toggle:hover {
    background: #6ee7a0;
}

/* Loading State */
.lof-audio-player__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 12px;
    background: #1a1a1a;
    color: #aaa;
}

.lof-audio-player__loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: lof-spin 0.8s linear infinite;
}

@keyframes lof-spin {
    to { transform: rotate(360deg); }
}

/* Theme: Light */
.lof-audio-player[data-theme="light"] .lof-audio-player__container {
    background: #ffffff;
    color: #1a1a1a;
    border-top-color: #ff6b6b;
}

.lof-audio-player[data-theme="light"] .lof-audio-player__status {
    background: rgba(0, 0, 0, 0.05);
    border-top-color: rgba(0, 0, 0, 0.1);
    color: #666;
}

.lof-audio-player[data-theme="light"] .lof-audio-player__artist {
    color: #666;
}

/* Responsive */
@media (min-width: 768px) {
    .lof-audio-player {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 8px 8px 0 0;
    }
    
    .lof-audio-player__container {
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        border-right: 2px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px 8px 0 0;
    }
}

/* Accessibility */
.lof-audio-player__toggle:focus {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .lof-audio-player__container,
    .lof-audio-player__toggle,
    .lof-audio-player__loading-spinner {
        animation: none;
        transition: none;
    }
}

/* Print: Hide audio player */
@media print {
    .lof-audio-player {
        display: none !important;
    }
}

.lof-audio-player__toggle .play-icon {
    margin-left: 2px; /* Optical centering for play triangle */
}
