/**
 * WeGreen Pagination Styles
 */

/* Common pagination styles */
.wegreen-pagination {
    margin-top: 30px;
    text-align: center;
}

/* Next/Prev pagination */
.nextprev-pagination {
    display: flex;
    justify-content: space-between;
    max-width: 200px;
    margin: 0 auto;
}

.nextprev-pagination a,
.nextprev-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nextprev-pagination a:hover {
    background-color: #217346;
    color: white;
}

.nextprev-pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Load More pagination */
.loadmore-pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.wegreen-loadmore-btn {
    background-color: #217346;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wegreen-loadmore-btn:hover {
    background-color: #1a5d37;
}

.wegreen-loadmore-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Auto Load on Scroll pagination */
.scrollload-pagination {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wegreen-loader {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #217346;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

.scrollload-pagination.loading .wegreen-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fix for dynamically loaded movie cards */
.wegreen-block-content .movie-card {
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.wegreen-block-content .movie-card-box-shadow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wegreen-block-content .movie-card:hover {
    background-color: #f9fafb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Force horizontal layout for all screen sizes */
.wegreen-block-content .movie-card-inner {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px;
    padding: 8px;
}

.wegreen-block-content .movie-card-image {
    width: 96px;
    height: 128px;
    flex-shrink: 0;
    min-width: 80px; /* Ensure minimum width on all screens */
}

.wegreen-block-content .movie-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: transform 0.3s ease;
}

.wegreen-block-content .movie-card:hover .movie-card-image img {
    transform: scale(1.05);
}

.wegreen-block-content .movie-card-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink if needed */
}

.wegreen-block-content .movie-card-title {
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}

.wegreen-block-content .movie-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wegreen-block-content .movie-card-title a:hover {
    color: #217346;
}

.wegreen-block-content .movie-card-meta {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.wegreen-block-content .movie-card-meta strong {
    font-weight: 600;
    color: #6b7280;
    margin-right: 5px;
}

/* Media Queries for smaller screens - maintain horizontal layout */
@media (max-width: 576px) {
    .wegreen-block-content .movie-card-inner {
        /* Reinforce horizontal layout */
        display: flex !important;
        flex-direction: row !important;
        gap: 12px;
        padding: 8px;
        align-items: flex-start;
    }
    
    .wegreen-block-content .movie-card-image {
        /* Keep the image size reasonable on small screens */
        width: 80px;
        height: 110px;
        flex-shrink: 0;
        margin-bottom: 0 !important;
    }
    
    .wegreen-block-content .movie-card-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .wegreen-block-content .movie-card-meta {
        font-size: 11px;
        margin-bottom: 3px;
    }
}

/* Fix for any potential theme conflicts on very small screens */
@media (max-width: 480px) {
    .wegreen-block-content .movie-card-inner {
        flex-direction: row !important;
        display: flex !important;
    }
    
    .wegreen-block-content .movie-card-image {
        width: 70px;
        height: 100px;
        margin-bottom: 0 !important;
        margin-right: 10px;
    }
}

/* Responsive styles for pagination controls */
@media (max-width: 768px) {
    .nextprev-pagination {
        max-width: 200px;
    }
    
    .wegreen-loadmore-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}