/*
 * Player Styles for Enhanced Audio Player for WP
 * This CSS uses CSS variables for dynamic theming.
 */

/* Default CSS variables - these will be overridden by JS based on user settings */
:root {
    --eap-accent-color: #4CAF50; /* Default green */
    --eap-light-shade: #E8F5E9; /* Light green for container background */
    --eap-dark-shade: #388E3C; /* Darker green for meta background */
}

.eap-player-container {
    background: var(--eap-light-shade); /* Use light shade of accent color */
    border-radius: 8px;
    max-width: 800px;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden; /* For rounded corners on meta section */
}
.eap-player-header {
    display: flex;
    align-items: flex-start;
	padding: 30px;
}
.eap-player-artwork-header {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: var(--eap-accent-color); /* Fallback background color */
    display: flex;
    align-items: center;
    justify-content: center;
}
.eap-player-artwork-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.eap-player-artwork-header svg {
    width: 60%;
    height: 60%;
    fill: white;
}
.eap-player-info {
    flex-grow: 1;
	word-break: break-all;
}
.eap-player-title {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 0;
    padding-bottom: 0;
    margin-top: 0;
    color: #333;
}
.eap-player-subtitle {
    margin: 10px 0 0;
    text-transform: capitalize;
    font-size: 14px;
    color: #555;
}
.eap-player-caption {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
    padding: 30px;
	display: none;
}
.eap-player-meta {
    background: var(--eap-dark-shade); /* Use darker shade of accent color */ 
    padding: 30px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    position: relative;

}
.eap-player-controls-wrapper {
	display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.eap-player-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: none !important;
}
.eap-player-controls button {
	display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: white;
    font-size: 14px; 
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    outline: none; /* Removed focus outline */
}
.eap-player-controls button:hover {
    background-color: rgba(255,255,255,0.1); /* Lighter hover for dark background */
}
.eap-player-controls button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.eap-player-progress-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(255,255,255,0.3); /* Lighter background for progress bar */
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin: 0 10px;
}
.eap-player-progress-filled {
    height: 100%;
    width: 0%;
    background: var(--eap-accent-color); /* Use accent color for filled progress */
    border-radius: 4px;
    position: relative;
}
.eap-player-progress-knob {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--eap-accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
    cursor: grab;
}
.eap-player-time {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    margin: 15px 12px 0;
	flex-grow: 1;
}
.eap-player-volume-container {
    position: relative;
    display: flex;
    align-items: center;
}
.eap-player-volume-slider {
    width: 0px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.3);
    outline: none;
    border-radius: 4px;
    cursor: pointer;
    transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    margin-left: 0;
}
.eap-player-volume-container:hover .eap-player-volume-slider,
.eap-player-volume-container.eap-volume-active .eap-player-volume-slider {
    width: 80px;
    opacity: 1;
    margin-left: 10px;
}
.eap-player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--eap-accent-color);
    border-radius: 50%;
    cursor: grab;
}
.eap-player-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--eap-accent-color);
    border-radius: 50%;
    cursor: grab;
}

/* Responsive CSS */
@media (max-width: 768px) {
    .eap-player-header {
        flex-direction: column;
        align-items: center;
        margin-bottom: 15px;
    }
    .eap-player-artwork-header {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .eap-player-info {
        text-align: center;
    }
    .eap-player-progress-bar {
        width: 100%;
        margin: 10px 0;
    }
    .eap-player-time {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }
}
@media (max-width: 480px) {
    .eap-player-title {
        font-size: 22px;
    }

}