/**
 * JW Player Playlist Integration Styles
 */

/* Container */
.jwppi-container {
    margin: 0 0 50px;
    max-width: 100%;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.jwppi-container:last-child {
    border-bottom: none;
}

/* Playlist Title and Description */
.jwppi-playlist-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    color: #222;
}

.jwppi-playlist-description {
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.5;
    color: #666;
}

/* Main Player Container */
.jwppi-main-player-container {
    margin-bottom: 40px;
    padding: 0 0 20px;
    border-bottom: 1px solid #eee;
}

.jwppi-player-title {
    margin: 15px 0 5px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.jwppi-player-description {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #666;
}

.jwppi-section-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Featured Player */
.jwppi-featured-player {
    margin-bottom: 30px;
}

/* Grid Layout */
.jwppi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    margin-bottom: 20px;
}

@media screen and (max-width: 1200px) {
    .jwppi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .jwppi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .jwppi-grid {
        grid-template-columns: 1fr;
    }
}

.jwppi-grid-item {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
}

.jwppi-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jwppi-grid-item.jwppi-active {
    border: 2px solid #1e73be;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.jwppi-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
}

.jwppi-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jwppi-thumbnail:hover img {
    transform: scale(1.05);
}

.jwppi-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 2;
}

.jwppi-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jwppi-play-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #fff;
}

.jwppi-thumbnail:hover .jwppi-play-button {
    opacity: 1;
}

.jwppi-title {
    margin: 10px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    color: #333;
}

.jwppi-description {
    margin: 0 10px 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* List Layout */
.jwppi-list {
    margin-bottom: 20px;
}

.jwppi-list-item {
    display: flex;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 5px;
    background-color: #fff;
    overflow: hidden;
    cursor: pointer;
}

.jwppi-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jwppi-list-item.jwppi-active {
    border: 2px solid #1e73be;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.jwppi-list-thumbnail {
    flex: 0 0 200px;
    position: relative;
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .jwppi-list-item {
        flex-direction: column;
    }
    
    .jwppi-list-thumbnail {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 16/9;
    }
}

.jwppi-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jwppi-list-thumbnail:hover img {
    transform: scale(1.05);
}

.jwppi-list-content {
    flex: 1;
    padding: 15px;
}

.jwppi-list-item .jwppi-title {
    margin: 0 0 10px;
}

.jwppi-list-item .jwppi-description {
    margin: 0;
}

/* Pagination */
.jwppi-pagination {
    text-align: center;
    margin-top: 20px;
}

.jwppi-page-link {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.jwppi-page-link:hover,
.jwppi-page-link.jwppi-current {
    background-color: #1e73be;
    color: #fff;
    border-color: #1e73be;
}

.jwppi-prev,
.jwppi-next {
    font-weight: bold;
}

/* Error message */
.jwppi-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Modal Styles */
.jwppi-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.jwppi-modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
}

.jwppi-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.jwppi-modal-player {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
}

/* Search Form Styles */
.jwppi-search-container {
    margin: 15px 0 30px;
    padding: 20px;
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #1e73be;
}

.jwppi-search-container h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1e73be;
    position: relative;
    display: inline-block;
}

.jwppi-search-container h3:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1e73be;
    opacity: 0.5;
}

.jwppi-search-field {
    width: 100%;
    padding: 14px 15px 14px 45px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
   
    background-repeat: no-repeat;
    background-position: 15px center;
}

.jwppi-search-field:focus {
    outline: none;
    border-color: #1e73be;
    box-shadow: 0 0 8px rgba(30, 115, 190, 0.4);
}

.jwppi-search-field::placeholder {
    color: #999;
    font-style: italic;
}

.jwppi-no-results {
    padding: 15px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
    border-left: 4px solid #dc3545;
}

.jwppi-hidden {
    display: none !important;
}
