/* Modern Virtual Try-On Styles */

.vto-container {
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}


.vto-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.vto-header {
    text-align: center;
    margin-bottom: 24px;
}

.vto-header h3 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.vto-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    font-weight: 400;
}

.vto-upload-area {
    margin-bottom: 20px;
}

/* Upload Options */
.vto-upload-options {
    margin-bottom: 20px;
}

.vto-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.vto-upload-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.vto-upload-btn svg {
    flex-shrink: 0;
}

/* Generate Button */
.vto-generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.vto-generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.vto-generate-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vto-help-text {
    text-align: center;
}

.vto-help-text small {
    color: #6b7280;
    font-size: 13px;
}

/* Image Preview */
.vto-image-preview {
    position: relative;
    margin-bottom: 20px;
}

#vto-person-preview {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.vto-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vto-remove-image:hover {
    background: rgba(0, 0, 0, 0.9);
}

.vto-upload-icon {
    color: #999;
    margin-bottom: 15px;
}

.vto-upload-text strong {
    display: block;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.vto-upload-text p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.vto-image-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vto-image-preview img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.vto-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.vto-remove-image:hover {
    background: rgba(0,0,0,0.9);
}

.vto-product-preview {
    text-align: center;
}

.vto-product-preview h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.vto-product-preview img {
    width: 100%;
    max-width: 250px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vto-actions {
    text-align: center;
    margin-bottom: 30px;
}

.vto-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.vto-btn-primary {
    background: #007cba;
    color: white;
}

.vto-btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.vto-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.vto-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.vto-btn-secondary:hover {
    background: #e0e0e0;
}

.vto-btn-small {
    padding: 8px 16px;
    font-size: 14px;
    min-width: auto;
}

.vto-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 30px;
}

.vto-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: vto-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.vto-loading p {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.vto-loading small {
    color: #666;
    font-size: 14px;
}

.vto-results {
    margin-bottom: 30px;
}

.vto-results h4 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.vto-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.vto-result-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.vto-result-item:hover {
    transform: translateY(-2px);
}

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

.vto-result-actions {
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.vto-results-actions {
    text-align: center;
}

.vto-error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.vto-error-content h4 {
    color: #c33;
    margin-bottom: 10px;
    font-size: 18px;
}

.vto-error-text {
    color: #666;
    margin-bottom: 15px;
}

.vto-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 15px;
    color: #c33;
    text-align: center;
}

.vto-tips {
    background: #f0f8ff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.vto-tips h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.vto-tips ul {
    margin: 0;
    padding-left: 20px;
}

.vto-tips li {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.vto-tips li:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .vto-container {
        padding: 15px;
    }
    
    .vto-upload-placeholder {
        padding: 30px 15px;
    }
    
    .vto-results-grid {
        grid-template-columns: 1fr;
    }
    
    .vto-result-actions {
        flex-direction: column;
    }
}

/* Camera Interface Styles */
.vto-upload-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.vto-upload-btn,
.vto-camera-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.vto-upload-btn:hover,
.vto-camera-btn:hover {
    border-color: #007cba;
    background: #f8f9fa;
    color: #007cba;
    transform: translateY(-1px);
}

.vto-upload-icon,
.vto-camera-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}


.vto-upload-help {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 10px;
}

.vto-upload-help p {
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .vto-container {
        max-width: 100%;
        padding: 0;
    }
    
    .vto-card {
        padding: 20px;
        margin: 16px 0;
        border-radius: 12px;
    }
    
    .vto-upload-btn {
        padding: 18px 24px;
        font-size: 16px;
    }
    
    .vto-generate-btn {
        padding: 18px 24px;
        font-size: 16px;
    }
}

/* HEIC Preview Placeholder */
.vto-heic-placeholder {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin-top: 10px;
}

.vto-heic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    flex-shrink: 0;
}

.vto-heic-info {
    flex: 1;
}

.vto-heic-info strong {
    display: block;
    color: #495057;
    font-size: 14px;
    margin-bottom: 4px;
}

.vto-heic-info p {
    margin: 0 0 4px 0;
    color: #6c757d;
    font-size: 13px;
    word-break: break-all;
}

.vto-heic-info small {
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
}

/* Validation Feedback */
.vto-validation-feedback {
    margin: 16px 0;
}

.vto-validation-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fef3cd;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
}

.vto-validation-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.vto-validation-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.vto-validation-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}


/* Results Actions */
.vto-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#vto-regenerate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mobile responsiveness for HEIC placeholder */
@media (max-width: 768px) {
    .vto-heic-placeholder {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .vto-heic-icon {
        width: 48px;
        height: 48px;
    }
    
    .vto-results-actions {
        flex-direction: column;
    }
    
    .vto-results-actions .vto-btn {
        width: 100%;
    }
}
