/* Fetch Posts Log Component Styles - blog82ai prefixed */

.blog82ai-fetched-posts {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Page header styling */
.blog82ai-fetched-posts .blog82ai-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}

.blog82ai-fetched-posts .blog82ai-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}

.blog82ai-fetched-posts .blog82ai-page-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

.blog82ai-fetched-posts .blog82ai-header-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: flex-end;
}

.blog82ai-fetched-posts .blog82ai-header-actions .button {
    padding: 8px 16px;
    height: auto;
}

/* Filters */
.blog82ai-fetched-posts .blog82ai-posts-filters {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.blog82ai-fetched-posts .blog82ai-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 2fr;
    gap: 16px;
    align-items: end;
}

.blog82ai-fetched-posts .blog82ai-filter-group {
    display: flex;
    flex-direction: column;
}

.blog82ai-fetched-posts .blog82ai-filter-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #23282d;
    font-size: 14px;
}

.blog82ai-fetched-posts .blog82ai-filter-group select,
.blog82ai-fetched-posts .blog82ai-filter-group input {
    padding: 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    background-color: #fff;
}

/* Dropdown arrow indicator */
.blog82ai-fetched-posts .blog82ai-filter-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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: 16px;
    padding-right: 32px;
}

.blog82ai-filter-group input[type="text"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="%23646970"><path d="M11.7 10.3l3.6 3.6c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-3.6-3.6C9.1 12.5 7.6 13 6 13c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7c0 1.6-.5 3.1-1.3 4.3zM6 11c2.8 0 5-2.2 5-5s-2.2-5-5-5-5 2.2-5 5 2.2 5 5 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

/* Custom Date Range */
.blog82ai-custom-date-range {
    margin-top: 16px;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 3px solid #2271b1;
}

.blog82ai-date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.blog82ai-date-group {
    display: flex;
    flex-direction: column;
}

.blog82ai-date-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d2327;
    font-size: 13px;
}

.blog82ai-date-group input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

/* Summary Stats */
.blog82ai-posts-summary {
    margin-bottom: 24px;
}

.blog82ai-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.blog82ai-summary-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog82ai-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog82ai-summary-card.success {
    border-left: 4px solid #00a32a;
}

.blog82ai-summary-card.warning {
    border-left: 4px solid #dba617;
}

.blog82ai-summary-card.error {
    border-left: 4px solid #d63638;
}

.blog82ai-summary-number {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
    margin-bottom: 8px;
}

.blog82ai-summary-card.success .blog82ai-summary-number {
    color: #00a32a;
}

.blog82ai-summary-card.warning .blog82ai-summary-number {
    color: #dba617;
}

.blog82ai-summary-card.error .blog82ai-summary-number {
    color: #d63638;
}

.blog82ai-summary-label {
    font-size: 13px;
    color: #646970;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.blog82ai-summary-change {
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

/* Table */
.blog82ai-fetched-posts .blog82ai-posts-table {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.blog82ai-posts-table table {
    margin: 0;
    border: none;
}

.blog82ai-posts-table th {
    background: #f6f7f7;
    border-bottom: 1px solid #e1e5e9;
    padding: 12px;
    font-weight: 600;
    color: #1d2327;
}

.blog82ai-posts-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.blog82ai-posts-table tbody tr:hover {
    background: #f6f7f7;
}

/* Post Meta */
.blog82ai-post-meta {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.blog82ai-post-author,
.blog82ai-post-published {
    margin-right: 12px;
}

.blog82ai-source-name {
    font-weight: 500;
    font-size: 13px;
}

.blog82ai-source-url {
    font-size: 12px;
    color: #646970;
    margin-top: 2px;
}

.blog82ai-import-time {
    font-weight: 500;
    font-size: 13px;
}

.blog82ai-import-details {
    font-size: 12px;
    color: #646970;
    margin-top: 2px;
}

/* Status Badges */
.blog82ai-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog82ai-status-badge.status-imported {
    background: #d1e7dd;
    color: #0a3622;
}

.blog82ai-status-badge.status-duplicate {
    background: #fff3cd;
    color: #664d03;
}

.blog82ai-status-badge.status-error {
    background: #f8d7da;
    color: #58151c;
}

.blog82ai-status-badge.status-skipped {
    background: #e2e3e5;
    color: #41464b;
}

.blog82ai-status-badge.status-filtered {
    background: #cff4fc;
    color: #055160;
}

/* Error and Skip Messages */
.blog82ai-error-message,
.blog82ai-skip-reason {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.blog82ai-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.blog82ai-skip-reason {
    background: #e2e3e5;
    border: 1px solid #d6d8db;
    color: #383d41;
}

/* Action Buttons */
.blog82ai-action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.blog82ai-action-buttons .button {
    padding: 4px 8px;
    min-height: 0;
    height: auto;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 3px;
}

.blog82ai-action-buttons .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.blog82ai-action-buttons .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* Bulk Actions */
.blog82ai-bulk-actions {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f6f7f7;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
}

.blog82ai-bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog82ai-bulk-actions select {
    margin-right: 8px;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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 6px center;
    background-size: 14px;
    background-color: #fff;
    padding-right: 28px;
}
    border-radius: 4px;
    font-size: 13px;
}

.blog82ai-table-info {
    font-size: 13px;
    color: #646970;
}

.blog82ai-selection-count {
    margin-left: 8px;
    font-weight: 600;
    color: #2271b1;
}

/* Pagination */
.blog82ai-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog82ai-pagination-info {
    font-size: 14px;
    color: #646970;
}

.blog82ai-pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog82ai-page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.blog82ai-page-numbers .button {
    min-width: 32px;
    height: 32px;
    padding: 0;
    text-align: center;
}

.blog82ai-page-numbers span {
    color: #646970;
    padding: 0 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog82ai-fetched-posts {
        padding: 15px;
    }

    .blog82ai-filter-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
    }

    .blog82ai-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog82ai-date-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .blog82ai-date-inputs .button {
        grid-column: span 2;
        justify-self: start;
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .blog82ai-fetched-posts {
        padding: 10px;
    }

    .blog82ai-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .blog82ai-header-actions {
        justify-content: center;
    }

    .blog82ai-filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .blog82ai-summary-cards {
        grid-template-columns: 1fr;
    }

    .blog82ai-posts-table {
        overflow-x: auto;
    }

    .blog82ai-posts-table table {
        min-width: 1000px;
    }

    .blog82ai-bulk-actions-bar {
        flex-direction: column;
        gap: 12px;
    }

    .blog82ai-pagination {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .blog82ai-action-buttons {
        justify-content: center;
    }

    .blog82ai-date-inputs {
        grid-template-columns: 1fr;
    }

    .blog82ai-date-inputs .button {
        grid-column: 1;
        margin-top: 8px;
    }
}

/* WordPress Admin Integration */
.blog82ai-fetched-posts .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.blog82ai-fetched-posts .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.blog82ai-fetched-posts .button-secondary {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2c3338;
}

.blog82ai-fetched-posts .button-secondary:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

/* Loading States */
.blog82ai-posts-table.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Sortable Headers */
.blog82ai-posts-table th.sortable a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog82ai-posts-table th.sortable a:hover {
    color: #2271b1;
}

.blog82ai-posts-table th.sortable a::after {
    content: "⇅";
    opacity: 0.5;
    font-size: 10px;
}

.blog82ai-posts-table th.sortable.asc a::after {
    content: "↑";
    opacity: 1;
}

.blog82ai-posts-table th.sortable.desc a::after {
    content: "↓";
    opacity: 1;
}
