/* Wrapper */
.frieblpo-wrapper {
    margin: 20px 0;
}

/* Filter dropdown */
#frieblpo-filter {
    padding: 8px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #000;
}

/* Grid layout */
.frieblpo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card */
.frieblpo-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Image area */
.frieblpo-image {
    position: relative;
    height: 180px;
    background-color: #f5f5f5;
}

.frieblpo-category {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 3px;
}

/* Content area */
.frieblpo-content {
    padding: 15px;
}

/* Meta info */
.frieblpo-meta {
    font-size: 12px;
    color: var(--frieblpo-meta-color);
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

/* Title */
.frieblpo-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.frieblpo-content h3 a {
    color: var(--frieblpo-title-color);
    text-decoration: none;
}

.frieblpo-content h3 a:hover {
    text-decoration: underline;
}

/* Description */
.frieblpo-content p {
    color: var(--frieblpo-desc-color);
    font-size: 14px;
    margin: 0 0 10px;
}

/* Read more link */
.frieblpo-content a.read-more {
    color: var(--frieblpo-link-color);
    font-weight: bold;
    text-decoration: none;
}

.frieblpo-content a.read-more:hover {
    text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .frieblpo-grid {
        grid-template-columns: 1fr;
    }
}

/* Focus styles for accessibility */
.frieblpo-content h3 a:focus,
.frieblpo-content a.read-more:focus {
    outline: 2px solid var(--frieblpo-link-color);
    outline-offset: 2px;
    background-color: rgba(255, 92, 58, 0.1);
}

/* Transition polish */
.frieblpo-content h3 a,
.frieblpo-content a.read-more {
    transition: color 0.2s ease, text-decoration 0.2s ease, background-color 0.2s ease;
}

/* Loading spinner for AJAX state */
#frieblpo-posts p {
    display: flex;
    align-items: center;
    gap: 8px;
}

#frieblpo-posts p::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--frieblpo-link-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: frieblpo-spin 0.8s linear infinite;
}

@keyframes frieblpo-spin {
    to { transform: rotate(360deg); }
}

/* Dark mode variant */
@media (prefers-color-scheme: dark) {
    #frieblpo-filter {
        background: #222;
        color: #eee;
        border: 1px solid #555;
    }

    .frieblpo-card {
        background: #1e1e1e;
        border: 1px solid #444;
    }

    .frieblpo-image {
        background-color: #333;
    }

    .frieblpo-category {
        background: rgba(255,255,255,0.2);
        color: #fff;
    }

    .frieblpo-content h3 a {
        color: var(--frieblpo-title-color);
    }

    .frieblpo-content p {
        color: var(--frieblpo-desc-color);
    }

    .frieblpo-meta {
        color: var(--frieblpo-meta-color);
    }

    .frieblpo-content a.read-more {
        color: var(--frieblpo-link-color);
    }
}
