/**
 * WG TMDB Import - Frontend CSS
 *
 * @package WG_TMDB
 * @version 4.0.0
 */

/* Trailer Container */
.wg-tmdb-trailer-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wg-tmdb-trailer-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Similar Movies Widget */
.wg-tmdb-similar-movies {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wg-tmdb-similar-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1d2327;
}

.wg-tmdb-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wg-tmdb-similar-item {
    transition: transform 0.3s ease;
}

.wg-tmdb-similar-item:hover {
    transform: translateY(-5px);
}

.wg-tmdb-similar-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wg-tmdb-similar-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s ease;
}

.wg-tmdb-similar-item:hover img {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.wg-tmdb-similar-info {
    margin-top: 10px;
}

.wg-tmdb-similar-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.wg-tmdb-similar-rating {
    margin-top: 5px;
    font-size: 12px;
    color: #646970;
}

.wg-tmdb-no-similar {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    color: #646970;
    font-style: italic;
}

/* Cast Display */
.wg-tmdb-cast {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-left: 4px solid #01b4e4;
    border-radius: 4px;
}

.wg-tmdb-director {
    margin-bottom: 20px;
}

.wg-tmdb-director h4,
.wg-tmdb-cast-list h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: #646970;
    letter-spacing: 0.5px;
}

.wg-tmdb-director p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.wg-tmdb-cast-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wg-tmdb-cast-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.wg-tmdb-cast-list li:last-child {
    border-bottom: none;
}

/* Rating Display */
.wg-tmdb-rating-badge {
    display: inline-flex;
    align-items: center;
    background: #01b4e4;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(1,180,228,0.3);
}

.wg-tmdb-rating-default {
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #01b4e4;
    border-radius: 4px;
    margin: 20px 0;
}

/* Box Office */
.wg-tmdb-box-office {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.wg-tmdb-box-office h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #1d2327;
}

/* TMDB Attribution */
.tmdb-attribution {
    margin-top: 10px;
    font-size: 11px;
    color: #646970;
    font-style: italic;
}

/* Responsive */
@media (max-width: 992px) {
    .wg-tmdb-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .wg-tmdb-similar-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wg-tmdb-similar-movies {
        padding: 20px;
    }

    .wg-tmdb-similar-title {
        font-size: 20px;
    }

    .wg-tmdb-trailer-wrapper {
        border-radius: 4px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wg-tmdb-similar-movies {
        background: #1e1e1e;
    }

    .wg-tmdb-similar-title {
        color: #f0f0f0;
    }

    .wg-tmdb-similar-info h4 {
        color: #f0f0f0;
    }

    .wg-tmdb-similar-rating {
        color: #a7aaad;
    }

    .wg-tmdb-no-similar {
        background: #2c2c2c;
        color: #a7aaad;
    }

    .wg-tmdb-cast {
        background: #1e1e1e;
    }

    .wg-tmdb-cast-list li {
        border-bottom-color: #3c434a;
    }

    .wg-tmdb-rating-default,
    .wg-tmdb-box-office {
        background: #1e1e1e;
    }
}
