/* ========================================
   FEATURED POSTS MANAGER STYLES
   ======================================== */

/* Featured Posts Section */
.featured-posts-section {
    margin: 3rem 0;
}

/* Grid Layout */
.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Featured Post Card */
.featured-post-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Featured Post Image */
.featured-post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post-card:hover .featured-post-image img {
    transform: scale(1.05);
}

/* Featured Post Content */
.featured-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.featured-post-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.featured-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post-title a:hover {
    color: #3b82f6;
}

.featured-post-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.featured-post-excerpt {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.featured-post-link {
    margin-top: auto;
    text-align: center;
}

.featured-post-button {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.featured-post-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* List Layout */
.featured-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-post-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.featured-post-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.featured-post-item .featured-post-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.featured-post-item .featured-post-date {
    margin-bottom: 0.5rem;
}

.featured-post-item .featured-post-excerpt {
    margin-bottom: 0;
}

/* Admin Styles */
.featured-posts-admin {
    max-width: 1200px;
}

.featured-posts-admin .featured-posts-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.featured-posts-admin h2 {
    margin-top: 0;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Search and Filter Styles */
.featured-posts-admin .form-table {
    margin-top: 1rem;
}

.featured-posts-admin .form-table th {
    width: 150px;
    padding: 1rem 1rem 1rem 0;
    font-weight: 600;
    color: #374151;
}

.featured-posts-admin .form-table td {
    padding: 1rem 0;
}

.featured-posts-admin .form-table input[type="text"],
.featured-posts-admin .form-table select {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.featured-posts-admin .form-table input[type="text"]:focus,
.featured-posts-admin .form-table select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Bulk Actions Styles */
.bulk-actions {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-actions select {
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
}

.bulk-actions .button {
    margin: 0;
}

/* Enhanced Table Styles */
.featured-posts-admin .wp-list-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.featured-posts-admin .wp-list-table td {
    vertical-align: middle;
}

.featured-posts-admin .wp-list-table input[type="checkbox"] {
    margin: 0;
}

.featured-posts-admin .wp-list-table input[type="number"] {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    text-align: center;
}

/* Status Indicators */
.featured-posts-admin .wp-list-table tr.featured-post {
    background-color: #f0f9ff;
}

.featured-posts-admin .wp-list-table tr.featured-post:hover {
    background-color: #e0f2fe;
}

/* Meta Box Styles */
.featured-posts-meta-box {
    padding: 0.5rem 0;
}

.featured-posts-meta-box label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.featured-posts-meta-box input[type="checkbox"] {
    margin: 0;
}

.featured-posts-meta-box input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.featured-posts-meta-box .description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Success/Error Messages */
.featured-posts-admin .notice {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.featured-posts-admin .notice-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.featured-posts-admin .notice-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Preview Styles */
.preview-controls {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-controls label {
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.preview-controls select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    min-width: 100px;
}

.preview-container {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    background: #fafafa;
    min-height: 200px;
}

.preview-loading {
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

.preview-container .featured-posts-section {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.preview-container .featured-posts-grid {
    gap: 1rem;
}

.preview-container .featured-post-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-container .featured-post-item {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-post-content {
        padding: 1.25rem;
    }
    
    .featured-post-title {
        font-size: 1.125rem;
    }
    
    .featured-post-excerpt {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .featured-post-content {
        padding: 1rem;
    }
    
    .featured-post-title {
        font-size: 1rem;
    }
    
    .featured-post-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .featured-post-card,
    .featured-post-item {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .featured-post-title a {
        color: #f9fafb;
    }
    
    .featured-post-title a:hover {
        color: #60a5fa;
    }
    
    .featured-post-excerpt {
        color: #d1d5db;
    }
    
    .featured-post-date {
        color: #9ca3af;
    }
    
    .featured-posts-admin .featured-posts-section {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .featured-posts-admin h2 {
        color: #f9fafb;
        border-bottom-color: #374151;
    }
}

/* Animation Enhancements */
.featured-post-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.featured-posts-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

.featured-posts-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility Improvements */
.featured-post-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.featured-post-title a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .featured-post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .featured-post-button {
        background: #000;
        color: #fff;
    }
} 