/* استایل اصلی */
.eacart-pro-wrapper {
    display: inline-block;
    position: relative;
}

/* دکمه */
.eacart-pro-button {
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    outline: none;
}

.eacart-pro-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.eacart-pro-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.eacart-pro-button.loading {
    opacity: 0.8;
}

.eacart-pro-spinner {
    margin-left: 8px;
}

.eacart-pro-spinner i {
    animation: eacartSpin 1s linear infinite;
}

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

/* پاپ‌آپ موفقیت */
.eacart-pro-success-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999999 !important; /* افزایش بیشتر z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    pointer-events: all;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    transform: none !important; /* غیرفعال کردن هرگونه transform در والد */
}

.eacart-pro-success-popup .popup-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important; /* استفاده از viewport width */
    height: 100vh !important; /* استفاده از viewport height */
    min-width: 100vw !important;
    min-height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.eacart-pro-success-popup .popup-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupShow 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

@keyframes popupShow {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.eacart-pro-success-popup .popup-icon {
    font-size: 60px;
    color: #4CAF50;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.eacart-pro-success-popup .popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
	font-family: "IRANSans";
}

.eacart-pro-success-popup .popup-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
	font-family: "IRANSans";
}

.eacart-pro-success-popup .popup-timer {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.eacart-pro-success-popup .timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 3s linear;
}

/* انیمیشن چک مارک */
.fa-check-circle {
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .eacart-pro-success-popup .popup-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .eacart-pro-success-popup .popup-icon {
        font-size: 50px;
    }
    
    .eacart-pro-success-popup .popup-title {
        font-size: 20px;
    }
    
    .eacart-pro-success-popup .popup-message {
        font-size: 14px;
    }
}

/* استایل‌های اضافی برای تجربه بهتر */
.eacart-pro-button.success {
    background-color: #4CAF50 !important;
    color: white !important;
    animation: buttonSuccess 0.5s ease;
}

@keyframes buttonSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}