/* Virtual Try-On Styles */

.vto-container {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
}

.vto-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.vto-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.vto-button:active {
    transform: translateY(0);
}

.vto-icon {
    font-size: 20px;
}

.vto-tries-remaining {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.vto-login-notice {
    padding: 20px;
    background: #f7f7f7;
    border-radius: 8px;
    text-align: center;
}

.vto-login-notice p {
    margin-bottom: 15px;
}

/* Modal Styles */
.vto-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

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

.vto-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vto-close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.vto-close:hover,
.vto-close:focus {
    color: #000;
}

.vto-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

/* Upload Area */
.vto-upload-area {
    margin: 20px 0;
}

.vto-upload-label {
    display: block;
    padding: 40px;
    border: 3px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.vto-upload-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.vto-upload-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

.vto-preview {
    position: relative;
    margin-top: 20px;
}

.vto-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vto-remove-image {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

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

/* Process Button */
.vto-process-button {
    width: 100%;
    padding: 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.vto-process-button:hover:not(:disabled) {
    background: #005a87;
}

.vto-process-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading */
.vto-loading {
    text-align: center;
    padding: 40px 20px;
}

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

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

.vto-loading p {
    color: #666;
    font-size: 16px;
}

/* Result */
.vto-result {
    text-align: center;
}

.vto-result h4 {
    margin-bottom: 15px;
    color: #333;
}

.vto-result img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.vto-download-button,
.vto-retry-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vto-download-button {
    background: #28a745;
    color: white;
}

.vto-download-button:hover {
    background: #218838;
}

.vto-retry-button {
    background: #6c757d;
    color: white;
}

.vto-retry-button:hover {
    background: #5a6268;
}

/* Error */
.vto-error {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.vto-error-message {
    color: #856404;
    margin-bottom: 15px;
    font-weight: bold;
}

/* RTL Support */
body.rtl .vto-close {
    float: right;
}

/* Responsive */
@media (max-width: 768px) {
    .vto-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .vto-result-actions {
        flex-direction: column;
    }
    
    .vto-download-button,
    .vto-retry-button {
        width: 100%;
    }
}