/**
 * BlogPost Custom Order - Frontend Styles
 * @version 1.0.0
 */

/* Posts List Container */
.bpco-posts-list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

/* Individual Post Item */
.bpco-post-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.bpco-post-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.bpco-post-item:last-child {
    margin-bottom: 0;
}

/* Post Title */
.bpco-post-item h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    line-height: 1.3;
}

.bpco-post-item h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bpco-post-item h3 a:hover {
    color: #007cba;
}

/* Post Meta */
.bpco-post-meta {
    margin: 10px 0 15px 0;
    font-size: 0.9em;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.bpco-date {
    display: inline-flex;
    align-items: center;
}

.bpco-date:before {
    content: "📅";
    margin-right: 5px;
}

.bpco-order {
    display: inline-flex;
    align-items: center;
    background: #007cba;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.bpco-order:before {
    content: "#";
    margin-right: 2px;
}

/* Post Excerpt */
.bpco-excerpt {
    color: #555;
    line-height: 1.6;
    margin-top: 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .bpco-post-item {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .bpco-post-item h3 {
        font-size: 1.2em;
    }
    
    .bpco-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .bpco-posts-list {
        margin: 15px 0;
    }
    
    .bpco-post-item {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .bpco-post-item h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .bpco-post-meta {
        font-size: 0.85em;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .bpco-post-item {
        background: #2c2c2c;
        border-color: #444;
        color: #e1e1e1;
    }
    
    .bpco-post-item h3 a {
        color: #e1e1e1;
    }
    
    .bpco-post-item h3 a:hover {
        color: #64b5f6;
    }
    
    .bpco-post-meta {
        color: #bbb;
    }
    
    .bpco-excerpt {
        color: #ccc;
    }
    
    .bpco-order {
        background: #64b5f6;
        color: #1a1a1a;
    }
}

/* Print Styles */
@media print {
    .bpco-post-item {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .bpco-post-item h3 a {
        color: #000 !important;
    }
    
    .bpco-order {
        background: #000 !important;
        color: #fff !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bpco-post-item {
        border-width: 2px;
        border-color: #000;
    }
    
    .bpco-post-item h3 a {
        color: #000;
        text-decoration: underline;
    }
    
    .bpco-order {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Loading Animation */
.bpco-posts-list.loading .bpco-post-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.bpco-posts-list.loading .bpco-post-item:nth-child(2) {
    animation-delay: 0.1s;
}

.bpco-posts-list.loading .bpco-post-item:nth-child(3) {
    animation-delay: 0.2s;
}

.bpco-posts-list.loading .bpco-post-item:nth-child(4) {
    animation-delay: 0.3s;
}

.bpco-posts-list.loading .bpco-post-item:nth-child(5) {
    animation-delay: 0.4s;
}

/* No Posts Message */
.bpco-posts-list p {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px dashed #ddd;
}

/* Focus Styles for Accessibility */
.bpco-post-item h3 a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .bpco-post-item,
    .bpco-post-item h3 a {
        transition: none;
    }
    
    .bpco-post-item:hover {
        transform: none;
    }
    
    .bpco-posts-list.loading .bpco-post-item {
        animation: none;
    }
} 