/**
 * WooCommerce Virtual Try-On Frontend Styles
 * BEM Metodolojisi ile yazılmıştır
 */

/* ===== VIRTUAL TRY-ON BUTTON ===== */
.wc-virtual-tryon__button-container {
    margin: 20px 0;
    text-align: center;
}

.wc-virtual-tryon__button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.wc-virtual-tryon__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.wc-virtual-tryon__button:active {
    transform: translateY(0);
}

.wc-virtual-tryon__button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wc-virtual-tryon__button--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wc-virtual-tryon__button--secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== MODAL ===== */
.wc-virtual-tryon__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.wc-virtual-tryon__modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wc-virtual-tryon__modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: wc-virtual-tryon__modal-slide-in 0.3s ease-out;
}

@keyframes wc-virtual-tryon__modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== MODAL HEADER ===== */
.wc-virtual-tryon__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.wc-virtual-tryon__modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333333;
}

.wc-virtual-tryon__modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #999999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.wc-virtual-tryon__modal-close:hover {
    background: #f5f5f5;
    color: #333333;
}

/* ===== MODAL BODY ===== */
.wc-virtual-tryon__modal-body {
    padding: 30px;
}

/* ===== STEPS ===== */
.wc-virtual-tryon__step {
    display: none;
}

.wc-virtual-tryon__step h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    text-align: center;
}

/* ===== UPLOAD AREA ===== */
.wc-virtual-tryon__upload-area {
    margin: 20px 0;
}

.wc-virtual-tryon__upload-placeholder {
    border: 2px dashed #cccccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.wc-virtual-tryon__upload-placeholder:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.wc-virtual-tryon__upload-placeholder--dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.wc-virtual-tryon__upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.wc-virtual-tryon__upload-placeholder p {
    margin: 10px 0;
    color: #666666;
    font-size: 16px;
}

.wc-virtual-tryon__upload-info {
    font-size: 14px !important;
    color: #999999 !important;
}

/* ===== UPLOAD PREVIEW ===== */
.wc-virtual-tryon__upload-preview {
    text-align: center;
}

.wc-virtual-tryon__upload-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.wc-virtual-tryon__upload-remove {
    background: #ff4757;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.wc-virtual-tryon__upload-remove:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

/* ===== UPLOAD ACTIONS ===== */
.wc-virtual-tryon__upload-actions {
    text-align: center;
    margin-top: 30px;
}

/* ===== PREVIEW CONTAINER ===== */
.wc-virtual-tryon__preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.wc-virtual-tryon__preview-item {
    text-align: center;
}

.wc-virtual-tryon__preview-item h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.wc-virtual-tryon__preview-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== PROGRESS ===== */
.wc-virtual-tryon__progress {
    margin: 30px 0;
}

.wc-virtual-tryon__progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.wc-virtual-tryon__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.wc-virtual-tryon__progress-fill--active {
    animation: wc-virtual-tryon__progress-animation 2s ease-in-out infinite;
}

@keyframes wc-virtual-tryon__progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.wc-virtual-tryon__progress-text {
    text-align: center;
    margin: 0;
    font-size: 16px;
    color: #666666;
    font-weight: 500;
}

/* ===== RESULT CONTAINER ===== */
.wc-virtual-tryon__result-container {
    text-align: center;
    margin: 30px 0;
}

.wc-virtual-tryon__result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== RESULT ACTIONS ===== */
.wc-virtual-tryon__result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .wc-virtual-tryon__modal-overlay {
        padding: 10px;
    }
    
    .wc-virtual-tryon__modal-content {
        max-height: 95vh;
    }
    
    .wc-virtual-tryon__modal-header {
        padding: 15px 20px;
    }
    
    .wc-virtual-tryon__modal-title {
        font-size: 20px;
    }
    
    .wc-virtual-tryon__modal-body {
        padding: 20px;
    }
    
    .wc-virtual-tryon__preview-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wc-virtual-tryon__result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .wc-virtual-tryon__button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .wc-virtual-tryon__upload-placeholder {
        padding: 30px 15px;
    }
    
    .wc-virtual-tryon__upload-icon {
        font-size: 36px;
    }
    
    .wc-virtual-tryon__upload-placeholder p {
        font-size: 14px;
    }
    
    .wc-virtual-tryon__result-actions {
        gap: 10px;
    }
}

/* ===== LOADING STATES ===== */
.wc-virtual-tryon__loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: wc-virtual-tryon__spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes wc-virtual-tryon__spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NOTICE STATES ===== */
.wc-virtual-tryon__notice {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 4px solid;
    text-align: center;
}

.wc-virtual-tryon__notice--warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.wc-virtual-tryon__notice--error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #dc3545;
}

.wc-virtual-tryon__notice--success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left-color: #28a745;
}

.wc-virtual-tryon__notice--info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

.wc-virtual-tryon__notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== ERROR STATES ===== */
.wc-virtual-tryon__error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    color: #c62828;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

/* ===== SUCCESS STATES ===== */
.wc-virtual-tryon__success {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    color: #2e7d32;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}
