/* استایل مدرن پاپ‌آپ - سفید و نارنجی */
#phone-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex !important;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#phone-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

#phone-popup-container {
    max-width: 440px;
    width: 92%;
    animation: slideUp 0.5s ease-out;
    padding: 0;
    margin: 0;
}

.popup-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 35px 35px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border-top: 5px solid #ff6b35;
    position: relative;
    overflow: hidden;
}

/* دکوراسیون پس‌زمینه */
.popup-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at top right, rgba(255, 107, 53, 0.05), transparent 70%);
    pointer-events: none;
}

.popup-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: inline-block;
    animation: bounce 2s infinite;
}

.popup-header h2 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.popup-header p {
    color: #718096;
    font-size: 15px;
    margin: 0 0 25px;
    line-height: 1.5;
}

.popup-body {
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
    background: #f7fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
    background: #ffffff;
}

.input-group input::placeholder {
    color: #a0aec0;
    direction: rtl;
    text-align: right;
}

.input-group .input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

#submit-phone {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

#submit-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

#submit-phone:active {
    transform: translateY(0);
}

#submit-phone:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.popup-footer {
    margin-top: 20px;
}

.popup-footer small {
    color: #a0aec0;
    font-size: 13px;
}

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin: -10px 0 15px;
    padding: 8px 12px;
    background: #fff5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-right: 3px solid #e53e3e;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* استایل دکمه لودر */
.btn-loader {
    display: inline-block;
    font-size: 20px;
}

/* Media Queries */
@media (max-width: 480px) {
    .popup-content {
        padding: 30px 20px 25px;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }
    
    .popup-header p {
        font-size: 14px;
    }
    
    .input-group input {
        font-size: 15px;
        padding: 14px 45px 14px 16px;
    }
    
    #submit-phone {
        font-size: 15px;
        padding: 14px;
    }
    
    .popup-icon {
        font-size: 38px;
    }
}

/* اطمینان از مرکزیت کامل در تمام مرورگرها */
@media screen and (min-width: 769px) {
    #phone-popup-container {
        margin: 0 auto;
    }
}

/* پشتیبانی از نمایشگرهای بسیار کوچک */
@media (max-height: 600px) {
    .popup-content {
        padding: 20px;
    }
    
    .popup-icon {
        font-size: 30px;
        margin-bottom: 5px;
    }
    
    .popup-header h2 {
        font-size: 18px;
    }
    
    .popup-header p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .input-group input {
        padding: 12px 40px 12px 15px;
        font-size: 14px;
    }
    
    #submit-phone {
        padding: 12px;
        font-size: 14px;
    }
}