/* Manage Feed Source Component Styles - blog82ai prefixed */

.blog82ai-manage-feeds {
    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-manage-feeds .blog82ai-page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 15px;
}

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

.blog82ai-manage-feeds .blog82ai-page-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

.blog82ai-manage-feeds .blog82ai-header-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: flex-end;
}

.blog82ai-manage-feeds .blog82ai-header-actions .button {
    padding: 8px 16px;
    height: auto;
}

/* Filters */
.blog82ai-manage-feeds .blog82ai-feeds-filters {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.blog82ai-manage-feeds .blog82ai-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 16px;
    align-items: end;
}

.blog82ai-manage-feeds .blog82ai-filter-group {
    display: flex;
    flex-direction: column;
}

.blog82ai-manage-feeds .blog82ai-filter-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #23282d;
    font-size: 14px;
}

.blog82ai-manage-feeds .blog82ai-filter-group select,
.blog82ai-manage-feeds .blog82ai-filter-group input {
    padding: 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    color: #23282d;
    margin-top: 4px;
}

/* Dropdown arrow indicator */
.blog82ai-manage-feeds .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;
}

/* Table */
.blog82ai-manage-feeds .blog82ai-feeds-table {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.blog82ai-feeds-table table {
    margin: 0;
    border: none;
}

.blog82ai-feeds-table th {
    background: #f6f7f7;
    border-bottom: 1px solid #e1e5e9;
    padding: 12px;
    font-weight: 600;
    color: #1d2327;
}

.blog82ai-feeds-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.blog82ai-feeds-table tbody tr:hover {
    background: #f6f7f7;
}

.blog82ai-feed-url {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.blog82ai-fetch-time {
    font-weight: 500;
    font-size: 13px;
}

.blog82ai-fetch-status {
    font-size: 12px;
    margin-top: 2px;
}

.blog82ai-fetch-status.success {
    color: #00a32a;
}

.blog82ai-fetch-status.error {
    color: #d63638;
}

.blog82ai-fetch-status.paused {
    color: #dba617;
}

.blog82ai-import-count {
    font-weight: 500;
    font-size: 13px;
}

.blog82ai-recent-imports {
    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-active {
    background: #d1e7dd;
    color: #0a3622;
}

.blog82ai-status-badge.status-error {
    background: #f8d7da;
    color: #58151c;
}

.blog82ai-status-badge.status-paused {
    background: #fff3cd;
    color: #664d03;
}

.blog82ai-status-badge.status-inactive {
    background: #e2e3e5;
    color: #41464b;
}

/* 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-top: 16px;
    padding: 12px 16px;
    background: #f6f7f7;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
}

.blog82ai-bulk-actions-bar {
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    gap: 10px;
}

.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;
}

/* Feed Statistics Summary */
.blog82ai-feed-stats-summary {
    margin-top: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog82ai-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.blog82ai-stat-card {
    text-align: center;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.blog82ai-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
    margin-bottom: 4px;
}

.blog82ai-stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog82ai-manage-feeds {
        padding: 15px;
    }

    .blog82ai-filter-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .blog82ai-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog82ai-manage-feeds {
        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-feeds-table {
        overflow-x: auto;
    }

    .blog82ai-feeds-table table {
        min-width: 800px;
    }

    .blog82ai-bulk-actions-bar {
        flex-direction: column;
        gap: 12px;
    }

    .blog82ai-stats-cards {
        grid-template-columns: 1fr;
    }

    .blog82ai-action-buttons {
        justify-content: center;
    }
}

/* WordPress Admin Integration */
.blog82ai-manage-feeds .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.blog82ai-manage-feeds .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.blog82ai-manage-feeds .button-secondary {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2c3338;
}

.blog82ai-manage-feeds .button-secondary:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

/* Loading States */
.blog82ai-feeds-table.loading {
    opacity: 0.7;
    pointer-events: none;
}

.blog82ai-feeds-table.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Sortable Headers */
.blog82ai-feeds-table th.sortable a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog82ai-feeds-table th.sortable a:hover {
    color: #2271b1;
}

.blog82ai-feeds-table th.sortable a::after {
    content: "⇅";
    opacity: 0.5;
    font-size: 10px;
}

.blog82ai-feeds-table th.sortable.asc a::after {
    content: "↑";
    opacity: 1;
}

.blog82ai-feeds-table th.sortable.desc a::after {
    content: "↓";
    opacity: 1;
}
