/* Virtual Staging Modal Base */



/* Make result grid horizontally scrollable */
#vs-result-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    scroll-behavior: smooth !important;
}

/* Keep result items at fixed size */
.vs-result-item {
    flex-shrink: 0 !important;
    width: 150px !important;
    height: 150px !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 3px solid transparent !important;
    transition: all 0.3s ease !important;
}

.vs-result-item.selected {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

.vs-result-item:hover {
    border-color: #2196F3 !important;
    transform: scale(1.05) !important;
}

.vs-result-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Scrollbar styling */
#vs-result-grid::-webkit-scrollbar {
    height: 8px !important;
}

#vs-result-grid::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

#vs-result-grid::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
}

#vs-result-grid::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}


/* Add these styles to your existing virtual-staging.css */
/* Add to your CSS file */
.vs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.vs-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C09A50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vs-loading p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.vs-loading small {
    font-size: 13px;
    color: #999;
}

.vs-loading ul {
    list-style: none;
    padding: 0;
}

.vs-loading ul li {
    padding: 5px 0;
    color: #666;
}

.vs-loading ul li:before {
    content: "• ";
    color: #C09A50;
    font-weight: bold;
    margin-right: 8px;
}
/* Mode Description */
.vs-mode-description {
    padding: 10px;
    background: rgba(192, 154, 80, 0.1);
    border-left: 3px solid #C09A50;
    border-radius: 4px;
    margin-top: -8px;
}

.vs-mode-description p {
    margin: 0;
    font-size: 12px;
    color: #C09A50;
    line-height: 1.4;
}

/* Mask Instructions */
.vs-mask-instructions {
    padding: 12px;
    background: rgba(192, 154, 80, 0.15);
    border: 1px solid #C09A50;
    border-radius: 6px;
    margin-top: 10px;
}

.vs-instruction-box {
    display: flex;
    gap: 8px;
    color: #C09A50;
    font-size: 12px;
    line-height: 1.5;
}

.vs-instruction-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.vs-instruction-box ol {
    margin: 4px 0 0 0;
    padding-left: 20px;
}

.vs-instruction-box li {
    margin: 2px 0;
}

/* Improved Mask Mode Buttons */
.vs-mask-mode button {
    padding: 10px 18px;
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vs-mask-mode button:hover {
    background: rgba(192, 154, 80, 0.1);
    transform: translateY(-1px);
}

.vs-mask-mode button.active {
    background: #C09A50;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(192, 154, 80, 0.3);
}

.vs-mask-mode button svg {
    flex-shrink: 0;
}

/* Better Canvas Container */
.vs-canvas-container {
    position: relative;
    flex: 1;
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: calc(100vh - 250px);
    border: 2px solid #333;
}

.vs-canvas-container canvas {
    display: block;
    cursor: none;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Improved Brush Cursor */
.vs-brush-cursor {
    position: absolute;
    border: 2px solid #C09A50;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    background: rgba(192, 154, 80, 0.2);
    box-shadow: 
        0 0 0 2px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(192, 154, 80, 0.5),
        inset 0 0 10px rgba(192, 154, 80, 0.3);
    z-index: 1000;
    transition: width 0.05s ease, height 0.05s ease;
}

/* Brush Preview Improvements */
.vs-brush-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 300px;
    position: relative;
    height: 60px;
    padding: 10px 0;
}

.vs-brush-slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    background: linear-gradient(to right, #C09A50 0%, #C09A50 50%, #333 50%, #333 100%);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background 0.1s ease;
}

.vs-brush-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.vs-brush-slider-container input[type="range"]::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.vs-brush-slider-container input[type="range"]:hover {
    height: 10px;
}

.vs-brush-preview {
    position: absolute;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    left: 0;
    top: 50%;
    transition: left 0.05s ease;
}

.vs-brush-preview-circle {
    border: 3px solid #C09A50;
    border-radius: 50%;
    transition: all 0.1s ease;
    background: rgba(192, 154, 80, 0.15);
    box-shadow: 
        0 0 0 2px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(192, 154, 80, 0.4);
}

/* Mask Action Buttons */
.vs-mask-actions {
    display: flex;
    gap: 10px;
}

.vs-mask-actions button {
    padding: 10px 24px;
    background: #C09A50;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.vs-mask-actions button:hover:not(:disabled) {
    background: #d4ab63;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 154, 80, 0.3);
}

.vs-mask-actions button:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.vs-mask-actions .vs-btn-reset {
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
}

.vs-mask-actions .vs-btn-reset:hover {
    background: rgba(192, 154, 80, 0.1);
    color: #C09A50;
}

/* Edit Mask Overlay Button */
.vs-edit-mask-overlay-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(192, 154, 80, 0.95);
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.vs-edit-mask-overlay-btn:hover {
    background: #C09A50;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Mask Tools Layout Improvements */
.vs-mask-tools {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* No hover effects on canvas container */

/* Smooth transitions */
.vs-mask-editor-overlay {
    transition: opacity 0.2s ease;
}

.vs-mask-editor-overlay[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.vs-mask-editor-overlay[style*="display: flex"] {
    opacity: 1;
    pointer-events: all;
}

/* Loading state for buttons */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

button:disabled {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive adjustments for mask editor */
@media (max-width: 1024px) {
    .vs-mask-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .vs-brush-slider-container {
        max-width: 100%;
    }
    
    .vs-mask-mode {
        width: 100%;
        justify-content: center;
    }
    
    .vs-mask-actions {
        width: 100%;
    }
    
    .vs-mask-actions button {
        flex: 1;
    }
}
/* Style Selection Modal */
.vs-style-selection-modal {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vs-style-selection-content {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vs-style-selection-modal select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 154, 80, 0.3);
}
.vs-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.vs-modal-content {
    background-color: #1a1a1a;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.vs-modal-header {
    padding: 15px 30px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.vs-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #C09A50;
}

.vs-close {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.vs-close:hover {
    color: #C09A50;
}

.vs-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Two Column Layout */
.vs-two-column-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
    padding: 20px;
    height: 100%;
    overflow: hidden;
}

/* Left Column - Original + Controls */
.vs-left-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.vs-original-section {
    background: #0f0f0f;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

.vs-original-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #C09A50;
}

.vs-original-section img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

/* Controls */
.vs-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #0f0f0f;
    border-radius: 8px;
    border: 1px solid #333;
}

.vs-control-group {
    display: flex;
    flex-direction: column;
}

.vs-control-group label {
    font-size: 12px;
    font-weight: 500;
    color: #C09A50;
    margin-bottom: 6px;
}

.vs-control-group select {
    width: 100%;
    padding: 8px 10px;
    background: #1a1a1a;
    border: 1px solid #C09A50;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.vs-control-group select:focus {
    outline: none;
    border-color: #C09A50;
    box-shadow: 0 0 0 2px rgba(192, 154, 80, 0.2);
}

.vs-control-group input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #C09A50;
}

.vs-btn-primary {
    padding: 12px 20px;
    background: #C09A50;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vs-btn-primary:hover {
    background: #d4ab63;
    transform: translateY(-1px);
}

/* Right Column - Results */
.vs-right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    position: relative;
}

/* Mask Editor Overlay on Right */
.vs-mask-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f0f0f;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-radius: 8px;
    max-height: calc(100vh - 140px);
    overflow: hidden;
}

.vs-mask-tools {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.vs-mask-mode {
    display: flex;
    gap: 10px;
}

.vs-mask-mode button {
    padding: 8px 16px;
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.vs-mask-mode button.active {
    background: #C09A50;
    color: #1a1a1a;
}

.vs-brush-size {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.vs-brush-size label {
    color: #C09A50;
    font-size: 13px;
    white-space: nowrap;
}

.vs-brush-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 300px;
    position: relative;
    height: 60px;
}

.vs-brush-slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #C09A50 0%, #C09A50 50%, #333 50%, #333 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.vs-brush-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.vs-brush-slider-container input[type="range"]::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.vs-brush-slider-container input[type="range"]:focus {
    outline: none;
}

.vs-brush-slider-container input[type="range"]::-moz-focus-outer {
    border: 0;
}

.vs-brush-preview {
    position: absolute;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    left: 0;
    top: 50%;
}

.vs-brush-preview-circle {
    border: 2px solid #C09A50;
    border-radius: 50%;
    transition: all 0.1s ease;
    background: rgba(192, 154, 80, 0.1);
}

.vs-mask-actions {
    display: flex;
    gap: 10px;
}

.vs-mask-actions button {
    padding: 8px 20px;
    background: #C09A50;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.vs-mask-actions button:hover {
    background: #d4ab63;
    transform: translateY(-1px);
}

.vs-mask-actions .vs-btn-reset {
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
}

.vs-mask-actions .vs-btn-reset:hover {
    background: #C09A50;
    color: #1a1a1a;
}

.vs-canvas-container {
    position: relative;
    flex: 1;
    background: #0f0f0f;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
}

.vs-canvas-container canvas {
    display: block;
    cursor: none;
}

.vs-edit-mask-overlay-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(192, 154, 80, 0.95);
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.vs-edit-mask-overlay-btn:hover {
    background: #C09A50;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.vs-brush-cursor {
    position: absolute;
    border: 2px solid #C09A50;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    background: rgba(192, 154, 80, 0.15);
    box-shadow: 0 0 10px rgba(192, 154, 80, 0.3);
}

.vs-hero-container {
    position: relative;
    flex: 1;
    min-height: 0;
}

.vs-edit-mask-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(192, 154, 80, 0.9);
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
}

.vs-edit-mask-btn:hover {
    background: #C09A50;
}

.vs-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.vs-results h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #C09A50;
    flex-shrink: 0;
}

/* Hero Image */
.vs-hero-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #0f0f0f;
    border: 2px solid #C09A50;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: calc(100vh - 400px);
}

.vs-hero-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Thumbnail Grid */
.vs-result-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    flex-shrink: 0;
}

.vs-result-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #333;
    transition: all 0.2s ease;
    aspect-ratio: 4/3;
    background: #0f0f0f;
}

.vs-result-item:hover {
    border-color: #C09A50;
    transform: scale(1.05);
}

.vs-result-item.selected {
    border-color: #C09A50;
    box-shadow: 0 0 0 2px rgba(192, 154, 80, 0.3);
}

.vs-result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Action Buttons */
.vs-result-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.vs-result-actions button {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vs-btn-secondary {
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
}

.vs-btn-secondary:hover {
    background: #C09A50;
    color: #1a1a1a;
}

.vs-btn-success {
    background: #C09A50;
    color: #1a1a1a;
}

.vs-btn-success:hover {
    background: #d4ab63;
}

.vs-btn-success:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.vs-unlimited-note {
    text-align: center;
    font-size: 11px;
    color: #888;
    margin: 0;
    flex-shrink: 0;
}

/* Loading State */
.vs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.vs-spinner {
    border: 4px solid #333;
    border-top: 4px solid #C09A50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vs-loading p {
    color: #C09A50;
    font-size: 14px;
}

/* Scrollbar Styling */
.vs-left-column::-webkit-scrollbar,
.vs-right-column::-webkit-scrollbar {
    width: 8px;
}

.vs-left-column::-webkit-scrollbar-track,
.vs-right-column::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.vs-left-column::-webkit-scrollbar-thumb,
.vs-right-column::-webkit-scrollbar-thumb {
    background: #C09A50;
    border-radius: 4px;
}

.vs-left-column::-webkit-scrollbar-thumb:hover,
.vs-right-column::-webkit-scrollbar-thumb:hover {
    background: #d4ab63;
}

/* Responsive */
@media (max-width: 1024px) {
    .vs-two-column-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .vs-left-column,
    .vs-right-column {
        overflow-y: visible;
    }
    
    .vs-result-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Enhancement Mode Buttons - Inline Layout */
.vs-btn-enhancement {
    padding: 8px 14px;
    background: #1a1a1a;
    color: #C09A50;
    border: 2px solid #C09A50;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    flex: 1;
    min-width: 110px;
}

.vs-btn-enhancement:hover {
    background: rgba(192, 154, 80, 0.1);
    transform: translateY(-1px);
}

.vs-btn-enhancement.active {
    background: #C09A50;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(192, 154, 80, 0.3);
}

.vs-btn-enhancement svg {
    flex-shrink: 0;
}
