/* assets/popup.css */

/* ==================================
   ایزولاسیون کامل از قالب
================================== */
#therapist-popup-overlay,
#therapist-popup-overlay *,
#therapist-popup-overlay *::before,
#therapist-popup-overlay *::after {
    box-sizing: border-box !important;
    font-family: 'IRANSansX', 'IRANSans', Tahoma, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: normal !important;
}

/* فونت IRANSansX */
@font-face {
    font-family: 'IRANSansX';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/iranxfont@master/fonts/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansX';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/iranxfont@master/fonts/IRANSansX-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansX';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/iranxfont@master/fonts/IRANSansX-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/* ==================================
   Overlay
================================== */
.therapist-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    background: transparent !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.therapist-overlay.therapist-backdrop-blur {
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    pointer-events: all !important;
    opacity: 1 !important;
}

/* ==================================
   جعبه پاپ‌آپ
================================== */
.therapist-popup-box {
    position: relative !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 40px 36px 32px !important;
    width: 100% !important;
    max-width: 420px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    direction: rtl !important;
    text-align: right !important;
    box-shadow:
        0 32px 64px rgba(0, 107, 101, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(40px) scale(0.95) !important;
    opacity: 0 !important;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity !important;
}

.therapist-overlay.therapist-backdrop-blur .therapist-popup-box {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

/* ==================================
   دکمه بستن
================================== */
.therapist-close-btn {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #f5f5f5 !important;
    color: #888 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease !important;
    z-index: 2 !important;
}

.therapist-close-btn:hover {
    background: #ffe5e5 !important;
    color: #e53e3e !important;
    transform: rotate(90deg) !important;
}

/* ==================================
   آیکون دایره‌ای بالا
================================== */
.therapist-icon-wrap {
    position: relative !important;
    width: 72px !important;
    height: 72px !important;
    margin: 0 auto 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.therapist-icon-circle {
    width: 68px !important;
    height: 68px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #006B65, #00978e) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 1 !important;
    box-shadow: 0 8px 24px rgba(0, 107, 101, 0.35) !important;
}

.therapist-pulse-ring {
    position: absolute !important;
    inset: -6px !important;
    border-radius: 50% !important;
    border: 2.5px solid rgba(0, 107, 101, 0.4) !important;
    animation: therapistPulse 2.2s ease-out infinite !important;
}

@keyframes therapistPulse {
    0%   { transform: scale(1); opacity: 0.8; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ==================================
   محتوا
================================== */
.therapist-content {
    text-align: center !important;
    margin-bottom: 24px !important;
}

.therapist-badge {
    display: inline-block !important;
    background: rgba(0, 107, 101, 0.1) !important;
    color: #006B65 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    padding: 4px 14px !important;
    border-radius: 100px !important;
    margin-bottom: 12px !important;
    line-height: 1.6 !important;
}

.therapist-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    border: none !important;
    background: none !important;
}

.therapist-desc {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.8 !important;
}

/* ==================================
   فرم
================================== */
.therapist-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.therapist-input-wrap {
    position: relative !important;
}

.therapist-phone-input {
    width: 100% !important;
    height: 52px !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 14px !important;
    padding: 0 48px 0 16px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-family: 'IRANSansX', Tahoma, sans-serif !important;
    color: #1a1a2e !important;
    direction: ltr !important;
    text-align: center !important;
    outline: none !important;
    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.therapist-phone-input::placeholder {
    color: #aaa !important;
    font-size: 14px !important;
    font-family: 'IRANSansX', Tahoma, sans-serif !important;
}

.therapist-phone-input:focus {
    border-color: #006B65 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(0, 107, 101, 0.1) !important;
}

.therapist-phone-input.therapist-input-error {
    border-color: #e53e3e !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1) !important;
}

.therapist-input-icon {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #aaa !important;
    pointer-events: none !important;
    display: flex !important;
    align-items: center !important;
    transition: color 0.3s ease !important;
}

.therapist-phone-input:focus ~ .therapist-input-icon {
    color: #006B65 !important;
}

/* ==================================
   خطا
================================== */
.therapist-error-msg {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #e53e3e !important;
    min-height: 0 !important;
    padding: 0 4px !important;
    line-height: 1.5 !important;
    transition: all 0.3s ease !important;
}

/* ==================================
   دکمه ارسال
================================== */
.therapist-submit-btn {
    width: 100% !important;
    height: 52px !important;
    background: linear-gradient(135deg, #006B65 0%, #00978e 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'IRANSansX', Tahoma, sans-serif !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease !important;
    box-shadow: 0 6px 20px rgba(0, 107, 101, 0.35) !important;
    position: relative !important;
    overflow: hidden !important;
}

.therapist-submit-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: rgba(255,255,255,0) !important;
    transition: background 0.2s ease !important;
}

.therapist-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(0, 107, 101, 0.45) !important;
}

.therapist-submit-btn:hover::before {
    background: rgba(255,255,255,0.08) !important;
}

.therapist-submit-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 12px rgba(0, 107, 101, 0.3) !important;
}

.therapist-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.therapist-btn-loader svg {
    animation: therapistSpin 0.8s linear infinite !important;
}

@keyframes therapistSpin {
    to { transform: rotate(360deg); }
}

/* ==================================
   پیام موفقیت
================================== */
.therapist-success-wrap {
    text-align: center !important;
    padding: 16px 0 8px !important;
    animation: therapistFadeIn 0.5s ease !important;
}

@keyframes therapistFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.therapist-success-icon {
    margin-bottom: 16px !important;
    animation: therapistBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes therapistBounce {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.therapist-success-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    line-height: 1.4 !important;
}

.therapist-success-text {
    font-size: 15px !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.8 !important;
}

/* ==================================
   نوشته امنیت
================================== */
.therapist-privacy-note {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #aaa !important;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

/* ==================================
   دکمه شورتکد
================================== */
.therapist-shortcode-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #006B65 0%, #00978e 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: 'IRANSansX', Tahoma, sans-serif !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(0, 107, 101, 0.35) !important;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease !important;
    line-height: 1.5 !important;
    direction: rtl !important;
}

.therapist-shortcode-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(0, 107, 101, 0.45) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.therapist-shortcode-btn:active {
    transform: translateY(0) !important;
}

/* ==================================
   ریسپانسیو
================================== */
@media (max-width: 480px) {
    .therapist-popup-box {
        padding: 32px 24px 24px !important;
        border-radius: 20px !important;
    }
    .therapist-title {
        font-size: 18px !important;
    }
}