/* Advanced Post Views Frontend Styles */

.apv-post-views-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #646970;
    border-left: 3px solid #2271b1;
}

.apv-views-icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.apv-views-icon svg {
    width: 16px;
    height: 16px;
}

.apv-views-label {
    font-weight: 500;
}

.apv-post-views-count {
    font-weight: 600;
    color: #2271b1;
}

/* Shortcode Styles */
.apv-shortcode-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.apv-shortcode-icon svg {
    width: 14px;
    height: 14px;
}

.apv-shortcode-count {
    font-weight: 600;
    color: #2271b1;
}

/* Most Viewed Posts Shortcode */
.apv-most-viewed-posts {
    margin: 20px 0;
}

.apv-popular-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.apv-popular-post-item:last-child {
    border-bottom: none;
}

.apv-post-thumbnail {
    flex-shrink: 0;
}

.apv-post-thumbnail img {
    border-radius: 4px;
}

.apv-post-content {
    flex: 1;
}

.apv-post-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.4;
}

.apv-post-title a {
    text-decoration: none;
    color: #2271b1;
}

.apv-post-title a:hover {
    text-decoration: underline;
}

.apv-post-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #646970;
    margin: 8px 0;
}

.apv-post-excerpt {
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
}

.apv-eye-icon {
    opacity: 0.7;
}

/* Popular Posts Advanced Layouts */
.apv-popular-posts {
    margin: 20px 0;
}

.apv-layout-grid {
    display: grid;
    gap: 20px;
}

.apv-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.apv-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.apv-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.apv-popular-post {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.apv-popular-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.apv-post-featured-image {
    position: relative;
    overflow: hidden;
}

.apv-post-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.apv-popular-post:hover .apv-post-featured-image img {
    transform: scale(1.05);
}

.apv-post-details {
    padding: 15px;
}

.apv-post-rank {
    display: inline-block;
    background: #2271b1;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.apv-post-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.apv-post-title a {
    color: #333;
    text-decoration: none;
}

.apv-post-title a:hover {
    color: #2271b1;
}

.apv-post-meta {
    font-size: 13px;
    color: #646970;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apv-post-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Site Stats Shortcode */
.apv-site-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.apv-layout-vertical .apv-site-stats {
    flex-direction: column;
}

.apv-layout-grid .apv-site-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.apv-stat-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apv-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 5px;
}

.apv-stat-label {
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

.apv-stat-subtitle {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

/* Chart Container */
.apv-chart-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.apv-chart-container canvas {
    max-width: 100%;
}

/* No Posts Message */
.apv-no-posts {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #646970;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .apv-columns-2,
    .apv-columns-3,
    .apv-columns-4 {
        grid-template-columns: 1fr;
    }

    .apv-site-stats {
        flex-direction: column;
        gap: 15px;
    }

    .apv-popular-post-item {
        flex-direction: column;
        gap: 10px;
    }

    .apv-post-featured-image img {
        height: 150px;
    }

    .apv-post-meta {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .apv-post-details {
        padding: 12px;
    }

    .apv-stat-item {
        padding: 15px;
    }

    .apv-stat-number {
        font-size: 20px;
    }
}
