/**
 * Advanced Audio Player - Player Styles
 *
 * @since      1.0.0
 */

/* Main player container */
.aap-player {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Player header with cover image */
.aap-player-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #fff;
}

.aap-cover-container {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    flex-shrink: 0;
}

.aap-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.aap-info {
    flex-grow: 1;
}

.aap-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #333;
}

.aap-artist {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Player controls */
.aap-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #f5f5f5;
}

.aap-main-controls {
    display: flex;
    align-items: center;
}

.aap-play-btn,
.aap-pause-btn,
.aap-forward-btn,
.aap-rewind-btn,
.aap-volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: color 0.2s;
}

.aap-play-btn:hover,
.aap-pause-btn:hover,
.aap-forward-btn:hover,
.aap-rewind-btn:hover,
.aap-volume-btn:hover {
    color: #007bff;
}

.aap-pause-btn {
    display: none;
}

.aap-volume-container {
    display: flex;
    align-items: center;
}

.aap-volume-slider {
    width: 80px;
    margin-left: 10px;
    -webkit-appearance: none;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.aap-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.aap-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Progress bar */
.aap-progress-container {
    padding: 0 20px 15px;
    background-color: #f5f5f5;
}

.aap-progress-bar {
    width: 100%;
    height: 12px;
    background-color: #ddd;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.aap-progress-bar:hover {
    height: 14px;
    margin-top: -1px;
    margin-bottom: 7px;
}

.aap-progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 6px;
    width: 0;
    transition: width 0.1s linear;
    position: relative;
}

.aap-progress-fill:after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: #007bff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
    cursor: grab;
}

.aap-progress-bar:hover .aap-progress-fill:after {
    opacity: 1;
}

/* When dragging */
.aap-progress-fill:active:after {
    cursor: grabbing;
    width: 18px;
    height: 18px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.aap-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* Series parts */
.aap-series-parts {
    padding: 15px 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.aap-series-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aap-series-list li {
    margin-bottom: 8px;
}

.aap-series-list li:last-child {
    margin-bottom: 0;
}

.aap-series-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 5px 0;
    transition: color 0.2s;
}

.aap-series-list a:hover {
    color: #007bff;
}

.aap-series-list .aap-current-part {
    font-weight: bold;
}

.aap-series-list .aap-current {
    color: #007bff;
}

/* Loading and error states */
.aap-loader,
.aap-error {
    padding: 20px;
    text-align: center;
    display: none;
}

.aap-loader {
    color: #666;
}

.aap-error {
    color: #dc3545;
}

/* Responsive styles */
@media (max-width: 480px) {
    .aap-player-header {
        flex-direction: column;
        text-align: center;
    }
    
    .aap-cover-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .aap-controls {
        flex-direction: column;
    }
    
    .aap-main-controls {
        margin-bottom: 10px;
    }
    
    .aap-volume-container {
        width: 100%;
        justify-content: center;
    }
}

/* Categories grid styles */
.aap-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .aap-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .aap-categories-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Override inline styles */
        gap: 10px;
    }
}

.aap-category-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.aap-category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.aap-category-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #007bff, #00c6ff);
    z-index: 1;
}

.aap-category-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Makes it square */
    object-fit: cover;
    position: relative;
    display: block;
}

.aap-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 480px) {
    .aap-category-image {
        padding-bottom: 75%; /* Slightly shorter on mobile */
    }
    
    .aap-category-info {
        padding: 12px 10px;
    }
    
    .aap-category-title {
        font-size: 16px;
    }
}

.aap-category-info {
    padding: 20px 15px;
    text-align: center;
    background-color: #fff;
}

.aap-category-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s;
}

.aap-category-item:hover .aap-category-title {
    color: #007bff;
}

.aap-category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}