/* Styles for Generated Blog History component */
.blog82ai-blog-history {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Page Header */
.blog82ai-blog-history .blog82ai-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}

.blog82ai-blog-history .blog82ai-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}

.blog82ai-blog-history .header-actions {
    display: flex;
    gap: 10px;
}

/* Filters Section */
.blog82ai-history-filters {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.blog82ai-history-filters .filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.blog82ai-history-filters .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
}

.blog82ai-history-filters .filter-group label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #23282d;
    font-weight: 500;
}

.blog82ai-history-filters .filter-group select,
.blog82ai-history-filters .filter-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    height: 46px;
    box-sizing: border-box;
    background: #fff;
}

.blog82ai-history-filters .filter-group select {
    padding-right: 35px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.blog82ai-history-filters .filter-group select:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
    border-color: #007cba;
}

.blog82ai-history-filters .filter-group input[type="text"] {
    min-width: 200px;
    flex: 1;
}

/* Search group specific styling */
.blog82ai-history-filters .search-group {
    min-width: 300px;
    max-width: 350px;
}

.blog82ai-history-filters .search-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.blog82ai-history-filters .search-input-wrapper input {
    flex: 1;
    min-width: 200px;
}

.blog82ai-history-filters .search-button {
    padding: 10px 16px;
    height: 46px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.blog82ai-history-filters .search-button:hover {
    background: #005a87;
}

/* Table Styling */
.blog82ai-history-table {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.blog82ai-history-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
}

/* Header styling */
.blog82ai-history-table thead th {
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    text-align: left;
}

.blog82ai-history-table thead th:first-child {
    border-top-left-radius: 8px;
    width: 40px;
    text-align: center;
}

.blog82ai-history-table thead th:last-child {
    border-top-right-radius: 8px;
}

.blog82ai-history-table thead th.sortable a {
    color: #495057;
    text-decoration: none;
    font-weight: 600;
}

.blog82ai-history-table thead th.sortable a:hover {
    color: #0073aa;
}

/* Body styling */
.blog82ai-history-table tbody tr {
    border: none;
    background: #fff;
    transition: background-color 0.15s ease;
}

.blog82ai-history-table tbody tr:hover {
    background: #f8f9fa;
}

.blog82ai-history-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.blog82ai-history-table tbody td {
    padding: 16px;
    border: none;
    vertical-align: middle;
    font-size: 14px;
    color: #495057;
}

.blog82ai-history-table tbody td:first-child {
    text-align: center;
    width: 40px;
}

/* Title column styling */
.blog82ai-history-table tbody td:nth-child(2) {
    min-width: 300px;
}

.blog82ai-history-table tbody td:nth-child(2) strong a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.blog82ai-history-table tbody td:nth-child(2) strong a:hover {
    color: #0073aa;
}

.blog82ai-history-table .row-actions {
    margin-top: 4px;
    font-size: 12px;
}

.blog82ai-history-table .row-actions a {
    color: #0073aa;
    text-decoration: none;
}

.blog82ai-history-table .row-actions a:hover {
    color: #005a87;
}

/* Status badges */
.blog82ai-history-table .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog82ai-history-table .status-published {
    background: #d4edda;
    color: #155724;
}

.blog82ai-history-table .status-draft {
    background: #fff3cd;
    color: #856404;
}

.blog82ai-history-table .status-scheduled {
    background: #d1ecf1;
    color: #0c5460;
}

.blog82ai-history-table .status-trash {
    background: #f8d7da;
    color: #721c24;
}

/* SEO Score */
.blog82ai-history-table .seo-score {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 40px;
}

.blog82ai-history-table .seo-excellent {
    background: #d4edda;
    color: #155724;
}

.blog82ai-history-table .seo-good {
    background: #cce5ff;
    color: #004085;
}

.blog82ai-history-table .seo-average {
    background: #fff3cd;
    color: #856404;
}

.blog82ai-history-table .seo-poor {
    background: #f8d7da;
    color: #721c24;
}

/* Action buttons */
.blog82ai-history-table .action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.blog82ai-history-table .button-small {
    padding: 4px 6px;
    font-size: 11px;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.blog82ai-history-table .button-small:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.blog82ai-history-table .button-small:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pagination */
.blog82ai-tablenav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.blog82ai-tablenav .alignleft {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog82ai-tablenav select {
    padding: 6px 30px 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.blog82ai-tablenav-pages {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog82ai-tablenav-pages .displaying-num {
    font-size: 14px;
    color: #666;
}

.blog82ai-pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog82ai-pagination-links .button {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.blog82ai-pagination-links .button:hover:not(.disabled) {
    background: #f0f0f0;
    border-color: #999;
}

.blog82ai-pagination-links .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.blog82ai-paging-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog82ai-paging-input .current-page {
    width: 40px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

/* Statistics Section */
.blog82ai-history-stats {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.blog82ai-history-stats h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.blog82ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.blog82ai-stat-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.blog82ai-stat-card .stat-icon {
    font-size: 32px;
    opacity: 0.8;
}

.blog82ai-stat-card .stat-content {
    flex: 1;
}

.blog82ai-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #23282d;
    line-height: 1;
    margin-bottom: 5px;
}

.blog82ai-stat-card .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 3px;
}

.blog82ai-stat-card .stat-trend {
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
}

/* Responsive Design */
/* Empty State */
.no-blogs-message {
    text-align: center;
    padding: 60px 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-state .dashicons {
    font-size: 48px;
    color: #999;
    width: 48px;
    height: 48px;
}

.empty-state h3 {
    margin: 0;
    color: #666;
    font-size: 18px;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* SEO Score Styles */
.seo-score {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    min-width: 50px;
    display: inline-block;
}

.seo-score.seo-excellent {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.seo-score.seo-good {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.seo-score.seo-average {
    background-color: #ffeaa7;
    color: #856404;
    border: 1px solid #fdcb6e;
}

.seo-score.seo-poor {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Status Badge Enhancements */
.status-badge.status-publish {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.status-draft {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.status-future {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-badge.status-trash {
    background-color: #f8d7da;
    color: #721c24;
}

@media (max-width: 768px) {
    .blog82ai-blog-history {
        padding: 20px;
    }
    
    .blog82ai-blog-history .blog82ai-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .blog82ai-history-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog82ai-history-filters .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    .blog82ai-history-filters .filter-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }
    
    .blog82ai-tablenav {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .blog82ai-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .blog82ai-history-table {
        overflow-x: auto;
    }
    
    .blog82ai-history-table table {
        min-width: 800px;
    }
}

/* Premium feature styling for blog history */
.blog82ai-disabled-btn {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.blog82ai-disabled-btn:hover {
    background: #f0f0f1 !important;
}

.blog82ai-pro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 3px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
