/**
 * Frontend Styles for Post Page Customizer Templates
 * These styles apply to the generated templates on the frontend
 */

/* Container */
.ppc-template-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ppc-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Article */
.ppc-article {
    margin-bottom: 40px;
}

/* Entry Header */
.ppc-entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ppc-entry-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    font-weight: 700;
}

.ppc-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.ppc-entry-meta .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

.ppc-entry-meta > span {
    display: flex;
    align-items: center;
}

/* Featured Image */
.ppc-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.ppc-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry Content */
.ppc-entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.ppc-entry-content p {
    margin-bottom: 1.5em;
}

.ppc-entry-content h2,
.ppc-entry-content h3,
.ppc-entry-content h4 {
    margin: 1.5em 0 0.8em;
    color: #1a1a1a;
    font-weight: 600;
}

.ppc-entry-content h2 {
    font-size: 2rem;
}

.ppc-entry-content h3 {
    font-size: 1.6rem;
}

.ppc-entry-content h4 {
    font-size: 1.3rem;
}

.ppc-entry-content ul,
.ppc-entry-content ol {
    margin: 1em 0 1em 2em;
}

.ppc-entry-content li {
    margin-bottom: 0.5em;
}

.ppc-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.ppc-entry-content blockquote {
    border-left: 4px solid #2271b1;
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #f9f9f9;
    font-style: italic;
}

.ppc-page-links {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.ppc-page-links span {
    display: inline-block;
    margin: 0 5px;
}

/* ACF Fields Section */
.ppc-acf-fields {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ppc-section-title {
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-weight: 600;
}

.ppc-fields-grid {
    display: grid;
    gap: 20px;
}

.ppc-acf-field {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.ppc-field-label {
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 10px;
    font-size: 1rem;
}

.ppc-field-value {
    color: #333;
    line-height: 1.6;
}

.ppc-field-value img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
}

.ppc-field-value ul.ppc-field-list {
    margin: 10px 0;
    padding-left: 20px;
}

.ppc-field-value pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9rem;
}

/* Entry Footer */
.ppc-entry-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.ppc-categories,
.ppc-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ppc-label {
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ppc-label .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.ppc-terms a {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.ppc-terms a:hover {
    background: #2271b1;
    color: #fff;
}

.ppc-edit-link {
    margin-top: 20px;
}

.ppc-edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.ppc-edit-link a:hover {
    background: #135e96;
}

/* Post Navigation */
.ppc-post-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.ppc-nav-previous,
.ppc-nav-next {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ppc-nav-previous:hover,
.ppc-nav-next:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ppc-nav-previous a,
.ppc-nav-next a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.ppc-nav-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ppc-nav-label .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.ppc-nav-next .ppc-nav-label {
    justify-content: flex-end;
}

.ppc-nav-title {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.1rem;
}

.ppc-nav-next .ppc-nav-title {
    text-align: right;
}

/* Comments */
.ppc-article .comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

/* Elementor Wrapper */
.ppc-elementor-wrapper {
    width: 100%;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ppc-container {
        padding: 20px;
    }
    
    .ppc-entry-title {
        font-size: 1.8rem;
    }
    
    .ppc-entry-content {
        font-size: 1rem;
    }
    
    .ppc-entry-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .ppc-post-navigation {
        grid-template-columns: 1fr;
    }
    
    .ppc-nav-next .ppc-nav-label,
    .ppc-nav-next .ppc-nav-title {
        justify-content: flex-start;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .ppc-template-wrapper {
        padding: 20px 10px;
    }
    
    .ppc-container {
        padding: 15px;
    }
    
    .ppc-entry-title {
        font-size: 1.5rem;
    }
    
    .ppc-acf-fields {
        padding: 20px 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ppc-container {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .ppc-entry-title,
    .ppc-section-title {
        color: #fff;
    }
    
    .ppc-entry-content {
        color: #e0e0e0;
    }
    
    .ppc-acf-fields {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .ppc-acf-field {
        background: #1a1a1a;
        border-color: #3a3a3a;
    }
    
    .ppc-nav-previous,
    .ppc-nav-next {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .ppc-nav-title {
        color: #fff;
    }
}

/* Print Styles */
@media print {
    .ppc-entry-footer,
    .ppc-post-navigation,
    .ppc-edit-link {
        display: none;
    }
    
    .ppc-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
