/* Custom CSS cho Motchilltv Theme */

@media (max-width: 640px) {
    .logo {
        width: 120px !important;
    }
}

html {
    background: #1b1b1b;
}

/* Mega Menu */
.megaMenu {
    opacity: 0;
    pointer-events: none;
    top: 85px;
    transition: all 0.2s linear;
}

.megaMenu:after {
    content: "";
    height: 20px;
    left: 0;
    position: absolute;
    top: -20px;
    width: 100%;
}

.navItem:hover .megaMenu {
    opacity: 1;
    pointer-events: inherit;
    top: 65px;
}

/* Swiper */
.swiper-pagination-bullet {
    background-color: #8a898a !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: #f3f4f6 !important;
    border-radius: 5px !important;
    width: 17px !important;
}

.swiper-pagination {
    text-align: end !important;
    bottom: 0 !important;
}

/* Custom Scrollbar */
.scroll-customer-dropdown::-webkit-scrollbar {
    width: 7px;
}

.scroll-customer-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.scroll-customer-dropdown::-webkit-scrollbar-thumb {
    background: #424040;
    border-radius: 2px;
}

/* Hide scrollbar but keep scrollable */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Pagination */
.pagination-container {
    column-gap: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.paginate-buttons {
    background-color: #414144;
    border: 1px solid #414144;
    border-radius: 5px;
    color: #d8d8d8;
    cursor: pointer;
    font-size: 14px;
    height: 35px;
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.paginate-buttons:hover {
    background-color: #18181b;
}

.active-page {
    border: 1px solid #a3765d;
    color: #fff;
}

.active-page,
.active-page:hover {
    background-color: #a3765d;
}

/* Ẩn admin bar background trên frontend */
body.admin-bar {
    margin-top: 0 !important;
}

/* WP admin bar override */
#wpadminbar {
    background: #1a1a1a !important;
}

/* Tab active highlight */
.tab-active {
    background-color: #A3765D;
}

/* Episode buttons */
.episode-btn {
    transition: all 0.15s ease;
}

.episode-btn:hover {
    background-color: #A3765D;
    color: white;
}

.episode-btn.active {
    background-color: #A3765D;
    color: white;
}

/* Server button */
.server-btn.active {
    background-color: #A3765D;
    color: white;
    border-color: #A3765D;
}

/* Lights off mode - using fixed z-20 overlay like original */
/* The overlay and z-index are handled inline via JS */

/* Star rating */
.star-rating .star {
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #fbbf24;
}

/* Filter dropdown */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown.open .filter-dropdown-content {
    display: block;
}

/* Theo dõi (bookmark) button */
.theodoi {
    background-color: #3f3f46;
    border-radius: 6px;
    padding: 8px 12px;
    transition: background-color 0.2s;
}

.theodoi:hover {
    background-color: #52525b;
}

.theodoi[data-saved="1"] {
    background-color: #A3765D;
}

.theodoi[data-saved="1"]:hover {
    background-color: #c4896a;
}

/* Fix Tailwind CDN potential conflicts */
img {
    max-width: 100%;
    height: auto;
}

/* Breadcrumb separator */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 8px;
    color: #71717a;
}

/* ===== Ads: Catfish / Popup / Banner ===== */
.sspp-area {
    position: relative;
    width: 100%;
    z-index: 8;
    gap: 4px;
}

.sspp-area.is-wide {
    max-width: 100%;
    width: 100%;
    padding: 0 1rem;
}

.sspp-area,
.sspp-area .display-single {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sspp-area .display-single {
    width: 100%;
    height: 100%;
}

.sspp-area.is-wide .display-single.is-demo {
    max-width: 900px;
}

.sspp-area .display-single .is-image {
    display: block;
    width: 100%;
}

.sspp-area .display-single .is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Catfish Top */
.sspp-area.is-wide.is-catfish-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    flex-direction: column;
    z-index: 1050;
}

/* Catfish Bottom */
.sspp-area.is-wide.is-catfish {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    flex-direction: column;
    z-index: 1050;
}

/* Close button */
.sspp-area .close-it {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 5;
    cursor: pointer;
    opacity: .5;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .5rem;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: .4rem;
}

.sspp-area .close-it:hover {
    opacity: 1;
}

/* Popup square */
.sspp-area.is-square-400 {
    max-width: 400px;
    margin: 0 auto;
}

.sspp-area.is-square-400 .display-single {
    max-width: 400px;
}

/* Popup modal */
.sspp-modal {
    z-index: 1060 !important;
}

.sspp-modal .sspp-area.is-square-400 {
    max-width: 100%;
}

.sspp-modal .sspp-area.is-square-400 .display-single {
    max-width: 100%;
}

.sspp-modal .sspp-area .is-image img {
    width: 100%;
    height: auto;
}

/* Body padding when catfish visible */
body.has-catfish-top {
    padding-top: 110px;
}

body.has-catfish-bottom {
    padding-bottom: 110px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sspp-area.is-catfish-top,
    .sspp-area.is-catfish {
        display: block;
        min-height: 40px;
    }

    .sspp-area .is-image img {
        max-height: 60px;
    }

    .sspp-modal .sspp-area .is-image img {
        max-height: none;
        width: 100%;
        height: auto;
    }

    body.has-catfish-top {
        padding-top: 60px;
    }

    body.has-catfish-bottom {
        padding-bottom: 60px;
    }
}
