/**
 * Virtual Try-On Module Styles
 */

/* Container */
.virtual-tryon-wrapper {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Header */
.virtual-tryon-header {
    text-align: center;
    margin-bottom: 20px;
}

.virtual-tryon-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.virtual-tryon-title .material-icons {
    color: #6c5ce7;
    font-size: 1.6rem;
}

.virtual-tryon-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* Upload Area */
.virtual-tryon-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #ffffff;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.virtual-tryon-upload-area:hover,
.virtual-tryon-upload-area.dragover {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.05);
}

.upload-placeholder {
    width: 100%;
}

.upload-icon {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 5px;
    font-weight: 500;
}

.upload-subtext {
    color: #adb5bd;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border: none;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    background: linear-gradient(135deg, #5b4cdb 0%, #8c7ae6 100%);
    color: white;
}

.hidden-input {
    display: none;
}

.upload-info {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #adb5bd;
}

/* Preview */
.upload-preview {
    position: relative;
    display: inline-block;
}

.preview-img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.remove-btn .material-icons {
    font-size: 1.2rem;
}

/* Actions */
.virtual-tryon-actions {
    text-align: center;
    margin-top: 20px;
}

.try-on-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-on-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
    background: linear-gradient(135deg, #00a085 0%, #4dd9b4 100%);
}

.try-on-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Processing */
.virtual-tryon-processing {
    text-align: center;
    padding: 40px 20px;
}

.processing-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-text {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 5px;
}

.processing-subtext {
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Result */
.virtual-tryon-result {
    text-align: center;
}

.result-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    color: #00b894;
    margin-bottom: 25px;
}

.result-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.comparison-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.comparison-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-img {
    max-width: 280px;
    max-height: 350px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 3px solid #ffffff;
}

.result-img {
    border-color: #00b894;
}

.comparison-arrow {
    color: #adb5bd;
}

.comparison-arrow .material-icons {
    font-size: 2rem;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#download-result {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border: none;
    color: white;
}

#download-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* Error */
.virtual-tryon-error {
    text-align: center;
    padding: 30px;
}

.error-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-text {
    font-size: 1rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .virtual-tryon-wrapper {
        padding: 15px;
        margin: 15px 0;
    }

    .virtual-tryon-upload-area {
        padding: 20px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .preview-img {
        max-width: 200px;
        max-height: 200px;
    }

    .comparison-img {
        max-width: 150px;
        max-height: 200px;
    }

    .comparison-arrow {
        transform: rotate(90deg);
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for showing elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.virtual-tryon-result:not(.hidden),
.virtual-tryon-error:not(.hidden) {
    animation: fadeIn 0.4s ease;
}
