/*
Theme Name: cocaro
Template: hello-elementor
*/

/* --- پیکربندی فونت دانا --- */
@font-face {
    font-family: 'Dana';
    src: url('./fonts/font/DanaFaNum-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('./fonts/font/DanaFaNum-DemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('./fonts/font/DanaFaNum-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* --- اعمال سراسری فونت --- */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, input, button, textarea {
    font-family: 'Dana', tahoma, sans-serif !important;
}

/* ====================================================
   تنظیمات اپلیکیشنی کردن رابط کاربری (Native App Feel)
   ==================================================== */

/* جلوگیری از انتخاب (Select) شدن متن‌ها توسط کاربر */
body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    -webkit-touch-callout: none !important; /* جلوگیری از باز شدن منوی مرورگر هنگام لمس طولانی */
}

/* اجازه انتخاب متن فقط در فرم‌ها و فیلدهای ورودی */
input, textarea {
    -webkit-user-select: auto !important;
    user-select: auto !important;
}

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

/* حذف کادر و سایه دور لینک‌ها و دکمه‌ها هنگام کلیک (فوکوس) */
a:focus,
a:active,
button:focus,
input:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ====================================================
استایل‌های لودینگ سراسری (Splash Screen)
==================================================== */

#custom-app-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* رنگ پس‌زمینه لودینگ */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* سیستم پشتیبان: در صورت از کار افتادن جاوااسکریپت، بعد از ۵ ثانیه صفحه را مخفی کن */
    animation: failsafeHide 5s forwards;
}

#custom-app-preloader.hide-preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#custom-app-preloader img {
    width: 120px; /* سایز لوگو */
    height: auto;
    animation: appPulse 1.5s infinite;
}

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

/* انیمیشن پشتیبان برای محو کردن اجباری */
@keyframes failsafeHide {
    0% { opacity: 1; visibility: visible; }
    99% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
