﻿/* 🔹 فونت Pelak */
@font-face {
    font-family: 'Pelak';
    src: url('../fonts/pelakfa-light.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: 'Pelak';
    src: url('../fonts/pelakfa-regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Pelak';
    src: url('../fonts/pelakfa-bold.ttf') format('truetype');
    font-weight: 700;
}

body, input, button, label, table {
    font-family: 'Pelak', sans-serif !important;
    font-weight: 700;
}

* {
    font-weight: 700;
}

/* 🔹 لودینگ */
#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none; /* پیش‌فرض مخفی */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 20000;
    font-family: 'Pelak', sans-serif;
}

.loading-logo {
    width: 100px;
    height: auto;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

body {
    font-family: 'Pelak', sans-serif;
    background: #fdfcf8;
}

/* هدر */
header {
    background: #d7f5e8; /* سبز ملایم */
    padding: 2rem 1rem;
    text-align: center;
}

    header img {
        width: 80px;
        margin-bottom: 10px;
    }

    header h1 {
        font-family: 'Pelak';
        font-size: 2rem;
        font-weight:bold;
        color: #006a4e;
        margin: 0;
    }

/* باکس فروشگاه */
.store-box {
    background: #f4fff9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.store-logo img {
    width: 120px;
    height: 100px;
    object-fit: contain;
}

.store-name {
    font-family: 'Pelak';
    font-size: 1.5rem;
    color: #007f63;
}

/* باکس هشدار */
/* 🔷 باکس هشدار با تم آبی */
/* 🔷 باکس هشدار با تم آبی و فونت کوچکتر */
.alert-box {
    background: #e9f4ff; /* آبی خیلی روشن */
    border: 2px dotted #4da3ff; /* آبی اصلی */
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    margin-top: 1rem;
    color: #004a99; /* آبی تیره برای متن */
    font-weight: 600;
    font-size: 0.95rem; /* 🔹 فونت کمی کوچکتر */
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 128, 255, 0.1);
    transition: all 0.3s ease;
}

    /* ✨ افکت هاور */
    .alert-box:hover {
        background: #d8ecff;
        border-color: #2e8fff;
        box-shadow: 0 3px 12px rgba(0, 128, 255, 0.25);
        transform: translateY(-2px);
    }

/* 📱 در موبایل فونت باز هم کوچکتر شود */
@media (max-width: 768px) {
    .alert-box {
        font-size: 0.55rem;
        padding: 0.7rem 1rem;
    }
}


/* جدول */
.results-section {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-gridview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: #fff;
    min-width: 600px; /* برای موبایل اسکرول */
}

    .custom-gridview th {
        background: linear-gradient(90deg, #009f7f, #00c29a);
        color: #fff;
        text-align: center;
        font-weight: bold;
    }

    .custom-gridview td {
        text-align: center;
        vertical-align: middle;
    }

    .custom-gridview tr:hover {
        background: #f8fdfb !important;
    }

.btn-custom {
    background: #54c392;
    color: white;
    border-radius: 6px;
    padding: 5px 12px;
    border: none;
    transition: 0.3s;
}

    .btn-custom:hover {
        background: #3aa878;
    }

/* کارت‌ها */
.cards-wrapper {
    max-width: 1200px; /* محدودیت عرض کل کارت‌ها */
    margin: 0 auto; /* وسط چین کردن کل مجموعه */
    font-weight:bold;
}

.info-card {
    flex: 1 1 250px; /* هر کارت حداقل 250px عرض داشته باشه */
    border-radius: 16px;
    color: #fff;
    transition: all 0.3s;
    text-align: center;
    min-height: 200px;
    font-weight:400;
}

    .info-card i {
        font-size: 2rem;
        margin-bottom: 1rem;
        font-weight: bold;
    }

    .info-card.blue {
        background: linear-gradient(135deg, #0078D7, #56b4ef);
    }

    .info-card.yellow {
        background: linear-gradient(135deg, #f6c343, #ffd580);
        color: #333;
    }

    .info-card.green {
        background: linear-gradient(135deg, #54c392, #77d7aa);
    }

    .info-card.red {
        background: linear-gradient(135deg, #ffcccc, #ffebeb);
        color: #b30000;
    }



/* چک‌باکس مدرن */
/*.custom-check {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #54c392;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    margin-left: 6px;
    outline: none;
    transition: all 0.2s ease;
}

    .custom-check:checked {
        background: #54c392;
        border-color: #54c392;
    }

        .custom-check:checked::after {
            content: "✔";
            color: #fff;
            font-size: 14px;
            position: absolute;
            top: -2px;
            left: 3px;
        }*/

/* دکمه جستجو سبز ملایم */
.btn-search {
    background: #54c392;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    border-radius: 8px;
}

    .btn-search:hover {
        background: #3aa878;
    }

footer {
    background: #f5f5f5;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-top: 2rem;
}

/* انیمیشن لوگو */
@keyframes pulseLogo {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #00c29a);
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 12px #00c29a);
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #00c29a);
    }
}

.logo-anim {
    animation: pulseLogo 4s infinite;
    transition: all 0.3s ease;
    font-family: 'Pelak';
   
}

/* انیمیشن بک‌گراند هدر */
header {
    background: linear-gradient(-45deg, #d7f5e8, #b9f1dc, #d7f5e8, #a5e6ce);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    padding: 2rem 1rem;
    text-align: center;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}



/* --- لودینگ مستقل --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loader-container {
    text-align: center;
}

.magnifier {
    width: 60px;
    height: 60px;
    border: 6px solid #54c392;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

    .magnifier .handle {
        width: 10px;
        height: 30px;
        background: #54c392;
        position: absolute;
        right: -15px;
        bottom: -5px;
        transform: rotate(-45deg);
        border-radius: 5px;
    }

.dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background: #54c392;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

    .dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}




/*================================================*/


/* 🔹 نسخه موبایل – بهینه‌سازی برای عرض کمتر از 768px */
@media (max-width: 768px) {

    header {
        padding: 1.2rem 0.5rem;
    }

        header img {
            width: 60px;
            margin-bottom: 6px;
        }

        header h1 {
            font-size: 1.3rem;
        }

    .store-box {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
    }

    .store-logo img {
        width: 90px;
        height: 80px;
    }

    .store-name {
        font-size: 1.2rem;
        margin-top: 0.3rem;
    }

    .alert-box {
        font-size: 0.8rem;
        padding: 0.8rem 1rem;
        margin-top: 0.8rem;
    }

    .search-box {
        padding: 0.8rem;
    }

        .search-box .row {
            row-gap: 0.8rem;
        }

    .btn-search {
        font-size: 1rem;
        padding: 0.6rem;
    }

    .custom-gridview {
        min-width: 100%;
        font-size: 0.85rem;
    }

        .custom-gridview th,
        .custom-gridview td {
            padding: 6px;
        }

    .btn-custom {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .info-card {
        flex: 1 1 100%;
        margin: 0.4rem 0;
        min-height: 150px;
        padding: 1rem;
        font-size: 0.9rem;
    }

        .info-card i {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

    footer {
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    /* ✅ لودینگ کوچکتر در موبایل */
    #pageLoader img.loading-logo {
        width: 70px;
    }

    #pageLoader p {
        font-size: 0.9rem;
    }
}

/* 🔹 نسخه خیلی کوچک (گوشی‌های قدیمی یا عرض < 420px) */
@media (max-width: 420px) {
    header h1 {
        font-size: 1.1rem;
    }

    .store-logo img {
        width: 70px;
        height: 60px;
    }

    .store-name {
        font-size: 1rem;
    }

    .btn-search {
        font-size: 0.9rem;
    }

    .info-card {
        font-size: 0.8rem;
        min-height: 130px;
    }

    .alert-box {
        font-size: 0.7rem;
    }
}




/* 🎯 ظاهر خاص‌تر برای تکست‌باکس جستجو */
.search-box input[type="text"],
.search-box input[type="search"],
.search-box .form-control {
    font-size: 1.1rem;
    padding: 0.8rem 1rem;
    border: 2px solid #b7e4c7; /* سبز خیلی ملایم */
    border-radius: 10px;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);*/
    transition: all 0.3s ease;
    background-color: #ffffff;
}

    /* ✅ حالت فوکوس */
    .search-box input[type="text"]:focus,
    .search-box input[type="search"]:focus,
    .search-box .form-control:focus {
        border-color: #54c392 !important; /* سبز اصلی */
        box-shadow: 0 0 10px rgba(84, 195, 146, 0.4);
        outline: none;
    }

        /* ✨ افکت کوچک هنگام فوکوس */
        .search-box input[type="text"]:focus::placeholder {
            color: #54c392;
            opacity: 0.8;
        }

/* 📱 نسخه موبایل */
@media (max-width: 768px) {
    /* فونت کوچک‌تر گریدویو */
    .custom-gridview {
        font-size: 0.8rem;
    }

    /* دکمه مشاهده */
    .btn-custom {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* تکست‌باکس کمی جمع‌تر */
    .search-box input[type="text"],
    .search-box input[type="search"],
    .search-box .form-control {
        font-size: 1rem;
        padding: 0.6rem 0.9rem;
    }
}

/* 📱 نمایشگرهای خیلی کوچک */
@media (max-width: 420px) {
    .custom-gridview {
        font-size: 0.75rem;
    }

    .btn-custom {
        font-size: 0.75rem;
        padding: 3px 7px;
    }
}


/* ✅ چینش کپچا در موبایل – تصویر در وسط */
@media (max-width: 768px) {
    .captcha-inline {
        display: flex;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

        /* 🔹 ترتیب جدید */
        .captcha-inline .form-control {
            order: 1; /* اول */
            width: 120px;
            font-size: 0.85rem;
            padding: 6px 4px;
            text-align: center;
        }

        .captcha-inline img {
            order: 2; /* وسط */
            width: 80px;
            height: 36px;
        }

        .captcha-inline button {
            order: 3; /* آخر */
            white-space: nowrap;
            padding: 6px 8px;
            font-size: 0.8rem;
        }

    /* پیام خطا زیر ردیف کپچا */
    #captchaRow .text-danger {
        display: block;
        width: 100%;
        margin-top: 8px !important;
        text-align: center;
    }
}



/* 🔴 حالت هشدار برای باکس کپچا */
/* 🔴 حالت خطا */
#captchaBox.error {
    background: #ffeaea !important;
    border: 0px solid #ff6b6b !important;
    border-radius: 10px;
    /*box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);*/
    transition: all 0.3s ease;
}

/* 🟢 حالت موفقیت (کپچا درست وارد شد) */
#captchaBox.success {
    background: #e9fff1 !important; /* سبز خیلی ملایم */
    border: 0px solid #6ed88a !important; /* سبز روشن */
    border-radius: 10px;
    /*box-shadow: 0 0 10px rgba(110, 216, 138, 0.3);*/
    transition: all 0.3s ease;
    animation: pulseSuccess 0.8s ease; /* انیمیشن لطیف */
}

/* ✨ افکت چشمک سبز ملایم */
@keyframes pulseSuccess {
    0% {
        box-shadow: 0 0 0 rgba(110, 216, 138, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(110, 216, 138, 0.8);
    }

    100% {
        box-shadow: 0 0 0 rgba(110, 216, 138, 0.4);
    }
}

/* حالت عادی */
#captchaBox {
    transition: all 0.3s ease;
}


    #captchaBox .search-box {
        background: transparent !important;
    }


