/* file: /css/storybot-audio-player-style.css */

/* Hidden class utility */
.hidden {
    display: none;
}

/* Audio Player Overlay */
#media-player-overlay {
    display: none; /* Initially hidden */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: #521d59; /* Rich purple background */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Subtle shadow for floating effect */
    padding: 15px 20px; /* Padding around the content */
    box-sizing: border-box;
    z-index: 10000; /* Ensure it stays above other elements */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Ensure overlay shows when not hidden */
#media-player-overlay:not(.hidden) {
    display: flex;
}

#storybot-media-container {
    height: auto;
    width: 100%;
    display: block; /* Ensure container is always visible */
}

/* Audio Element Styling */
#media-player-overlay audio {
    width: 100%; /* Full width */
    height: 40px; /* Compact height */
    border-radius: 8px; /* Rounded corners for player */
    outline: none;
    background-color: #521d59; /* Ensure controls are visible */
    overflow: hidden;
    display: block !important; /* Force audio player to be visible */
}

/* Media Info */
#media-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff; /* White text for better contrast */
}

/* Slideshow Container */
#slideshow-container {
    width: 100%;
    max-width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
}

#storybot-slideshow {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

#storybot-slideshow.hidden {
    display: none;
}

#media-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

#media-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

/* Controls Row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%; /* Spread across the container */
    gap: 10px;
}

/* Control Buttons */
.control-button {
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
}

.control-button:hover {
    transform: scale(1.2); /* Slight zoom effect on hover */
    color: #f8f8f8;
}

/* Thumbs Up/Down Styling */
.rating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.rating-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.rating-button i {
    font-size: 1.2rem;
    color: #ffffff;
}

.control-button:hover,
.rating-button:hover {
    background: none !important; /* Remove any background color */
    transform: scale(1.2); /* Retain zoom effect */
    color: #f8f8f8;
}

/* Ensure all buttons have consistent styles */
.control-button,
.rating-button {
    background: transparent !important; /* No background */
    border: none;
}


/* Restriction Message */
.restriction-message {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 10001;
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #media-player-overlay {
        bottom: 10px;
        width: 95%;
        padding: 10px;
    }

    #slideshow-container {
        max-width: 250px;
        height: 150px;
    }

    .controls-row {
        flex-wrap: wrap;
        gap: 5px;
    }

    .control-button, .rating-button i {
        font-size: 1.2rem;
    }
}
