.swpiam-margin-top-0 {
    margin-top: 0px !important;
}
.swpiam-margin-top-10 {
    margin-top: 10px !important;
}
.swpiam-margin-top-20 {
    margin-top: 20px !important;
}
.swpiam-margin-top-30 {
    margin-top: 30px !important;
}
.swpiam-margin-top-40 {
    margin-top: 40px !important;
}
.swpiam-margin-top-50 {
    margin-top: 50px !important;
}
.swpiam-margin-bottom-0 {
    margin-bottom: 0px !important;
}
.swpiam-margin-bottom-10 {
    margin-bottom: 10px !important;
}
.swpiam-margin-bottom-20 {
    margin-bottom: 20px !important;
}
.swpiam-margin-bottom-30 {
    margin-bottom: 30px !important;
}
.swpiam-margin-bottom-40 {
    margin-bottom: 40px !important;
}
.swpiam-margin-bottom-50 {
    margin-bottom: 50px !important;
}

/* Style lists only on your plugin pages - increased specificity to override WordPress core */

.swpiam-plugin-page .swpiam-instructions ul {
    list-style: disc !important;
    list-style-type: disc !important;
    margin-left: 15px !important;
}

.swpiam-instructions {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.swpiam-instructions h2 {
    margin-top: 0;
    color: #23282d;
}

.swpiam-instructions pre {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    overflow-x: auto;
    font-size: 12px;
}

.swpiam-csv-example {
    margin: 15px 0;
}

.swpiam-csv-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-bottom: 10px;
}

.swpiam-csv-table th {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    font-weight: bold;
    color: #333;
}

.swpiam-csv-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    word-break: break-all;
    max-width: 300px;
}

.swpiam-csv-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.swpiam-csv-table tbody tr:hover {
    background: #f0f0f0;
}

.swpiam-csv-note {
    font-size: 11px;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

#swpiam-progress-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

#swpiam-progress-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#swpiam-progress-bar {
    width: 100%;
    height: 24px;
    border-radius: 12px;
    transition: width 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    margin-bottom: 10px;
}

#swpiam-progress-bar::-webkit-progress-bar {
    background-color: #f0f0f0;
    border-radius: 12px;
}

#swpiam-progress-bar::-webkit-progress-value {
    background-color: #0073aa;
    border-radius: 12px;
    transition: width 0.3s ease;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-bar-stripes 1s linear infinite;
}

#swpiam-progress-bar::-moz-progress-bar {
    background-color: #0073aa;
    border-radius: 12px;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

#swpiam-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #50575e;
}

#swpiam-progress-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

#swpiam-progress-wrapper[data-complete="true"] #swpiam-progress-text::after {
    display: none;
}

#swpiam-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#swpiam-completion-message {
    margin-top: 20px;
}

#swpiam-log-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#swpiam-log {
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
}

.swpiam-log-success {
    color: #46b450;
}

.swpiam-log-error {
    color: #dc3232;
}

.swpiam-log-summary {
    font-weight: bold;
    color: #0073aa;
    border-top: 1px solid #ccc;
    padding-top: 5px;
    margin-top: 5px;
}

.swpiam-log-info {
    color: #666;
    font-style: italic;
}

#swpiam-loading {
    color: #0073aa;
    font-style: italic;
    margin-left: 10px;
}

/* AI Settings Styles */
.swpiam-ai-notice {
    background: #e7f3ff;
    border: 1px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.swpiam-ai-notice h3 {
    margin-top: 0;
    color: #0073aa;
}

.swpiam-ai-example {
    background: #f0f8ff;
    font-style: italic;
}

.swpiam-ai-example td {
    color: #666;
}

.swpiam-costs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: #fff;
    margin-top: 15px;
}

.swpiam-costs-table th {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    font-weight: bold;
    color: #333;
}

.swpiam-costs-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.swpiam-costs-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.swpiam-ai-costs {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.swpiam-ai-costs h3 {
    margin-top: 0;
    color: #23282d;
}

/* Dashboard Styles */
.swpiam-dashboard {
    margin-top: 20px;
}

.swpiam-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
/* Tablet */
@media (min-width: 768px) {
    .swpiam-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.swpiam-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swpiam-stat-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swpiam-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
}

.swpiam-stat-coverage {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
}

.swpiam-action-cards {
    display: grid;
    grid-template-columns: 1fr; /* Mobile default */
    gap: 20px;
    margin-bottom: 30px;
}
/* Tablet */
@media (min-width: 768px) {
    .swpiam-action-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Desktop */
@media (min-width: 1400px) {
    .swpiam-action-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.swpiam-action-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swpiam-action-card h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 18px;
}

.swpiam-action-card p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.swpiam-quick-actions {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.swpiam-quick-actions h3 {
    margin: 0 0 10px 0;
    color: #23282d;
}

.swpiam-quick-buttons {
    margin-top: 15px;
}

.swpiam-quick-buttons .button {
    margin-right: 10px;
}

.swpiam-ai-note {
    margin-top: 10px;
    color: #666;
    font-size: 12px;
}

/* Tab Styles */
.swpiam-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.swpiam-tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    margin-right: 5px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.swpiam-tab-button.active {
    border-bottom-color: #0073aa;
    color: #0073aa;
}

.swpiam-tab-button:hover {
    background: #f9f9f9;
}

.swpiam-tab-content {
    display: none;
}

.swpiam-tab-content.active {
    display: block;
}

/* AI Image Grid Styles */
.swpiam-ai-controls {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.swpiam-ai-bulk-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.swpiam-ai-bulk-actions label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.swpiam-selected-count {
    color: #666;
    font-size: 14px;
}

.swpiam-ai-settings {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swpiam-ai-settings label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin: 0;
}

.swpiam-ai-settings select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    font-size: 13px;
    min-width: 200px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}

.swpiam-ai-settings select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.swpiam-image-item.has-alt-text {
    border-left: 4px solid #46b450;
}

.swpiam-image-item.no-alt-text {
    border-left: 4px solid #dc3232;
}

.swpiam-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.swpiam-image-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.swpiam-image-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.swpiam-image-item.selected {
    border-color: #0073aa;
    background: #f0f8ff;
}

.swpiam-image-checkbox {
    margin-bottom: 10px;
}

.swpiam-image-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.swpiam-image-thumbnail {
    text-align: center;
    margin-bottom: 10px;
}

.swpiam-image-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 120px;
    object-fit: cover;
}

.swpiam-image-info {
    text-align: center;
}

.swpiam-image-filename {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
    font-size: 12px;
}

.swpiam-image-alt {
    color: #666;
    font-size: 11px;
    line-height: 1.3;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swpiam-no-images {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.swpiam-pagination {
    text-align: center;
    margin-top: 30px;
}

.swpiam-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    border-radius: 4px;
}

.swpiam-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.swpiam-pagination .page-numbers:hover {
    background: #f9f9f9;
}

/* AI Progress Styles */
#swpiam-ai-progress-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

#swpiam-ai-progress-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#swpiam-ai-progress-bar {
    width: 100%;
    height: 24px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 10px;
}

#swpiam-ai-progress-bar::-webkit-progress-bar {
    background-color: #f0f0f0;
    border-radius: 12px;
}

#swpiam-ai-progress-bar::-webkit-progress-value {
    background-color: #0073aa;
    border-radius: 12px;
    transition: width 0.3s ease;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-bar-stripes 1s linear infinite;
}

#swpiam-ai-progress-bar::-moz-progress-bar {
    background-color: #0073aa;
    border-radius: 12px;
}

#swpiam-ai-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #50575e;
}

#swpiam-ai-progress-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

#swpiam-ai-progress-wrapper[data-complete="true"] #swpiam-ai-progress-text::after {
    display: none;
}

#swpiam-ai-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
}

#swpiam-ai-completion-message {
    margin-top: 20px;
}

#swpiam-ai-log-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#swpiam-ai-log {
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
}

/* Sync Log Styles */
#swpiam-sync-log-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#swpiam-sync-log {
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
}

/* Sync Progress Styles */
#swpiam-sync-progress-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

#swpiam-sync-progress-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#swpiam-sync-progress-bar {
    width: 100%;
    height: 24px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 10px;
}

#swpiam-sync-progress-bar::-webkit-progress-bar {
    background-color: #f0f0f0;
    border-radius: 12px;
}

#swpiam-sync-progress-bar::-webkit-progress-value {
    background-color: #0073aa;
    border-radius: 12px;
    transition: width 0.3s ease;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-bar-stripes 1s linear infinite;
}

#swpiam-sync-progress-bar::-moz-progress-bar {
    background-color: #0073aa;
    border-radius: 12px;
}

#swpiam-sync-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #50575e;
}

#swpiam-sync-progress-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

#swpiam-sync-progress-wrapper[data-complete="true"] #swpiam-sync-progress-text::after {
    display: none;
}

#swpiam-sync-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
}

/* Hide API key rows by default - JavaScript will show the correct one */
.swpiam-api-key-row {
    display: none;
}

/* Show the active API key row (set by PHP based on current provider) */
.swpiam-api-key-row.swpiam-api-key-active {
    display: table-row;
}

/* Disabled checkbox styling */
input[type="checkbox"]:disabled + label,
label:has(input[type="checkbox"]:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Menu icon CSS - WordPress menu icons should be 20x20px */
#toplevel_page_swpiam-admin-page .wp-menu-image img,
#toplevel_page_swpiam-admin-page .wp-menu-image svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}