/**
 * Admin styles for ReplicateWP Virtual Try-On
 */

/* Dashboard Stats */
.rwpvto-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.rwpvto-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rwpvto-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rwpvto-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.rwpvto-stat-card:hover::before {
    opacity: 1;
}

/* Stat Card Color Variants */
.rwpvto-stat-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rwpvto-stat-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.rwpvto-stat-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.rwpvto-stat-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.rwpvto-stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rwpvto-stat-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.rwpvto-stat-content {
    flex: 1;
    color: #fff;
}

.rwpvto-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rwpvto-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Images Grid */
.rwpvto-dashboard-content {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.rwpvto-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rwpvto-dashboard-header h2 {
    margin: 0;
}

/* Search and Filters */
.rwpvto-filters {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 1200px;
}

.rwpvto-filter-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.rwpvto-search-box {
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 300px;
}

.rwpvto-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.rwpvto-search-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.rwpvto-filter-select {
    padding: 10px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 14px;
    min-width: 160px;
    max-width: 200px;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rwpvto-filter-select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.rwpvto-filter-form .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: auto;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.rwpvto-filter-form .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rwpvto-filter-form .button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 0;
}

.rwpvto-results-count {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.rwpvto-view-toggle {
    display: flex;
    gap: 5px;
    background: #f0f0f1;
    padding: 3px;
    border-radius: 6px;
}

.rwpvto-view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #50575e;
}

.rwpvto-view-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.rwpvto-view-btn.active {
    background: #fff;
    color: #2271b1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rwpvto-view-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Grid View - 8 columns */
.rwpvto-images-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* List View */
.rwpvto-images-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rwpvto-image-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.rwpvto-image-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Grid View Card */
.rwpvto-images-grid:not(.list-view) .rwpvto-image-card {
    display: flex;
    flex-direction: column;
}

.rwpvto-image-preview {
    position: relative;
    padding-bottom: 133%;
    overflow: hidden;
    background: #f5f5f5;
}

.rwpvto-image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rwpvto-image-info {
    padding: 15px;
}

.rwpvto-image-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rwpvto-image-title a {
    text-decoration: none;
    color: #2271b1;
}

.rwpvto-image-title a:hover {
    color: #135e96;
}

.rwpvto-image-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.rwpvto-meta-item {
    display: block;
    margin-bottom: 5px;
}

.rwpvto-image-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.rwpvto-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    color: #2c3338;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rwpvto-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #8c8f94;
}

.rwpvto-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rwpvto-action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    line-height: 1;
}

/* View button - Blue/Info style */
.rwpvto-view-image-btn {
    border-color: #72aee6;
    color: #2271b1;
    background: #f0f6fc;
}

.rwpvto-view-image-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.rwpvto-view-image-btn:hover .dashicons {
    color: #fff;
}

/* Add to Gallery button - Green/Success style */
.rwpvto-add-to-gallery-btn {
    border-color: #68de7c;
    color: #00a32a;
    background: #f0f6f0;
}

.rwpvto-add-to-gallery-btn:hover {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

.rwpvto-add-to-gallery-btn:hover .dashicons {
    color: #fff;
}

.rwpvto-add-to-gallery-btn.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Delete button - Red/Danger style */
.rwpvto-action-btn-danger {
    border-color: #f86368;
    color: #d63638;
    background: #fef0f1;
}

.rwpvto-action-btn-danger:hover {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.rwpvto-action-btn-danger:hover .dashicons {
    color: #fff;
}

.rwpvto-action-btn-danger.confirm-delete {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
    animation: rwpvto-pulse 0.5s ease-in-out;
}

.rwpvto-action-btn-danger.confirm-delete:hover {
    background: #a32929;
    border-color: #a32929;
}

@keyframes rwpvto-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* List View Card */
.rwpvto-images-grid.list-view .rwpvto-image-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.rwpvto-images-grid.list-view .rwpvto-image-preview {
    position: relative;
    padding-bottom: 0;
    width: 80px;
    min-width: 80px;
    height: 100px;
    flex-shrink: 0;
}

.rwpvto-images-grid.list-view .rwpvto-image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rwpvto-images-grid.list-view .rwpvto-image-info {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
}

.rwpvto-images-grid.list-view .rwpvto-image-title {
    flex: 0 0 200px;
    margin-bottom: 0;
    font-size: 14px;
}

.rwpvto-images-grid.list-view .rwpvto-image-meta {
    flex: 1;
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.rwpvto-images-grid.list-view .rwpvto-meta-item {
    display: inline-block;
    margin-bottom: 0;
    font-size: 12px;
}

.rwpvto-images-grid.list-view .rwpvto-image-actions {
    flex-shrink: 0;
    gap: 8px;
}


.rwpvto-no-images {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Product Meta Box */
.rwpvto-product-meta {
    padding: 10px 0;
}

.rwpvto-form-group {
    margin-bottom: 15px;
}

.rwpvto-form-group label {
    display: block;
    margin-bottom: 5px;
}

.rwpvto-form-group select,
.rwpvto-form-group input[type="text"],
.rwpvto-form-group input[type="url"],
.rwpvto-form-group .widefat {
    max-width: 500px;
    width: 100%;
}

.rwpvto-form-group .button {
    max-width: 500px;
}

.rwpvto-open-model-picker {
    width: auto !important;
}

.rwpvto-generate-btn,
.rwpvto-generate-btn.button-large,
.rwpvto-generate-btn.button-primary {
    width: auto !important;
    max-width: 500px;
    display: inline-block !important;
}

.rwpvto-form-actions {
    margin-top: 20px;
}

.rwpvto-form-actions .button,
.rwpvto-form-actions .button.button-large,
.rwpvto-form-actions .button.button-primary {
    width: auto !important;
    max-width: 500px;
    display: inline-block !important;
}

/* Very specific override for the generate button */
.rwpvto-product-meta .rwpvto-form-actions .rwpvto-generate-btn.button.button-primary.button-large {
    width: auto !important;
    max-width: 500px !important;
    display: inline-block !important;
}

.rwpvto-validation-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: rwpvto-shake 0.5s ease-in-out;
}

@keyframes rwpvto-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.rwpvto-validation-notice .dashicons {
    color: #ffc107;
    flex-shrink: 0;
}

.rwpvto-generate-btn {
    width: 100%;
    height: auto;
    padding: 10px 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rwpvto-generate-btn .dashicons {
    margin: 0;
    vertical-align: middle;
}

.rwpvto-generate-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.rwpvto-result {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    animation: rwpvto-fade-in 0.3s ease-in;
}

@keyframes rwpvto-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rwpvto-result.loading {
    background: #e8f4fd;
    border: 1px solid #72aee6;
    border-left: 4px solid #2271b1;
}

.rwpvto-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #00a32a;
}

.rwpvto-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #d63638;
}

.rwpvto-result-message {
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.6;
}

.rwpvto-result-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rwpvto-product-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rwpvto-product-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rwpvto-product-actions .button .dashicons {
    margin-top: 2px;
}

.rwpvto-previous-images {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.rwpvto-previous-images h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.rwpvto-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rwpvto-thumbnail {
    width: 80px;
    height: 100px;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.rwpvto-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rwpvto-thumbnail-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    padding: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.rwpvto-thumbnail:hover .rwpvto-thumbnail-actions {
    opacity: 1;
}

.rwpvto-thumbnail-actions .button {
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.5;
    min-height: 0;
}

/* Settings Page */
.rwpvto-test-connection {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.rwpvto-test-result {
    margin-left: 10px;
    font-weight: 500;
}

.rwpvto-test-result.success {
    color: #00a32a;
}

.rwpvto-test-result.error {
    color: #d63638;
}

/* Notice */
.rwpvto-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.rwpvto-notice p {
    margin: 0;
}

/* Inline notices for cards */
.rwpvto-inline-notice {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: rwpvto-slide-down 0.3s ease-out;
}

@keyframes rwpvto-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rwpvto-inline-notice .dashicons {
    flex-shrink: 0;
    margin-top: 1px;
}

.rwpvto-inline-notice.rwpvto-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rwpvto-inline-notice.rwpvto-notice-success .dashicons {
    color: #00a32a;
}

.rwpvto-inline-notice.rwpvto-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.rwpvto-inline-notice.rwpvto-notice-error .dashicons {
    color: #d63638;
}

/* Loading Spinner */
.rwpvto-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: rwpvto-spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes rwpvto-spin {
    to { transform: rotate(360deg); }
}

/* Spinning dashicon for generate button */
.rwpvto-spinning {
    animation: rwpvto-spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.rwpvto-generate-btn.loading {
    opacity: 1 !important;
    cursor: wait !important;
}

/* Image Preview */
.rwpvto-image-preview-container {
    margin-top: 10px;
}

.rwpvto-thumbnail-preview {
    display: none;
    max-width: 150px;
    max-height: 200px;
    width: auto;
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    background: #fff;
    object-fit: contain;
}

.rwpvto-thumbnail-preview.visible {
    display: block;
}

/* Modal for viewing images */
.rwpvto-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.rwpvto-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    padding: 20px;
}

.rwpvto-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.rwpvto-modal-close:hover,
.rwpvto-modal-close:focus {
    color: #bbb;
}

/* Visual Model Picker Modal */
.rwpvto-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rwpvto-fade-in 0.2s ease-out;
}

.rwpvto-picker-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.rwpvto-picker-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: rwpvto-scale-in 0.3s ease-out;
}

@keyframes rwpvto-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rwpvto-picker-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #ddd;
}

.rwpvto-picker-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
}

.rwpvto-picker-modal-close {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #666;
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s ease;
}

.rwpvto-picker-modal-close:hover {
    color: #d63638;
}

.rwpvto-picker-modal-close .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.rwpvto-picker-modal-filters {
    padding: 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.rwpvto-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rwpvto-filter-btn {
    padding: 8px 16px;
    border: 1px solid #c3c4c7;
    background: #fff;
    color: #2c3338;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.rwpvto-filter-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f6fc;
}

.rwpvto-filter-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.rwpvto-filter-btn.active:hover {
    background: #135e96;
    border-color: #135e96;
}

.rwpvto-picker-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.rwpvto-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.rwpvto-model-item {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.rwpvto-model-item:hover {
    border-color: #72aee6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rwpvto-model-item.selected {
    border-color: #2271b1;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.3);
}

.rwpvto-model-thumbnail {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #fff;
}

.rwpvto-model-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rwpvto-model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 113, 177, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rwpvto-model-item.selected .rwpvto-model-overlay {
    opacity: 1;
}

.rwpvto-model-overlay .dashicons {
    color: #fff;
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.rwpvto-model-label {
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #1e1e1e;
    text-align: center;
    line-height: 1.4;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.rwpvto-model-item:hover .rwpvto-model-label {
    background: #fff;
}

.rwpvto-model-item.selected .rwpvto-model-label {
    background: #2271b1;
    color: #fff;
    border-top-color: #2271b1;
}

.rwpvto-open-model-picker {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    border: 2px dashed #c3c4c7 !important;
    background: #f6f7f7 !important;
    transition: all 0.2s ease;
}

.rwpvto-open-model-picker:hover {
    border-color: #2271b1 !important;
    background: #fff !important;
    color: #2271b1;
}

.rwpvto-open-model-picker.has-selection {
    border-style: solid !important;
    border-color: #00a32a !important;
    background: #f0f6fc !important;
}

#rwpvto_selected_model_text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
}

/* Responsive */
@media screen and (max-width: 1600px) {
    .rwpvto-images-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 1200px) {
    .rwpvto-images-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .rwpvto-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .rwpvto-stats {
        grid-template-columns: 1fr;
    }
    
    .rwpvto-stat-card {
        padding: 20px;
    }
    
    .rwpvto-stat-value {
        font-size: 32px;
    }
    
    .rwpvto-stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .rwpvto-stat-icon .dashicons {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .rwpvto-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .rwpvto-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rwpvto-images-grid.list-view .rwpvto-image-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rwpvto-images-grid.list-view .rwpvto-image-title {
        flex: 1;
    }
    
    .rwpvto-images-grid.list-view .rwpvto-image-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .rwpvto-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rwpvto-search-box {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
    
    .rwpvto-filter-select {
        width: 100%;
        max-width: 100%;
    }
    
    .rwpvto-filter-form .button {
        width: 100%;
        justify-content: center;
    }
    .rwpvto-model-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .rwpvto-picker-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .rwpvto-picker-modal-header {
        padding: 15px 20px;
    }
    
    .rwpvto-picker-modal-body {
        padding: 20px;
    }
}

/* ===================================
   Settings Page Styles
   =================================== */

.rwpvto-settings-wrap {
    max-width: 1400px;
}

.rwpvto-settings-wrap .wp-heading-inline {
    display: flex;
    align-items: center;
    color: #1e1e1e;
    margin-bottom: 15px;
}

/* WordPress Admin Notices in Settings */
.rwpvto-settings-wrap .notice,
.rwpvto-settings-wrap .updated,
.rwpvto-settings-wrap .error {
    margin: 20px 0;
    padding: 12px 16px;
    border-left: 4px solid #00a32a;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 0 4px 4px 0;
}

.rwpvto-settings-wrap .notice.notice-success,
.rwpvto-settings-wrap .updated {
    border-left-color: #00a32a;
}

.rwpvto-settings-wrap .notice.notice-error,
.rwpvto-settings-wrap .error {
    border-left-color: #d63638;
}

.rwpvto-settings-wrap .notice.notice-warning {
    border-left-color: #dba617;
}

.rwpvto-settings-wrap .notice p {
    margin: 0.5em 0;
    font-size: 14px;
    line-height: 1.5;
}

.rwpvto-settings-wrap .notice .dashicons {
    margin-right: 5px;
}

.rwpvto-settings-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    margin-top: 24px;
}

/* Settings Cards */
.rwpvto-settings-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.rwpvto-settings-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.rwpvto-settings-card-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.rwpvto-settings-card-header h2,
.rwpvto-settings-card-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e1e1e;
}

.rwpvto-settings-card-header h2 .dashicons,
.rwpvto-settings-card-header h3 .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #667eea;
}

.rwpvto-settings-card-header .description {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.rwpvto-settings-card-body {
    padding: 24px;
}

/* Hide WordPress default settings table styles */
.rwpvto-settings-card-body table,
.rwpvto-settings-card-body tbody,
.rwpvto-settings-card-body tr,
.rwpvto-settings-card-body th {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}

.rwpvto-settings-card-body th {
    display: none;
}

.rwpvto-settings-card-body td {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Field Groups */
.rwpvto-settings-card-body .form-table tr {
    margin-bottom: 28px;
}

.rwpvto-settings-card-body .form-table tr:last-child {
    margin-bottom: 0;
}

.rwpvto-field-group {
    margin-bottom: 28px;
    width: 100%;
}

.rwpvto-field-group:last-child {
    margin-bottom: 0;
}

.rwpvto-field-group label {
    display: block;
    margin-bottom: 10px;
    color: #1e1e1e;
    font-size: 14px;
}

.rwpvto-field-group label strong {
    font-weight: 600;
}

.rwpvto-field-group .description {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* Ensure inputs take full width in our layout */
.rwpvto-field-group input[type="text"],
.rwpvto-field-group input[type="password"],
.rwpvto-field-group input[type="number"],
.rwpvto-field-group select {
    max-width: 100%;
}

.rwpvto-field-group .large-text {
    width: 100%;
}

.rwpvto-field-group .regular-text {
    width: 100%;
    max-width: 400px;
}

/* Input Group (for API key with toggle) */
.rwpvto-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 600px;
}

.rwpvto-input-group input {
    flex: 1;
    min-width: 0;
}

.rwpvto-toggle-api-key {
    padding: 0 12px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.rwpvto-toggle-api-key .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Range slider styling */
input[type="range"]#rwpvto_steps_range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
}

input[type="range"]#rwpvto_steps_range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]#rwpvto_steps_range::-webkit-slider-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

input[type="range"]#rwpvto_steps_range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]#rwpvto_steps_range::-moz-range-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

/* Badges */
.rwpvto-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rwpvto-badge-recommended {
    background: #e7f3ff;
    color: #0073aa;
}

.rwpvto-badge-advanced {
    background: #fff3cd;
    color: #856404;
}

/* Status Card */
.rwpvto-status-card .rwpvto-settings-card-body {
    text-align: center;
}

.rwpvto-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
}

.rwpvto-status-indicator.connected {
    background: #e7f7ed;
    color: #2e7d32;
}

.rwpvto-status-indicator.disconnected {
    background: #fef3e8;
    color: #c65c00;
}

.rwpvto-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.rwpvto-status-indicator.connected .rwpvto-status-dot {
    background: #2e7d32;
}

.rwpvto-status-indicator.disconnected .rwpvto-status-dot {
    background: #c65c00;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Quick Links */
.rwpvto-quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rwpvto-quick-links li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.rwpvto-quick-links li:last-child {
    border-bottom: none;
}

.rwpvto-quick-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.rwpvto-quick-links a:hover {
    color: #005a87;
    padding-left: 8px;
}

.rwpvto-quick-links a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Info Card */
.rwpvto-info-card .rwpvto-settings-card-body {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

.rwpvto-price-display {
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 14px;
}

.rwpvto-price-display strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

/* Test Connection Button */
.rwpvto-test-api-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rwpvto-test-api-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Test Result Styling */
.rwpvto-test-result {
    display: block;
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

.rwpvto-test-result.success {
    background: #e7f7ed;
    color: #2e7d32;
    border: 1px solid #c3e6cb;
}

.rwpvto-test-result.error {
    background: #fef3e8;
    color: #c65c00;
    border: 1px solid #ffeaa7;
}

/* Save Button */
#rwpvto-settings-form .submit {
    margin: 0;
    padding: 0;
}

#rwpvto-settings-form .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 12px 32px !important;
    font-size: 15px !important;
    font-weight: 600;
    border-radius: 8px !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease;
    height: auto !important;
}

#rwpvto-settings-form .button-primary:hover,
#rwpvto-settings-form .button-primary:focus {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8a 100%) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px);
}

/* Responsive Settings */
@media (max-width: 1280px) {
    .rwpvto-settings-grid {
        grid-template-columns: 1fr 300px;
        gap: 20px;
    }
}

@media (max-width: 960px) {
    .rwpvto-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .rwpvto-settings-sidebar {
        order: 2;
    }
}

