/* Swiss Tryon Public Styles */

.swiss-tryon-container {
    margin: 20px 0;
}

.swiss-tryon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.swiss-tryon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.swiss-tryon-button svg {
    width: 20px;
    height: 20px;
}

/* Modal */
.swiss-tryon-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.swiss-tryon-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 50px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.swiss-tryon-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.swiss-tryon-modal-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.swiss-tryon-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.swiss-tryon-close:hover {
    background: #f5f5f5;
    color: #333;
}

.swiss-tryon-modal-body {
    padding: 40px;
    min-height: 400px;
}

/* Upload Step */
.swiss-tryon-description {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.swiss-tryon-upload-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.swiss-tryon-upload-box {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.swiss-tryon-upload-box.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.swiss-tryon-upload-box svg {
    color: #667eea;
    margin-bottom: 20px;
}

.swiss-tryon-upload-box p {
    margin: 20px 0;
    color: #666;
    font-size: 16px;
}

.swiss-tryon-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.swiss-tryon-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.swiss-tryon-divider span {
    position: relative;
    background: #fff;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Buttons */
.swiss-tryon-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.swiss-tryon-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.swiss-tryon-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.swiss-tryon-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.swiss-tryon-btn-secondary:hover {
    background: #eee;
}

/* Camera */
#swiss-tryon-camera-video {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}

.swiss-tryon-camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Preview */
#swiss-tryon-preview-container {
    text-align: center;
}

#swiss-tryon-preview {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Processing Step */
.swiss-tryon-step-processing {
    text-align: center;
    padding: 40px 0;
}

.swiss-tryon-loader {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.swiss-tryon-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#swiss-tryon-processing-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.swiss-tryon-progress-container {
    max-width: 400px;
    margin: 0 auto;
}

.swiss-tryon-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.swiss-tryon-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.swiss-tryon-progress-text {
    text-align: center;
    color: #667eea;
    font-weight: 600;
}

/* Result Step */
.swiss-tryon-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.swiss-tryon-comparison-item {
    text-align: center;
}

.swiss-tryon-comparison-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.swiss-tryon-comparison-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

/* Error Step */
.swiss-tryon-step-error {
    text-align: center;
    padding: 40px 0;
}

.swiss-tryon-error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

#swiss-tryon-error-message {
    color: #e74c3c;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .swiss-tryon-modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .swiss-tryon-modal-body {
        padding: 20px;
    }

    .swiss-tryon-comparison {
        grid-template-columns: 1fr;
    }

    .swiss-tryon-result-actions {
        flex-direction: column;
    }

    .swiss-tryon-btn {
        width: 100%;
    }
}

/* Body class when modal is open */
body.swiss-tryon-modal-open {
    overflow: hidden;
}
