/**
 * Public styles for Image Sources Manager
 *
 * @package Image_Sources_Manager
 */

/* Main container - neutral defaults; theme classes set the colors. */
.eiam-image-sources {
    margin: 20px 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Prefix label */
.eiam-image-sources .eiam-prefix {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

/* List styles */
.eiam-image-sources.eiam-list {
    /* List container */
}

.eiam-image-sources .eiam-image-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eiam-image-sources.eiam-ul .eiam-image-list {
    list-style: disc;
    margin-left: 20px;
}

.eiam-image-sources.eiam-ol .eiam-image-list {
    list-style: decimal;
    margin-left: 20px;
}

.eiam-image-sources .eiam-image-item {
    margin-bottom: 8px;
    padding: 0;
}

.eiam-image-sources .eiam-image-item:last-child {
    margin-bottom: 0;
}

/* Inline style */
.eiam-image-sources.eiam-inline {
    display: inline;
}

.eiam-image-sources.eiam-inline .eiam-image-item {
    display: inline;
    margin-bottom: 0;
}

.eiam-image-sources.eiam-inline .eiam-image-item:not(:last-child)::after {
    content: ', ';
}

/* Table style */
.eiam-table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: none;
}

.eiam-image-sources-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 14px;
    line-height: 1.5;
}

/* Explicit light theme */
.eiam-table-container.eiam-theme-light {
    border-color: #e0e0e0;
    box-shadow: none;
}
.eiam-image-sources-table.eiam-theme-light {
    background: transparent;
    color: #333;
}
.eiam-image-sources-table.eiam-theme-light thead {
    background: #f8f9fa;
}
.eiam-image-sources-table.eiam-theme-light th {
    color: #333;
    border-bottom-color: #e0e0e0;
}
.eiam-image-sources-table.eiam-theme-light td {
    border-bottom-color: #f0f0f0;
}
.eiam-image-sources-table.eiam-theme-light tbody tr {
    background: #fff;
}
.eiam-image-sources-table.eiam-theme-light tbody tr:hover {
    background: #f8f9fa;
}
.eiam-image-sources-table.eiam-theme-light a {
    color: #4a4a4a;
}
.eiam-image-sources-table.eiam-theme-light a:hover {
    color: #737373;
}

/* Explicit dark theme */
.eiam-table-container.eiam-theme-dark {
    border-color: #2c2c2c;
    box-shadow: none;
}
.eiam-image-sources-table.eiam-theme-dark {
    background: transparent;
    color: #e8e8e8;
}
.eiam-image-sources-table.eiam-theme-dark thead {
    background: #1a1a1a;
}
.eiam-image-sources-table.eiam-theme-dark th {
    color: #ffffff;
    font-weight: 600;
    border-bottom-color: #2c2c2c;
}
.eiam-image-sources-table.eiam-theme-dark td {
    border-bottom-color: #1a1a1a;
}
.eiam-image-sources-table.eiam-theme-dark tbody tr {
    background: #0a0a0a;
}
.eiam-image-sources-table.eiam-theme-dark tbody tr:hover {
    background: #141414;
}
.eiam-image-sources-table.eiam-theme-dark a {
    color: #d4d4d4;
}
.eiam-image-sources-table.eiam-theme-dark a:hover {
    color: #a3a3a3;
}
.eiam-image-sources-table.eiam-theme-dark .eiam-title-link,
.eiam-image-sources-table.eiam-theme-dark .eiam-title-text {
    color: #e8e8e8;
}
.eiam-image-sources-table.eiam-theme-dark .eiam-author-text {
    color: #d1d1d1;
}
.eiam-image-sources-table.eiam-theme-dark .eiam-missing {
    color: #9ca3af;
}
.eiam-image-sources-table.eiam-theme-dark .eiam-no-thumbnail {
    background: #1a1a1a;
    border: none;
    color: #9ca3af;
}
.eiam-image-sources-table.eiam-theme-dark .eiam-thumbnail-img {
    border: none;
}

/* Auto theme - fully inherits the WordPress theme.
   Uses transparent backgrounds + currentColor so colors come from the theme. */
.eiam-table-container.eiam-theme-auto {
    border: 1px solid currentColor;
    border-color: color-mix(in srgb, currentColor 15%, transparent);
    background: transparent;
    box-shadow: none;
}

.eiam-image-sources-table.eiam-theme-auto,
.eiam-image-sources-table.eiam-theme-auto thead,
.eiam-image-sources-table.eiam-theme-auto tbody,
.eiam-image-sources-table.eiam-theme-auto tbody tr {
    background: transparent;
    color: inherit;
}

.eiam-image-sources-table.eiam-theme-auto thead {
    background: color-mix(in srgb, currentColor 5%, transparent);
}

.eiam-image-sources-table.eiam-theme-auto th,
.eiam-image-sources-table.eiam-theme-auto td {
    color: inherit;
    border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.eiam-image-sources-table.eiam-theme-auto th {
    font-weight: 600;
}

.eiam-image-sources-table.eiam-theme-auto tbody tr:hover {
    background: color-mix(in srgb, currentColor 4%, transparent);
}

.eiam-image-sources-table.eiam-theme-auto a {
    color: inherit;
}

.eiam-image-sources-table.eiam-theme-auto .eiam-no-thumbnail {
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
    color: inherit;
}

.eiam-image-sources-table.eiam-theme-auto .eiam-thumbnail-img {
    border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

/* Fallback for browsers without color-mix() support (pre-2023 Safari/Firefox) */
@supports not (color: color-mix(in srgb, red, blue)) {
    .eiam-table-container.eiam-theme-auto {
        border-color: rgba(127, 127, 127, 0.3);
    }
    .eiam-image-sources-table.eiam-theme-auto thead {
        background: rgba(127, 127, 127, 0.08);
    }
    .eiam-image-sources-table.eiam-theme-auto th,
    .eiam-image-sources-table.eiam-theme-auto td {
        border-bottom-color: rgba(127, 127, 127, 0.2);
    }
    .eiam-image-sources-table.eiam-theme-auto tbody tr:hover {
        background: rgba(127, 127, 127, 0.06);
    }
    .eiam-image-sources-table.eiam-theme-auto .eiam-no-thumbnail {
        background: rgba(127, 127, 127, 0.12);
        border-color: rgba(127, 127, 127, 0.25);
    }
    .eiam-image-sources-table.eiam-theme-auto .eiam-thumbnail-img {
        border-color: rgba(127, 127, 127, 0.25);
    }
}

.eiam-image-sources-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.eiam-image-sources-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.eiam-image-sources-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.eiam-image-sources-table tbody tr {
    background: #fff;
}

.eiam-image-sources-table tbody tr:hover {
    background: #f8f9fa;
}

.eiam-image-sources-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table column widths */
.eiam-image-sources-table .eiam-thumbnail {
    width: 80px;
    text-align: center;
}

/* Reset border-radius on all thumbnail column cells, then apply only
   to the left corners of the top (th) and bottom (last td) rows */
.eiam-image-sources-table th.eiam-thumbnail,
.eiam-image-sources-table td.eiam-thumbnail {
    border-radius: 0;
}

.eiam-image-sources-table thead th.eiam-thumbnail {
    border-top-left-radius: 4px;
}

.eiam-image-sources-table tbody tr:last-child td.eiam-thumbnail {
    border-bottom-left-radius: 4px;
}

.eiam-image-sources-table .eiam-title {
    min-width: 150px;
    max-width: 200px;
}

.eiam-image-sources-table .eiam-author {
    min-width: 120px;
}

.eiam-image-sources-table .eiam-license {
    min-width: 120px;
}

.eiam-image-sources-table .eiam-source {
    min-width: 100px;
}

.eiam-image-sources-table .eiam-usage {
    min-width: 150px;
}

/* Table content styles */
.eiam-thumbnail-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.eiam-no-thumbnail {
    width: 60px;
    height: 60px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #646970;
    text-align: center;
    margin: 0 auto;
}

.eiam-title-link,
.eiam-title-text {
    font-weight: 500;
    color: #333;
}

.eiam-title-link:hover {
    color: #0073aa;
    text-decoration: underline;
}

.eiam-no-title {
    color: #646970;
    font-style: italic;
}

.eiam-author-text {
    font-weight: 500;
    color: #333;
}

.eiam-license-link,
.eiam-license-text {
    color: #0073aa;
    font-weight: 500;
}

.eiam-license-link:hover {
    color: #005177;
    text-decoration: underline;
}

.eiam-source-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.eiam-source-link:hover {
    color: #005177;
    text-decoration: underline;
}

.eiam-missing {
    color: #646970;
    font-style: italic;
    font-size: 13px;
}

.eiam-usage-list {
    line-height: 1.4;
}

.eiam-post-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.eiam-post-link:hover {
    color: #005177;
    text-decoration: underline;
}

.eiam-post-link:last-child {
    margin-bottom: 0;
}

/* Text elements */
.eiam-image-sources .eiam-author {
    font-weight: 500;
}

.eiam-image-sources .eiam-title {
    font-style: italic;
}

.eiam-image-sources .eiam-license-wrapper {
    /* License wrapper */
}

.eiam-image-sources .eiam-license {
    /* License link */
}

.eiam-image-sources .eiam-source {
    /* Source link */
}

.eiam-image-sources .eiam-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Links */
.eiam-image-sources a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.eiam-image-sources a:hover {
    color: #005177;
    border-bottom-color: #005177;
}

.eiam-image-sources a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Status badges */
.eiam-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eiam-status-badge.eiam-complete {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.eiam-status-badge.eiam-incomplete {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Thumbnails */
.eiam-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}

.eiam-no-thumbnail {
    width: 50px;
    height: 50px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #646970;
    text-align: center;
    margin-right: 10px;
    vertical-align: middle;
}

/* Block preview styles */
.eiam-block-preview {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
    background: #f8f9fa;
    margin: 8px 0;
}

.eiam-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.eiam-preview-scope {
    font-size: 12px;
    color: #646970;
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
}

.eiam-preview-content {
    /* Preview content */
}

.eiam-preview-text {
    margin: 0 0 8px 0;
    color: #646970;
    font-style: italic;
}

.eiam-preview-attributes {
    font-size: 11px;
    color: #8c8f94;
}

.eiam-show-missing {
    color: #d63638;
}

/* Responsive design */
@media (max-width: 768px) {
    .eiam-image-sources {
        font-size: 13px;
    }
    
    .eiam-image-sources.eiam-ul .eiam-image-list,
    .eiam-image-sources.eiam-ol .eiam-image-list {
        margin-left: 15px;
    }
    
    .eiam-thumbnail,
    .eiam-no-thumbnail {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }
    
    /* Table responsive styles */
    .eiam-image-sources-table {
        font-size: 13px;
    }
    
    .eiam-image-sources-table th,
    .eiam-image-sources-table td {
        padding: 8px 6px;
    }
    
    .eiam-thumbnail-img {
        width: 50px;
        height: 50px;
    }
    
    .eiam-no-thumbnail {
        width: 50px;
        height: 50px;
        font-size: 9px;
    }
    
    .eiam-image-sources-table .eiam-title {
        min-width: 120px;
        max-width: 150px;
    }
    
    .eiam-image-sources-table .eiam-author,
    .eiam-image-sources-table .eiam-license,
    .eiam-image-sources-table .eiam-source {
        min-width: 100px;
    }
    
    .eiam-image-sources-table .eiam-usage {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    /* Card-based responsive table layout */
    .eiam-table-container {
        border: none;
        overflow-x: visible;
    }
    
    .eiam-image-sources-table {
        border: 0;
    }
    
    .eiam-image-sources-table thead {
        display: none;
    }
    
    .eiam-image-sources-table tbody {
        display: block;
    }
    
    .eiam-image-sources-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 12px;
        background: #fff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .eiam-image-sources-table tbody tr:hover {
        background: #f8f9fa !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    
    .eiam-image-sources-table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    .eiam-image-sources-table td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
        position: relative;
        padding-left: 50%;
        min-height: 30px;
    }
    
    .eiam-image-sources-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        font-weight: 600;
        color: #333;
        text-align: left;
    }
    
    .eiam-image-sources-table td.eiam-thumbnail {
        padding-left: 0;
        text-align: left;
        margin-bottom: 8px;
    }
    
    .eiam-image-sources-table td.eiam-thumbnail::before {
        display: none;
    }
    
    .eiam-image-sources-table .eiam-thumbnail-img,
    .eiam-image-sources-table .eiam-no-thumbnail {
        margin: 0;
    }
    
    /* Card layout for dark theme */
    .eiam-image-sources-table.eiam-theme-dark tbody tr {
        background: #0a0a0a !important;
        border-color: #2c2c2c;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .eiam-image-sources-table.eiam-theme-dark tbody tr:hover {
        background: #141414 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }
    
    .eiam-image-sources-table.eiam-theme-dark td::before {
        color: #ffffff;
    }
    
    /* Card layout for auto theme */
    .eiam-image-sources-table.eiam-theme-auto tbody tr {
        background: rgba(255, 255, 255, 0.8) !important;
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .eiam-image-sources-table.eiam-theme-auto tbody tr:hover {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .eiam-image-sources-table.eiam-theme-auto td::before {
        color: inherit;
        opacity: 0.8;
    }
    
    /* Auto theme - Dark mode card support */
    @media (prefers-color-scheme: dark) {
        .eiam-image-sources-table.eiam-theme-auto tbody tr {
            background: rgba(0, 0, 0, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }
        
        .eiam-image-sources-table.eiam-theme-auto tbody tr:hover {
            background: rgba(255, 255, 255, 0.05) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        }
    }
}

@media (max-width: 480px) {
    .eiam-image-sources {
        font-size: 12px;
        margin: 15px 0;
    }
    
    .eiam-image-sources.eiam-ul .eiam-image-list,
    .eiam-image-sources.eiam-ol .eiam-image-list {
        margin-left: 10px;
    }
    
    .eiam-image-sources .eiam-image-item {
        margin-bottom: 6px;
    }
    
    /* Smaller card padding on very small screens */
    .eiam-image-sources-table tbody tr {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .eiam-image-sources-table td {
        padding: 6px 0;
        padding-left: 45%;
        font-size: 12px;
    }
    
    .eiam-image-sources-table td::before {
        font-size: 11px;
        width: 40%;
    }
    
    .eiam-thumbnail-img {
        width: 50px;
        height: 50px;
    }
    
    .eiam-no-thumbnail {
        width: 50px;
        height: 50px;
        font-size: 9px;
    }
    
    .eiam-post-link {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .eiam-image-sources {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .eiam-image-sources a {
        color: #000;
        text-decoration: underline;
    }
    
    .eiam-image-sources a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }
}

/* Dark mode support (applies only when Auto theme is selected) */
@media (prefers-color-scheme: dark) {
    .eiam-image-sources.eiam-theme-auto {
        color: #f0f0f1;
    }
    
    .eiam-image-sources.eiam-theme-auto a {
        color: #72aee6;
    }
    
    .eiam-image-sources.eiam-theme-auto a:hover {
        color: #9ec5e8;
    }
    
    .eiam-image-sources.eiam-theme-auto .eiam-note {
        color: #a7aaad;
    }
    
    .eiam-status-badge.eiam-complete.eiam-theme-auto {
        background: #1e3a1e;
        color: #4a9b4a;
        border-color: #2d5a2d;
    }
    
    .eiam-status-badge.eiam-incomplete.eiam-theme-auto {
        background: #3a1e1e;
        color: #b85450;
        border-color: #5a2d2d;
    }
    
    .eiam-thumbnail.eiam-theme-auto {
        border-color: #3c434a;
    }
    
    .eiam-no-thumbnail.eiam-theme-auto {
        background: #2c3338;
        border-color: #3c434a;
        color: #a7aaad;
    }
    
    /* Table dark mode */
    .eiam-table-container.eiam-theme-auto {
        border-color: #3c434a;
        box-shadow: none;
    }
    
    .eiam-image-sources-table.eiam-theme-auto {
        background: transparent;
        color: #f0f0f1;
    }
    
    .eiam-image-sources-table.eiam-theme-auto thead {
        background: #2c3338;
    }
    
    .eiam-image-sources-table.eiam-theme-auto th {
        color: #f0f0f1;
        border-bottom-color: #3c434a;
    }
    
    .eiam-image-sources-table.eiam-theme-auto td {
        border-bottom-color: #3c434a;
    }
    
    .eiam-image-sources-table.eiam-theme-auto tbody tr:hover {
        background: #2c3338;
    }
    
    .eiam-thumbnail-img.eiam-theme-auto {
        border-color: #3c434a;
    }
    
    .eiam-no-thumbnail.eiam-theme-auto {
        background: #2c3338;
        border-color: #3c434a;
        color: #a7aaad;
    }
    
    .eiam-title-link.eiam-theme-auto,
    .eiam-title-text.eiam-theme-auto {
        color: #f0f0f1;
    }
    
    .eiam-title-link.eiam-theme-auto:hover {
        color: #72aee6;
    }
    
    .eiam-no-title.eiam-theme-auto {
        color: #a7aaad;
    }
    
    .eiam-author-text.eiam-theme-auto {
        color: #f0f0f1;
    }
    
    .eiam-license-link.eiam-theme-auto,
    .eiam-license-text.eiam-theme-auto {
        color: #72aee6;
    }
    
    .eiam-license-link.eiam-theme-auto:hover {
        color: #9ec5e8;
    }
    
    .eiam-source-link.eiam-theme-auto {
        color: #72aee6;
    }
    
    .eiam-source-link.eiam-theme-auto:hover {
        color: #9ec5e8;
    }
    
    .eiam-missing.eiam-theme-auto {
        color: #a7aaad;
    }
    
    .eiam-post-link.eiam-theme-auto {
        color: #72aee6;
    }
    
    .eiam-post-link.eiam-theme-auto:hover {
        color: #9ec5e8;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .eiam-image-sources {
        border: 1px solid currentColor;
        padding: 10px;
    }
    
    .eiam-image-sources a {
        text-decoration: underline;
        font-weight: bold;
    }
    
    .eiam-image-sources .eiam-author {
        font-weight: bold;
    }
    
    .eiam-image-sources .eiam-title {
        font-weight: bold;
    }
    
    .eiam-status-badge {
        border-width: 2px;
        font-weight: bold;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .eiam-image-sources a {
        transition: none;
    }
}

/* Pagination */
.eiam-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 16px 0;
}

.eiam-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.eiam-pagination a:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.eiam-pagination a.eiam-pagination-current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    pointer-events: none;
}

.eiam-pagination a.eiam-pagination-prev,
.eiam-pagination a.eiam-pagination-next {
    padding: 0 16px;
    font-weight: 600;
}

/* Pagination - Explicit Light Theme */
.eiam-pagination.eiam-theme-light a {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

.eiam-pagination.eiam-theme-light a:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.eiam-pagination.eiam-theme-light a.eiam-pagination-current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Pagination - Explicit Dark Theme */
.eiam-pagination.eiam-theme-dark a {
    background: #1a1a1a;
    border-color: #404040;
    color: #e8e8e8;
}

.eiam-pagination.eiam-theme-dark a:hover {
    background: #2c2c2c;
    border-color: #60a5fa;
    color: #60a5fa;
}

.eiam-pagination.eiam-theme-dark a.eiam-pagination-current {
    background: #404040;
    border-color: #404040;
    color: #ffffff;
}

/* Pagination - Auto Theme (inherits from WordPress theme) */
.eiam-pagination.eiam-theme-auto a {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: inherit;
}

.eiam-pagination.eiam-theme-auto a:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}

.eiam-pagination.eiam-theme-auto a.eiam-pagination-current {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

/* Auto pagination - Dark mode support */
@media (prefers-color-scheme: dark) {
    .eiam-pagination.eiam-theme-auto a {
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .eiam-pagination.eiam-theme-auto a:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .eiam-pagination.eiam-theme-auto a.eiam-pagination-current {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* ========================================
   CUSTOM THEME STYLES (CSS Variables)
   ======================================== */

/* Custom Theme - Uses CSS variables set inline */
.eiam-table-container.eiam-theme-custom {
    border-color: var(--eiam-table-border, #e0e0e0);
    background: var(--eiam-table-bg, #ffffff);
}

.eiam-image-sources-table.eiam-theme-custom {
    background: transparent;
    color: var(--eiam-table-text, #333333);
}

.eiam-image-sources-table.eiam-theme-custom thead {
    background: var(--eiam-table-header-bg, #f5f5f5);
}

.eiam-image-sources-table.eiam-theme-custom th {
    color: var(--eiam-table-header-text, #333333);
    border-bottom-color: var(--eiam-table-border, #e0e0e0);
}

.eiam-image-sources-table.eiam-theme-custom td {
    color: var(--eiam-table-text, #333333);
    border-bottom-color: var(--eiam-table-border, #e0e0e0);
}

.eiam-image-sources-table.eiam-theme-custom tbody tr {
    background: var(--eiam-table-row-bg, #ffffff);
}

.eiam-image-sources-table.eiam-theme-custom tbody tr:hover {
    background: var(--eiam-table-row-hover-bg, #f8f9fa);
}

.eiam-image-sources-table.eiam-theme-custom a {
    color: var(--eiam-link-color, #4a4a4a);
}

.eiam-image-sources-table.eiam-theme-custom a:hover {
    color: var(--eiam-link-hover-color, #737373);
}

/* Custom pagination */
.eiam-pagination.eiam-theme-custom {
    background: var(--eiam-pagination-bg, #f5f5f5);
}

.eiam-pagination.eiam-theme-custom a {
    color: var(--eiam-pagination-text, #333333);
    background: var(--eiam-pagination-bg, #f5f5f5);
    border-color: var(--eiam-table-border, #e0e0e0);
}

.eiam-pagination.eiam-theme-custom a:hover {
    background: var(--eiam-pagination-hover-bg, #e0e0e0);
}

.eiam-pagination.eiam-theme-custom a.eiam-pagination-current {
    background: var(--eiam-pagination-active-bg, #007cba);
    color: var(--eiam-pagination-active-text, #ffffff);
    border-color: var(--eiam-pagination-active-bg, #007cba);
}

/* Custom theme - Responsive card view */
@media (max-width: 768px) {
    .eiam-image-sources-table.eiam-theme-custom tbody tr {
        background: var(--eiam-table-row-bg, #ffffff) !important;
        border-color: var(--eiam-table-border, #e0e0e0);
    }
    
    .eiam-image-sources-table.eiam-theme-custom tbody tr:hover {
        background: var(--eiam-table-row-hover-bg, #f8f9fa) !important;
    }
    
    .eiam-image-sources-table.eiam-theme-custom td::before {
        color: var(--eiam-table-header-text, #333333);
    }
}

/* ============================================================
   THEMES FOR UL / OL / INLINE OUTPUT STYLES
   These mirror the table themes so the output style setting
   works consistently across all output formats.
   ============================================================ */

/* --- AUTO theme (list / inline) --- */
.eiam-image-sources.eiam-theme-auto {
    color: inherit;
    background: transparent;
}
.eiam-image-sources.eiam-theme-auto .eiam-prefix {
    color: inherit;
    opacity: 0.85;
}
.eiam-image-sources.eiam-theme-auto a {
    color: inherit;
}
.eiam-image-sources.eiam-theme-auto .eiam-license,
.eiam-image-sources.eiam-theme-auto .eiam-source,
.eiam-image-sources.eiam-theme-auto .eiam-author {
    color: inherit;
}
/* --- LIGHT theme (list / inline) --- */
.eiam-image-sources.eiam-theme-light {
    color: #333;
    background: transparent;
}
.eiam-image-sources.eiam-theme-light .eiam-prefix {
    color: #1d2327;
}
.eiam-image-sources.eiam-theme-light a {
    color: #2271b1;
    text-decoration: underline;
    text-decoration-color: rgba(34, 113, 177, 0.4);
}
.eiam-image-sources.eiam-theme-light a:hover {
    color: #135e96;
    text-decoration-color: currentColor;
}
.eiam-image-sources.eiam-theme-light .eiam-author {
    font-weight: 500;
    color: #1d2327;
}
.eiam-image-sources.eiam-theme-light .eiam-license-wrapper {
    color: #50575e;
}
/* --- DARK theme (list / inline) --- */
.eiam-image-sources.eiam-theme-dark {
    color: #e8e8e8;
    background: transparent;
}
.eiam-image-sources.eiam-theme-dark .eiam-prefix {
    color: #ffffff;
}
.eiam-image-sources.eiam-theme-dark a {
    color: #7eb6ff;
    text-decoration: underline;
    text-decoration-color: rgba(126, 182, 255, 0.4);
}
.eiam-image-sources.eiam-theme-dark a:hover {
    color: #b3d4ff;
    text-decoration-color: currentColor;
}
.eiam-image-sources.eiam-theme-dark .eiam-author {
    font-weight: 500;
    color: #ffffff;
}
.eiam-image-sources.eiam-theme-dark .eiam-license-wrapper {
    color: #a3a3a3;
}
/* --- CUSTOM theme (list / inline) --- */
.eiam-image-sources.eiam-theme-custom {
    color: var(--eiam-table-text, #333333);
    background: transparent;
}
.eiam-image-sources.eiam-theme-custom .eiam-prefix {
    color: var(--eiam-table-text, #333333);
}
.eiam-image-sources.eiam-theme-custom a {
    color: var(--eiam-link-color, #4a4a4a);
}
.eiam-image-sources.eiam-theme-custom a:hover {
    color: var(--eiam-link-hover-color, #737373);
}
.eiam-image-sources.eiam-theme-custom .eiam-author {
    font-weight: 500;
    color: var(--eiam-table-text, #333333);
}
