/* WP PagerPost Frontend Styles */

.wp-pagerpost-container {
    max-width: 100%;
    margin: 20px 0;
    overflow: hidden;
    background: transparent;
}

/* Counter Styles */
.pager-counter {
    background: #f8f9fa;
    padding: 10px 20px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    visibility: hidden !important;
    color: #495057;
}

.pager-counter .current-page {
    color: #007cba;
}

/* Content Wrapper */
.pager-content-wrapper {
    position: relative;
    min-height: 300px;
}

.pager-page {
    padding: 30px;
    transition: opacity 0.3s ease;
    display: none; /* Hidden by default */
    max-width: 100%;
    box-sizing: border-box;
}

.pager-page:first-child {
    display: block; /* Show first page by default */
}

/* Ensure markdown content matches pager width */
.pager-page p {
    word-wrap: break-word;
}

/* Item Header */
.pager-item-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.pager-item-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    line-height: 1.3;
    color: #2c3e50;
}

.pager-item-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #6c757d;
}

.pager-item-meta span {
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
}

.post-type {
    background: #007cba !important;
    color: white !important;
}

/* Item Content */
.pager-page {
    line-height: 1.6;
    font-size: 16px;
    color: #333;
}

.pager-page h1,
.pager-page h2,
.pager-page h3,
.pager-page h4,
.pager-page h5,
.pager-page h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.pager-page p {
    margin-bottom: 15px;
}

.pager-page img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* Item Footer */
.pager-item-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #007cba;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background: #007cba;
    color: white;
    text-decoration: none;
}

/* Navigation Styles */
.pager-navigation {
    background: #f8f9fa;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pager-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.pager-btn:hover:not(:disabled):not(.disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.pager-btn:disabled,
.pager-btn.disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    pointer-events: none;
    opacity: 0.6;
}

.pager-btn .btn-icon {
    font-size: 16px;
}

/* Dots Navigation */
.pager-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pager-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.pager-dot:hover {
    border-color: #007cba;
}

.pager-dot.active {
    background: #007cba;
    border-color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pager-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .pager-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .pager-item-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .pager-page {
        padding: 20px;
    }
    
    .pager-item-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .wp-pagerpost-container {
        margin: 15px 0;
        border-radius: 4px;
    }
    
    .pager-page {
        padding: 15px;
    }
    
    .pager-navigation {
        padding: 15px;
    }
    
    .pager-btn .btn-text {
        display: none;
    }
    
    .pager-btn {
        min-width: 50px;
        padding: 12px;
    }
}
