/* ============================================================
   فونت یکان
   ============================================================ */
@font-face {
    font-family: 'Yekan';
    src: url('../font/yekan.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

/* ============================================================
   کانتینر اصلی
   ============================================================ */
#ertebatino-float-container {
    position: fixed;
    z-index: 999999;
    width: 60px;
    height: 60px;
    cursor: pointer;
    direction: rtl;
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* ============================================================
   پوشش تیره و تاری
   ============================================================ */
#ertebatino-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
}

#ertebatino-float-container.open #ertebatino-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================================
   ریپل (زیر آبجکت)
   ============================================================ */
#ertebatino-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    animation: ripple-effect 2s infinite ease-out;
    pointer-events: none;
    top: 0;
    left: 0;
    z-index: 0;
}

@keyframes ripple-effect {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* ============================================================
   دکمه اصلی
   ============================================================ */
#ertebatino-button {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#ertebatino-button:hover {
    transform: scale(1);
}

/* ============================================================
   آیکون‌های داخل دکمه
   ============================================================ */
#ertebatino-icon,
#ertebatino-close-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ertebatino-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    filter: brightness(0) invert(1);
}

#ertebatino-close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.3);
}

#ertebatino-float-container.open #ertebatino-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.3);
}

#ertebatino-float-container.open #ertebatino-close-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ============================================================
   پاپ‌اپ (داخل کانتینر - بالای دکمه)
   ============================================================ */
#ertebatino-popup {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 250px;
    max-width: 85vw;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

#ertebatino-float-container.open #ertebatino-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ============================================================
   هدر پاپ‌اپ
   ============================================================ */
.popup-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
    margin-bottom: 0;
}

.popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #202937;
    text-align: center;
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* ============================================================
   زیرنویس با خط تمام عرض
   ============================================================ */
.popup-subtitle {
    font-size: 11px;
    color: #6C727D;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* ============================================================
   آیتم‌های ارتباطی
   ============================================================ */
.popup-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}

/* ============================================================
   باکس مستطیلی هر آیتم
   ============================================================ */
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    background-color: #F9FAFC;
    border-radius: 8px;
    transition: background-color 0.4s ease;
    cursor: default;
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(45px);
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

.contact-item:hover {
    background-color: #F3F4F6;
}

/* ============================================================
   انیمیشن ورود آیتم‌ها
   ============================================================ */
#ertebatino-float-container.open .contact-item {
    animation: popupItemsReveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#ertebatino-float-container.open .contact-item:nth-child(1) {
    animation-delay: 0.05s;
}

#ertebatino-float-container.open .contact-item:nth-child(2) {
    animation-delay: 0.10s;
}

#ertebatino-float-container.open .contact-item:nth-child(3) {
    animation-delay: 0.15s;
}

#ertebatino-float-container.open .contact-item:nth-child(4) {
    animation-delay: 0.20s;
}

#ertebatino-float-container.open .contact-item:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes popupItemsReveal {
    from {
        opacity: 0;
        transform: translateY(45px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   باکس مربعی آیکون
   ============================================================ */
.contact-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* رنگ‌های باکس‌ها */
.contact-item:nth-child(1) .contact-icon-box {
    background-color: #1FAF29;
}
.contact-item:nth-child(2) .contact-icon-box {
    background-color: #FEA500;
}
.contact-item:nth-child(3) .contact-icon-box {
    background-color: #26D366;
}
.contact-item:nth-child(4) .contact-icon-box {
    background-color: #CD3050;
}
.contact-item:nth-child(5) .contact-icon-box {
    background-color: #21AFDF;
}

/* ============================================================
   آیکون‌های داخل باکس (سفید)
   ============================================================ */
.contact-icon-box svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-icon-box img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* ============================================================
   متن روبروی باکس
   ============================================================ */
.contact-label {
    font-size: 13px;
    color: #384050;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    font-family: 'Yekan', 'Vazir', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* ============================================================
   حذف کامل باکس آبی رنگ هنگام کلیک
   ============================================================ */
* {
    -webkit-tap-highlight-color: transparent !important;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */
@media (max-width: 480px) {
    #ertebatino-float-container {
        width: 54px;
        height: 54px;
    }

    #ertebatino-icon,
    #ertebatino-close-icon {
        width: 24px;
        height: 24px;
    }

    #ertebatino-popup {
        width: 220px;
        padding: 10px;
        bottom: 64px;
    }

    .popup-title {
        font-size: 14px;
    }

    .contact-label {
        font-size: 12px;
    }

    .contact-icon-box {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 8px;
    }

    .contact-icon-box svg,
    .contact-icon-box img {
        width: 22px;
        height: 22px;
    }

    .contact-item {
        padding: 5px 6px;
        gap: 8px;
    }

    .popup-subtitle {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
}