/* 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 - TRULY SLIM */
.treevine-news-player.mini.no-controls {
    max-width: 100% !important; /* Adopt parent container width */
    width: 100% !important;
    padding: 10px 14px !important; /* Reduced from 12px 16px for more compact look */
    border-radius: 0 !important; /* No rounded edges */
    box-shadow: none !important; /* No shadow */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; /* Keep gradient */
    
    /* Flex container compatibility (Elementor) */
    display: flex !important; /* Use flex to layout content */
    flex-direction: column !important; /* Stack vertically */
    justify-content: flex-start !important; /* Align content to TOP (not center!) */
    align-items: center !important; /* Center content horizontally */
    flex-shrink: 0 !important; /* Don't shrink in flex container */
    flex-grow: 1 !important; /* Grow to fill available space */
    align-self: flex-start !important; /* Force top alignment in flex container */
    min-height: 100% !important; /* Fill parent height */
    height: 100% !important; /* Full parent height */
}

/* Override Elementor's container centering */
.elementor-widget-wrap .treevine-news-player.mini.no-controls,
.elementor-shortcode .treevine-news-player.mini.no-controls,
.elementor-column .treevine-news-player.mini.no-controls {
    justify-content: flex-start !important; /* Force top alignment */
    align-self: flex-start !important; /* Align to top of column */
}

/* Force the Elementor column itself to align top */
.elementor-column:has(.treevine-news-player.mini.no-controls) {
    align-self: flex-start !important;
}

/* Mini player header (TV-SNS Date) */
.treevine-mini-header {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 6px !important; /* Reduced from 8px */
}

.treevine-mini-title {
    color: rgba(255, 255, 255, 1) !important;
    font-size: 13px !important; /* Match GET STARTED - was incorrectly set to 18px! */
    font-weight: 700 !important; /* Bold like GET STARTED */
    margin: 0 !important;
    padding: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important; /* Tighter line height */
}

/* More specific selector to override any competing styles */
.treevine-news-player.mini.no-controls .treevine-mini-header .treevine-mini-title {
    font-size: 13px !important; /* Force the size with !important */
    font-weight: 700 !important;
}

.treevine-compact-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important; /* Reduced from 10px */
    text-align: center !important;
    line-height: 1.3 !important; /* Compact line height */
}

.treevine-news-player.mini.no-controls .treevine-player-controls {
    margin-bottom: 0 !important;
    text-align: center !important;
    padding: 0 !important; /* No extra padding */
}

.treevine-news-player.mini.no-controls .treevine-play-btn {
    padding: 6px 18px !important; /* Reduced from 8px 20px */
    font-size: 13px !important; /* Slightly smaller from 14px */
    margin: 0 auto !important;
    display: inline-block !important; /* Better for flex containers */
}

.treevine-news-player.mini.no-controls .btn-text {
    font-size: 13px !important;
}

.treevine-news-player.mini.no-controls .play-icon,
.treevine-news-player.mini.no-controls .pause-icon {
    font-size: 12px !important;
}

/* Ensure player doesn't cause layout issues in flex grids */
.treevine-news-player.mini.no-controls * {
    box-sizing: border-box;
}

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

/* Make sure audio element doesn't affect layout */
.treevine-news-player.mini.no-controls audio {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

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