/* TreeVine News Player Styles */

.treevine-news-player {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.treevine-player-header {
    text-align: center;
    margin-bottom: 20px;
}

.treevine-player-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.treevine-player-metadata {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.metadata-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.metadata-info {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-style: italic;
}

.treevine-player-controls {
    text-align: center;
    margin-bottom: 20px;
}

.treevine-play-btn {
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.treevine-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.treevine-play-btn:active {
    transform: translateY(0);
}

.treevine-play-btn.playing {
    background: #ffd700;
    color: #333;
}

.play-icon,
.pause-icon {
    font-size: 20px;
    line-height: 1;
}

.treevine-player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 14px;
}

.treevine-time-current,
.treevine-time-duration {
    min-width: 45px;
    text-align: center;
    font-weight: 500;
}

.treevine-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.treevine-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.treevine-player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.volume-icon {
    font-size: 20px;
}

.treevine-volume-slider {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

.treevine-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.treevine-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.treevine-audio-element {
    display: none;
}

.treevine-player-status {
    text-align: center;
    color: #ffffff;
    font-size: 13px;
    min-height: 20px;
    opacity: 0.9;
}

.treevine-player-status.error {
    color: #ff6b6b;
    font-weight: 600;
}

.treevine-player-status.loading {
    color: #ffd700;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .treevine-news-player {
        padding: 20px;
        margin: 15px;
    }
    
    .treevine-player-title {
        font-size: 20px;
    }
    
    .treevine-play-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .treevine-volume-slider {
        width: 100px;
    }
}

/* Animation for loading state */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.treevine-player-status.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.treevine-player-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.treevine-player-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.treevine-player-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Mini Player Mode (320x100px) */
.treevine-news-player.mini {
    max-width: 320px;
    padding: 12px;
}

.treevine-news-player.mini .treevine-player-title {
    font-size: 16px;
    margin-bottom: 3px;
}

.treevine-news-player.mini .metadata-subtitle,
.treevine-news-player.mini .metadata-title {
    font-size: 11px;
}

.treevine-news-player.mini .metadata-info {
    font-size: 10px;
}

.treevine-news-player.mini .treevine-play-btn {
    padding: 8px 20px;
    font-size: 14px;
}

.treevine-news-player.mini .treevine-player-controls {
    margin-bottom: 8px;
}

.treevine-news-player.mini .treevine-player-footer {
    font-size: 9px;
    margin-top: 6px;
    padding-top: 6px;
}

/* Ultra-Compact Mini Player (when controls are hidden) */
.treevine-news-player.mini:not(:has(.treevine-player-volume)):not(:has(.treevine-player-progress)) {
    max-width: 320px;
    padding: 8px 12px;
}

/* Alternative selector for better browser support */
.treevine-news-player.mini.no-controls {
    max-width: 320px;
    padding: 8px 12px;
}

.treevine-news-player.mini.no-controls .treevine-player-header {
    margin-bottom: 8px;
}

.treevine-news-player.mini.no-controls .treevine-player-title {
    display: none; /* Hide main title in ultra-compact mode */
}

.treevine-news-player.mini.no-controls .metadata-subtitle {
    font-size: 10px;
    margin-bottom: 6px;
}

.treevine-news-player.mini.no-controls .treevine-play-btn {
    padding: 6px 16px;
    font-size: 13px;
}

.treevine-news-player.mini.no-controls .treevine-player-controls {
    margin-bottom: 0;
}

.treevine-news-player.mini.no-controls .treevine-player-footer {
    display: none; /* Hide footer in ultra-compact mode */
}

/* Subtitle styling */
.metadata-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}
