/* استایل اصلی پاپ‌آپ */
.wc-first-purchase-popup {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    font-family: iransans, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
}

.wc-first-purchase-popup.active {
    display: block;
}

.wc-first-purchase-popup-content {
    position: relative;
    margin: 10% auto;
    background-color: white;
    padding: 16px;
    border-radius: 8px;
    width: 90%;
    max-width: 385px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.4s;
    display: flex;
    gap: 16px;
    align-items: center;
    box-sizing: border-box;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
}

/* انیمیشن نمایش پاپ‌آپ */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* دکمه بستن */
.wc-first-purchase-close {
    width: 20px;
    height: 20px;
    border: 0;
    background-color: white;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 20px;
    color: #202223;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wc-first-purchase-close:hover {
    color: #87009b;
}

/* تایپوگرافی */
.wc-first-purchase-popup h2 {
    color: #202223;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 600;
    width: fit-content;
}

.wc-first-purchase-popup p {
    color: #202223;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: right;
    margin: 10px 0 0;
}

.wc-first-purchase-bold-text {
    font-weight: 600;
}

/* دکمه‌ها */
.wc-first-purchase-submit-button {
    font-family: iransans, sans-serif;
    cursor: pointer;
    background-color: #87009b;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: white;
    height: 40px;
    border: 0;
    line-height: 24px;
    text-wrap: nowrap;
    transition: background-color 0.3s;
}

.wc-first-purchase-submit-button:hover {
    background-color: #6a007a;
}

/* تایمر دایره‌ای - به‌روزرسانی شده */
.wc-first-purchase-timer-container {
    min-width: 70px;
    width: 70px;
    height: 70px;
    border: 4px solid transparent;
    border-radius: 50%;
    background: 
        linear-gradient(white, white) content-box no-repeat,
        conic-gradient(white 0%, rgba(135, 0, 155, 1) 0%) border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.wc-first-purchase-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: bold;
    color: #202223;
}

/* فرم و فیلدهای ورودی */
.wc-first-purchase-phone-form {
    display: none;
}

.wc-first-purchase-phone-form input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    direction: ltr;
    text-align: center;
    font-size: 14px;
    font-family: iransans, sans-serif;
    box-sizing: border-box;
}

.wc-first-purchase-phone-form input:focus {
    outline: none;
    border-color: #87009b;
    box-shadow: 0 0 0 2px rgba(135, 0, 155, 0.2);
}

/* پیام‌ها */
.wc-first-purchase-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    display: none;
    font-size: 12px;
    text-align: right;
}

.wc-first-purchase-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-first-purchase-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* لایه‌بندی و چیدمان */
.wc-first-purchase-row-flex {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
}

.wc-first-purchase-col-flex {
    display: flex;
    flex-direction: column;
}

.wc-first-purchase-flex-gap {
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.wc-first-purchase-mobile-limit-width {
    max-width: 80%;
}

.wc-first-purchase-guid-text {
    color: #797a7b;
    font-size: 11px !important;
    text-align: right;
    margin-top: 8px;
}

.wc-tow-purchase-under-timer{
	margin-top: 13px;
	display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.wc-first-purchase-powered-by-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: -8px;
}

.wc-first-purchase-powered-by {
    color: #797a7b;
    font-size: 9px;
    font-family: iransans, sans-serif;
    text-align: center;
    opacity: 0.8;
}

/* رسپانسیو برای موبایل */
@media (max-width: 767px) {
    .wc-first-purchase-popup-content {
        margin: 5% auto;
        max-width: 90vw;
        width: 100%;
        padding: 12px;
    }
    
    .wc-first-purchase-timer-container {
        min-width: 47px;
        width: 47px;
        height: 47px;
    }
    
    .wc-first-purchase-popup h2 {
        font-size: 16px;
    }
    
    .wc-first-purchase-popup p {
        font-size: 13px;
    }
    
    .wc-first-purchase-guid-text {
        font-size: 9px;
    }
    
    .wc-first-purchase-powered-by {
        font-size: 8px;
    }
}

/* موقعیت برای دسکتاپ */
@media (min-width: 768px) {
    .wc-first-purchase-popup-content {
        bottom: 50px;
        right: 50px;
        margin: 0;
        position: fixed;
    }
}

/* موقعیت برای موبایل */
@media (max-width: 767px) {
    .wc-first-purchase-popup-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
        margin: 0;
        position: fixed;
        max-width: none;
    }
}