/* ═══════════════════════════════════════
   فونت RaviFaNum
═══════════════════════════════════════ */
@font-face {
    font-family: 'RaviFaNum';
    src: url('https://eshopping.center/assets/fonts/1774627375_RaviFaNum-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   متغیرهای سراسری (پالت کلاسیک آبی یکپارچه)
   ========================================= */
:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #e8f0fe;
    --primary-hover: #005ce6;
    --secondary: #6c757d;
    --accent: #8b5cf6;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #ffc107;
    --info: #17a2b8;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --text: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --border: #dee2e6;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-800: #343a40;
    --gray-900: #212529;
    --footer-bg: rgba(255, 255, 255, 0.92);
    --footer-border: rgba(222, 226, 230, 0.6);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.12);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font-main: var(--main-font, 'Roboto', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif);

    --transition: all 0.3s ease;
        --icon-color: #333333; /* رنگ آیکن در حالت روز */

}



/* فونت مخصوص حالت راست‌چین (RTL) */
[dir="rtl"], body.rtl {
    --font-main: 'RaviFaNum', 'Vazirmatn', Tahoma, sans-serif;
}

[dir="rtl"] .action-button img[alt="share"] {
    transform: scaleX(-1);
}
/* =========================================
   تنظیمات رنگ آیکون‌ها در حالت دارک مود
   ========================================= */

/* 1. اعمال رنگ سفید به آیکون‌های فونتی (Font Icons) */
[data-theme="dark"] .icon, 
[data-theme="dark"] .bx, 
[data-theme="dark"] .fa, 
[data-theme="dark"] .fas, 
[data-theme="dark"] .far, 
[data-theme="dark"] .fab,
[data-theme="dark"] .menu-icon {
    color: #ffffff !important;
}

/* 2. اعمال رنگ سفید به آیکون‌های خطی (SVG) */
/* نکته: از هدف قرار دادن همه svg ها خودداری شده تا لوگوهای رنگی خراب نشوند */
[data-theme="dark"] svg.chevron-icon,
[data-theme="dark"] svg.icon /* در صورت وجود این کلاس روی svg ها */ {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* 3. سفید کردن آیکون‌های عکس (img) با استفاده از فیلتر در حالت دارک مود */

[data-theme="dark"] img.icon,
[data-theme="dark"] .menu-toggle img,       /* دکمه همبرگری */
[data-theme="dark"] .add-menu-btn img,      /* دکمه + */
[data-theme="dark"] .notification-link img, /* زنگوله نوتیفیکیشن */
[data-theme="dark"] .search-btn img,        /* آیکن ذره‌بین در جستجو */
[data-theme="dark"] .footer-bar img,        /* آیکن‌های نوار پایین صفحه (فوتر) */
[data-theme="dark"] .product-stats .stat-item img, /* اینجا کاما اضافه شد */
[data-theme="dark"] .actions .action-button img:not([src*="Heart-red"]) /* استثنا کردن قلب قرمز */
{       
    filter: brightness(0) invert(1) !important;
}

html, body {
  overscroll-behavior-y: auto;
}
body {
    font-family: var(--font-main);
    font-weight: 400;
    background-color: var(--light-gray);
    color: var(--text);
    line-height: 1.6;
    text-align: start;
    /* overflow-x: hidden; <-- این خط حذف شد */
    padding-bottom: calc(75px + env(safe-area-inset-bottom));
}



/* ۲. کلاس جدید را با overflow تعریف کنید */
.page-wrapper {
    overflow-x: hidden;
}

/* =========================================
   ریست و استایل‌های پایه
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; }
strong, b { font-weight: 600; }
a { text-decoration: none; color: var(--primary); transition: color 0.2s ease; }
a:hover, a:focus { text-decoration: none; color: var(--primary-dark); }
ul, ol { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }


/* =========================================
   ساختار کلی (Layout)
   ========================================= */
.container { max-width: 1200px; margin-inline: auto; margin-block: clamp(20px, 5vh, 40px); background: var(--white); padding-inline: clamp(15px, 4vw, 20px); padding-block: 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* =========================================
   هدر صفحه - استایل پرمیوم گرادیانت
   ========================================= */
.hidden {
    display: none !important;
}   
   .header-logo-img {
    height: 38px;
    max-width: 180px;
    object-fit: contain;
}
body.dark .header-logo-img,
[data-theme="dark"] .header-logo-img {
    /* 
      1. invert(1): مشکی را سفید و رنگ‌ها را معکوس می‌کند.
      2. hue-rotate(180deg): رنگ‌های معکوس شده را دوباره به طیف اصلی خودشان برمی‌گرداند.
    */
    filter: invert(1) hue-rotate(180deg);
}

.page-header { position: relative; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: var(--radius-xl); padding: clamp(35px, 6vw, 50px) clamp(20px, 4vw, 40px); margin-block-end: 40px; box-shadow: 0 15px 35px rgba(0, 102, 255, 0.2); display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; z-index: 1; }
.page-header::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--white) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.1; z-index: -1; animation: panPattern 20s linear infinite; }
@keyframes panPattern { 0% { background-position: 0 0; } 100% { background-position: 40px 40px; } }
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--white); font-weight: 800; margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.page-header p { font-size: clamp(0.95rem, 2vw, 1.1rem); color: var(--primary-light); max-width: 550px; font-weight: 500; line-height: 1.6; opacity: 0.95; }
.page-title { text-align: center; margin-block-end: clamp(25px, 5vw, 40px); font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 800; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 10px; }

/* =========================================
   هدر اصلی
   ========================================= */
header { background: var(--white); border-bottom: 1px solid var(--border); height: 56px; padding: 0 16px; position: sticky; top: 0; z-index: 1002; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }

.header-left, .header-center, .header-right { display: flex; align-items: center; gap: 12px; }

.header-center { flex: 1; justify-content: center; }
.logo img { height: 38px; max-width: 180px; object-fit: contain; }
.menu-toggle { font-size: 26px; background: none; border: none; cursor: pointer; color: var(--text); padding: 8px; }

/* =========================================
   نوار فروشگاه (Store Navbar)
   ========================================= */
.store-navbar { width: 100%; background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 56px; z-index: 1003; transition: all 0.25s ease; }
.store-navbar-inner { max-width: 1200px; margin: 0 auto; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.context-nav {
    position: -webkit-sticky; /* برای پشتیبانی سافاری */
    position: sticky;
    top: 56px; /* دقیقاً معادل ارتفاع هدر */
    z-index: 1001; /* یک واحد کمتر از هدر که زیر آن نرود */
}

.store-logo img { height: 26px; width: auto; object-fit: contain; padding: 4px 10px; border-radius: 10px; transition: all 0.28s cubic-bezier(.4,0,.2,1); }
.store-logo img:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.store-name { font-weight: 600; font-size: 15px; color: var(--text); }
.store-actions a {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
/* =========================================
   منوی کشویی اصلی و استایل دهی دقیق به <ul> و <li>
   ========================================= */
.side-menu, .add-side-menu {
    position: fixed; top: 0; bottom: 0; width: 0; max-width: 280px; height: 100%;
    background: var(--white); z-index: 1001; overflow-x: hidden; overflow-y: auto;
    padding-top: 64px; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

 /* ===== Warning Message ===== */
        .warning-message {
            background: #fff3cd;
            color: #856404;
            padding: 15px 20px;
            margin: 20px auto;
            max-width: 1300px;
            border-radius: var(--radius-md);
            border: 1px solid #ffeeba;
            text-align: center;
            font-weight: 500;
        }

        .warning-message a {
            color: #004085;
            font-weight: 700;
            text-decoration: underline;
        }
    
        
/* components/alerts.css - Alert and error styles */
.alert {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    border: 1px solid transparent;
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger-border);
}

.alert-success {
    background-color: #e7f7e7;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.alert-warning {
    background-color: #fff8e1;
    color: #ff8f00;
    border-color: #ffd54f;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}

.alert-dismissible {
    position: relative;
    padding-right: var(--spacing-xl);
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
}

        /* ================= UNVERIFIED BOX ================= */
.unverified-box {
    text-align: center;

    padding: 40px 20px;
    margin-bottom: 40px;

    background: #fff;
    border: 2px dashed var(--danger);
    border-radius: 16px;

    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.05);
}

.unverified-box h3 {
    color: var(--danger);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.unverified-box p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

        
        
        
[dir="rtl"] .side-menu { right: 0; border-left: 1px solid var(--border); }
[dir="ltr"] .side-menu { left: 0; border-right: 1px solid var(--border); }
[dir="rtl"] .add-side-menu { left: 0; border-right: 1px solid var(--border); }
[dir="ltr"] .add-side-menu { right: 0; border-left: 1px solid var(--border); }
.side-menu.expanded, .add-side-menu.expanded { width: 280px; }

/* --- استایل دهی قطعی لیست برای نمایش عمودی --- */
.side-menu-list, .side-menu-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* اجبار به نمایش زیر هم */
    width: 100%;
}

.menu-item, .submenu-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu-divider hr {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.menu-item > a, .submenu-item > a {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 20px;
    color: var(--text); 
    text-decoration: none; 
    transition: background 0.2s;
    width: 100%;
    white-space: nowrap;
}
.menu-item > a:hover, .submenu-item > a:hover { background: var(--gray-100); }

.menu-item img.icon, .submenu-item img.icon, .menu-item svg {
    width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; 
}
.menu-item .menu-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.menu-item .chevron-icon { 
    margin-inline-start: auto; 
    transition: transform 0.3s ease; 
    width: 20px; 
    height: 20px; 
}
/* چرخش آیکون در زمان باز بودن زیرمنو */
.menu-item.open > a .chevron-icon,
.submenu.open ~ a .chevron-icon { transform: rotate(180deg); }

/* --- استایل زیرمنو --- */
.side-menu .submenu {
    background-color: rgba(0,0,0,0.03);
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease-in-out;
}
.side-menu .submenu.open, .side-menu .menu-item.open > .submenu {
    max-height: 800px; /* باز شدن منو */
}

.submenu-item > a {
    font-size: 0.9em;
    padding-inline-start: 40px; /* فاصله از راست برای زیرمنوها */
}
[data-theme="dark"] .side-menu .submenu { background-color: rgba(255,255,255,0.04); }

/* بقیه استایل‌ها... */
.sidebar-bottom-item { background-color: var(--gray-100); border: 1px solid var(--border); border-radius: var(--radius-md); margin: 10px 15px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; transition: all 0.3s ease; color: var(--text); }

.action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            flex-wrap: wrap;
            animation: fadeInUp 0.8s ease 0.3s both;
        }

        .btn {
            padding: 12px 30px;
            border-radius: var(--radius-full);
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            border: none;
            text-decoration: none;
            display: inline-block;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .btn-follow {
            background: white;
            color: var(--primary);
        }

        .btn-follow:hover {
            background: var(--primary-light);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(255,255,255,0.3);
        }

        .btn-unfollow {
            background: #9ca3af;
            color: white;
        }

        .btn-unfollow:hover {
            background: #6b7280;
            transform: translateY(-3px);
        }

        .btn-message {
            background: white;
            color: var(--primary);
        }

        .btn-message:hover {
            background: var(--primary-light);
            transform: translateY(-3px);
        }

        .btn-contact {
            background: var(--secondary);
            color: white;
        }

        .btn-contact:hover {
            background: #0e9f6e;
            transform: translateY(-3px);
        }

        .btn-edit {
            background: white;
            color: var(--primary);
        }

        .btn-edit:hover {
            background: var(--primary-light);
            transform: translateY(-3px);
        }
        
        .btn-link {
           display: inline-block;
           margin-top: 10px;
           color: var(--primary);
           font-weight: bold;
           text-decoration: none;
        }

        .btn-link:hover {
          text-decoration: underline;
        }    
        
        
        .btn-link {
           display: inline-block;
           margin-top: 10px;
           color: var(--primary);
           font-weight: bold;
           text-decoration: none;
        }

        .btn-link:hover {
           text-decoration: underline;
        }
        
        .btn-buy {
           display: inline-block;
           width: 100%;
           padding: 14px;
           font-size: 1.1rem;
           font-weight: 700;
           font-family: inherit;
           background: var(--primary);
           color: #fff;

           border: none;
           border-radius: 12px;

           text-decoration: none;
           cursor: pointer;

           transition: all 0.2s;
        }

        .btn-buy:hover {
           background: var(--primary-hover);
           transform: scale(1.02);
        }

        .btn-buy.green {
           background: var(--success);
        }

        .btn-buy.green:hover {
           background: var(--success-hover);
        }

/* ===== دکمه‌های فرم ===== */
.btn-primary-form {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-sizing: border-box;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary-form:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger-form {
    background: var(--danger);
    color: var(--white);
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-family: inherit;
}

.btn-danger-form:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* دکمه حذف کوچک (داخل جدول / چک‌لیست) */
.btn-delete {
    background: #fee2e2;
    color: var(--danger);
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #f87171;
    width: auto;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}

.btn-delete:hover {
    background: #f87171;
    color: var(--white);
}

.btn-primary-form,
.btn-danger-form {
    margin-top: 25px !important; 
}

/* ================= OUTLINE BUTTON ================= */
        .btn-outline {
           display: inline-block;

           padding: 12px 24px;

           border: 2px solid var(--primary);
           border-radius: 8px;

           color: var(--primary);
           font-weight: bold;
           text-decoration: none;

           transition: 0.2s;
        }

        .btn-outline:hover {
           background: var(--primary);
           color: #fff;
        }  
   
   .add-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1050;
    display: inline-flex; /* برای تراز بهتر آیکون داخل دکمه */
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

/* افکت هاور (اختیاری) برای اینکه کاربر متوجه قابل کلیک بودن بشود */
.add-menu-btn:hover {
    opacity: 0.7;
}


     
  
/* =========================================
   Badges Styles (Light Mode / Default)
   ========================================= */
.badge {
    position: absolute; 
    top: -6px; 
    inset-inline-end: -8px; 
    background: #ff3b30; 
    color: #ffffff;
    font-size: 10px; 
    font-weight: 600; 
    min-width: 16px; /* کمی بزرگتر برای اعداد دو رقمی */
    height: 16px;
    padding: 0 4px; 
    border-radius: 10px; 
    /* استفاده از فلکس‌باکس برای وسط‌چین کردن دقیق عدد */
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge1 {
    position: absolute; 
    top: 10px; 
    inset-inline-end: 12px; 
    background: #ff3b30; 
    color: #ffffff;
    font-size: 10px; 
    font-weight: 600; 
    min-width: 16px; 
    height: 16px;
    padding: 0 4px; 
    border-radius: 10px; 
    /* وسط‌چین کردن دقیق */
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-badge {
    background: #ff3b30; 
    color: #ffffff; 
    font-size: 11px; 
    font-weight: 600; 
    min-width: 18px; 
    height: 18px; 
    padding: 0 6px; 
    border-radius: 9px;
    margin-inline-start: auto; 
    margin-inline-end: 8px; 
    /* وسط‌چین کردن دقیق */
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-link {
    position: relative; 
    display: inline-flex; 
    align-items: center; 
    margin-inline-end: 30px; 
    text-decoration: none;
}

.group-badge1 {
    position: absolute; 
    top: 3px; 
    inset-inline-start: 4px; 
    background: #ff3b30; 
    color: #ffffff;
    font-size: 11px; 
    font-weight: 600; 
    min-width: 16px; 
    height: 16px;
    padding: 0 4px; 
    border-radius: 10px; 
    /* ایجاد حاشیه سفید برای جدا شدن از المان زیرین */
    box-shadow: 0 0 0 2px #ffffff; 
    /* وسط‌چین کردن دقیق */
    display: flex;
    align-items: center;
    justify-content: center;
}
/* استایل‌های مربوط به دکمه سبد خرید */
.cart-link {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    text-decoration: none;
}





/* استایل‌های دایره قرمز رنگ (عدد سبد خرید) */
.cart-badge {
    position: absolute !important;
    top: -6px !important;
    inset-inline-end: -8px !important; /* به صورت هوشمند در فارسی سمت راست و در انگلیسی سمت چپ قرار می‌گیرد */
    background-color: #ff3b30 !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    min-width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    z-index: 10 !important;
}


/* =========================================
   Badges Styles (Dark Mode)
   ========================================= */
/* اگر از کلاس .dark روی تگ body استفاده می‌کنید */
body.dark .badge,
body.dark .badge1,
body.dark .group-badge,
body.dark .group-badge1 {
    /* در دارک مد معمولاً قرمز کمی ملایم‌تر چشم را کمتر خسته می‌کند */
    background: #ef4444; 
    color: #ffffff;
}

/* مهم‌ترین بخش دارک مد: تغییر رنگ حاشیه (سایه) است تا با پس‌زمینه تیره هماهنگ شود */
body.dark .group-badge1 {
    /* رنگ #1e1e1e را با رنگ بک‌گراند هدر دارک‌مد خود جایگزین کنید */
    box-shadow: 0 0 0 2px #1e1e1e; 
}

        /* =========================================
   استایل فیلد آپلود فایل (حالت روز / پیش‌فرض)
   ========================================= */

/* استایل باکس کلی آپلود */
input[type="file"] {
    padding: 8px;
    background-color: #f8f9fa; /* پس‌زمینه ملایم */
    border: 2px dashed #ccc; /* حاشیه نقطه‌چین برای القای حس آپلود */
    border-radius: 8px;
    color: #555; /* رنگ متن نام فایل‌های انتخاب شده */
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

/* تغییر رنگ حاشیه وقتی موس روی آن می‌رود */
input[type="file"]:hover {
    border-color: #3897f0; 
}

/* استایل دکمه داخلی (انتخاب فایل) */
input[type="file"]::file-selector-button {
    background-color: #3897f0;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    margin-inline-end: 15px; /* فاصله دکمه با متن نام فایل */
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #2a80d9;
}


/* =========================================
   استایل فیلد آپلود فایل (حالت شب / Dark Mode)
   ========================================= */

[data-theme="dark"] input[type="file"] {
    background-color: #334155; /* پس‌زمینه تیره */
    border-color: #475569; /* حاشیه تیره */
    color: #cbd5e1; /* رنگ متن نام فایل‌ها در دارک مود */
}

[data-theme="dark"] input[type="file"]:hover {
    border-color: #66b0ff; /* آبی روشن در هاور برای تضاد بهتر */
}

[data-theme="dark"] input[type="file"]::file-selector-button {
    background-color: #2563eb; /* آبی هماهنگ با دارک مود */
    color: #ffffff;
}

[data-theme="dark"] input[type="file"]::file-selector-button:hover {
    background-color: #3b82f6; /* روشن‌تر شدن دکمه در هاور */
}

        
        
/* =========================================
   نوار فوتر چسبان (Footer Bar)
   ========================================= */
.footer-bar { position: fixed; bottom: 0; inset-inline: 0; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--footer-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--footer-border); box-shadow: 0 -3px 12px rgba(0,0,0,0.06); display: flex; justify-content: space-around; align-items: center; z-index: 900; padding-inline: 8px; transition: background 0.3s ease, border-color 0.3s ease; }
.footer-bar a { flex: 1; max-width: 80px; text-decoration: none; color: var(--gray); font-size: 11px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; transition: all 0.3s ease; border-radius: 8px; }
.footer-bar a:hover, .footer-bar a.active { color: var(--primary); }
.footer-bar a.active img { transform: translateY(-2px) scale(1.05); filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.3)); }
.footer-bar a img { width: 24px; height: 24px; object-fit: contain; transition: transform 0.3s ease, filter 0.3s ease; }
.footer-bar .avatar { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border); object-fit: cover; }
.footer-bar span.label { font-size: 9.5px; font-weight: 500; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================
   سرچ باکس کشویی (Top Drawer)
   ========================================= */
#topDrawer { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 20px; transform: translateY(-100%); transition: transform 0.45s cubic-bezier(0.23,1,0.32,1); }
#topDrawer.open { transform: translateY(0); }
.google-like-search { background: var(--white); border-radius: 16px; padding: 40px 30px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); text-align: center; }
.search-input-wrapper input[type="search"] { width: 100%; font-size: 1.1rem; border: none; border-radius: 999px; background: var(--light-gray); padding: 16px; padding-inline-start: 60px; padding-inline-end: 20px; outline: none; }
.search-input-wrapper input[type="search"]:focus { background: var(--white); box-shadow: 0 0 0 2px var(--primary); }
.search-btn, .mic-btn

/* استایل پایه (حالت روشن) */
.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #4b5563; /* رنگ خاکستری تیره برای حالت عادی */
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
    color: #ef4444; /* قرمز شدن هنگام هاور در حالت روشن */
    transform: scale(1.1);
}

/* ----------------------------------- */
/* استایل‌های حالت تاریک (Dark Mode)  */
/* ----------------------------------- */
body.dark .close-btn,
[data-theme="dark"] .close-btn {
    color: #f3f4f6; /* رنگ سفید مایل به خاکستری برای دیده شدن در بک‌گراند تیره */
}

body.dark .close-btn:hover,
[data-theme="dark"] .close-btn:hover {
    color: #f87171; /* قرمز کمی روشن‌تر برای زیبایی بیشتر در دارک مود */
}
/* استایل پایه (حالت روشن) */
.report-label {
    color: #ff4757; /* همان رنگ قرمز اصلی شما */
    font-weight: bold;
}

/* ----------------------------------- */
/* استایل‌های حالت تاریک (Dark Mode)  */
/* ----------------------------------- */
body.dark .report-label,
[data-theme="dark"] .report-label {
    color: #ff6b81; /* رنگ قرمز کمی روشن‌تر و ملایم‌تر برای دید بهتر در تاریکی */
}

/* =========================================
   Add Menu Header (حالت روشن - پایه)
========================================= */
.add-menu-header {
    display: flex;
    justify-content: space-between; /* قرار دادن عنوان در یک سمت و دکمه ضربدر در سمت دیگر */
    align-items: center; /* تراز کردن عمودی */
    padding: 16px 20px; /* فضای تنفس (فاصله داخلی) مناسب */
    border-bottom: 1px solid #e5e7eb; /* یک خط جداکننده ظریف در پایین هدر */
    background-color: transparent; /* هماهنگ با پس‌زمینه خود سایدبار */
    color: #1f2937; /* رنگ متن تیره برای خوانایی */
}

/* استایل متن عنوان (Add New) */
.add-menu-header span {
    font-size: 16px;
    font-weight: 600; /* ضخامت مناسب برای عنوان */
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

/* =========================================
   Add Menu Header (حالت تاریک - Dark Mode)
========================================= */
body.dark .add-menu-header,
[data-theme="dark"] .add-menu-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* خط جداکننده شفاف و ملایم برای دارک مود */
    color: #f3f4f6; /* رنگ متن روشن */
}

/* (اختیاری) اگر می‌خواهید در دارک مود هدر کمی متمایزتر باشد، می‌توانید یک بک‌گراند تیره ملایم به آن بدهید */
body.dark .add-menu-header {
    background-color: rgba(0, 0, 0, 0.15); 
}
/* استایل نگهدارنده آیتم‌های منو */
.add-menu-items {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 5px; /* فاصله بین دکمه‌ها و لینک‌ها */
}

/* استایل لینک‌های داخل منو */
.add-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151; /* رنگ متن تیره */
    border-radius: 8px; /* گوشه‌های گرد */
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

/* افکت رفتن ماوس روی لینک‌ها */
.add-menu-link:hover {
    background-color: #f3f4f6; /* پس‌زمینه خاکستری روشن */
    color: #111827;
}

/* استایل دکمه تغییر تم (دارک/لایت) */
.btn-theme {
    background: none;
    border: none;
    text-align: left; /* یا right برای سایت راست‌چین */
    padding: 12px 16px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.btn-theme:hover {
    background-color: #f3f4f6;
}
/* =========================================
   Drawer Container (کشو جستجو)
========================================= */
#topDrawer {
    position: fixed;
    top: 0;
    /* استفاده از inset-inline به جای left و right برای هوشمندی RTL/LTR */
    inset-inline-start: 0; 
    inset-inline-end: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 20px;
    z-index: 9999;
    
    /* انیمیشن کشویی از بالا */
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* چینش محتوا */
    display: flex;
    justify-content: center;
}

/* کلاسی که با جاوااسکریپت برای نمایش کشو اضافه می‌شود */
#topDrawer.open {
    transform: translateY(0);
}

/* =========================================
   Close Button (دکمه بستن)
========================================= */
#topDrawer .close-btn {
    position: absolute;
    top: 20px;
    /* در RTL سمت چپ و در LTR سمت راست قرار می‌گیرد */
    inset-inline-end: 20px; 
    background: transparent;
    border: none;
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

#topDrawer .close-btn:hover {
    background-color: #f1f3f4;
    color: #202124;
}

/* =========================================
   Main Search Wrapper
========================================= */
.google-like-search {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px; /* فاصله بین المان‌ها */
}

/* لوگو */
.logo-wrapper .search-logo {
    max-height: 48px;
    object-fit: contain;
}

/* =========================================
   Search Form & Input
========================================= */
.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe1e5;
    border-radius: 30px; /* شکل کپسولی */
    padding: 0 8px;
    height: 52px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* افکت Focus - سایه شبیه گوگل */
.search-input-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: transparent;
}

/* فیلد ورودی */
.search-input-wrapper input[type="search"] {
    flex-grow: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #202124;
    font-family: inherit;
    /* پدینگ هوشمند بر اساس زبان */
    padding-inline-start: 16px;
    padding-inline-end: 8px;
}

/* مخفی کردن دکمه (X) پیش‌فرض مرورگر در فیلد سرچ */
.search-input-wrapper input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* دکمه ارسال */
.search-input-wrapper .search-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-input-wrapper .search-btn:hover {
    background-color: #f1f3f4;
}

.search-input-wrapper .search-btn img {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.search-input-wrapper .search-btn:hover img {
    opacity: 0.9;
}

/* =========================================
   Quick Suggestions (پیشنهادات سریع)
========================================= */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.quick-suggestions a {
    text-decoration: none;
    color: #3c4043;
    font-size: 14px;
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.2s ease;
    display: inline-block;
    white-space: nowrap;
}

.quick-suggestions a:hover {
    background-color: #f1f3f4;
    color: #202124;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* =========================================
   Responsive (موبایل)
========================================= */
@media (max-width: 576px) {
    #topDrawer {
        padding: 30px 16px;
    }
    
    .search-input-wrapper {
        height: 48px;
    }
    
    .search-input-wrapper input[type="search"] {
        font-size: 14px;
    }
    
    .quick-suggestions a {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* =========================================
   حالت تاریک (Dark Mode)
========================================= */
body.dark .add-menu-link,
[data-theme="dark"] .add-menu-link {
    color: #e5e7eb; /* متن روشن */
}

body.dark .add-menu-link:hover,
[data-theme="dark"] .add-menu-link:hover,
body.dark .btn-theme:hover,
[data-theme="dark"] .btn-theme:hover {
    background-color: rgba(255, 255, 255, 0.1); /* پس‌زمینه محو در دارک مود */
    color: #ffffff;
}

/* =========================================
   پنجره مودال گزارش
   ========================================= */
.report-modal-overlay, #offline-screen { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
#offline-screen:not(.hidden) { display: flex; }
.report-modal-content { background: var(--white); border-radius: var(--radius-lg); padding: 25px; width: 100%; max-width: 450px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 15px; }
.report-modal-content h3 { margin-bottom: 10px; color: var(--text); }
.report-modal-content select, .report-modal-content textarea, .report-modal-content input { width: 100%; padding: 10px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--light-gray); color: var(--text); font-family: inherit; }
.report-modal-content textarea { min-height: 100px; resize: vertical; }
.report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.btn-cancel-report, .btn-submit-report { padding: 10px 20px; border: none; border-radius: var(--radius-md); cursor: pointer; font-family: inherit; font-weight: 600; }
.btn-cancel-report { background: var(--gray-200); color: var(--text); }
.btn-submit-report { background: var(--primary); color: #fff; }

/* =========================================
   دارک مود (Dark Mode)
   ========================================= */
[data-theme="dark"] {
    --primary: #3385ff; --primary-dark: #66a3ff; --primary-light: #1e293b; --primary-hover: #1a73e8;
    --dark: #f8f9fa; --dark-light: #dee2e6; --text: #f1f5f9; --gray: #94a3b8; --light-gray: #0f172a; --white: #1e293b; --border: #334155;
    --gray-100: #1e293b; --gray-200: #334155; --gray-300: #475569; --gray-800: #cbd5e1; --gray-900: #f1f5f9;
    --footer-bg: rgba(30, 41, 59, 0.92); --footer-border: rgba(51, 65, 85, 0.6);
}
[data-theme="dark"] header, [data-theme="dark"] .store-navbar, [data-theme="dark"] .side-menu, [data-theme="dark"] .add-side-menu, [data-theme="dark"] .context-nav { background-color: var(--white); border-color: var(--border); }
[data-theme="dark"] .sidebar-bottom-item, [data-theme="dark"] #theme-toggle { background-color: var(--light-gray) !important; border-color: var(--border) !important; color: var(--text) !important; }
[data-theme="dark"] .google-like-search, [data-theme="dark"] .report-modal-content, [data-theme="dark"] #offline-screen > div { background-color: var(--white); color: var(--text); border-color: var(--border); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background-color: var(--light-gray); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-cancel-report { background-color: var(--gray-300); color: var(--text); }
[data-theme="dark"] a { color: #66b0ff; }
[data-theme="dark"] a:hover, [data-theme="dark"] a:focus { color: #99ccff; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: var(--text) !important; }

/* =========================================
   اصلاح استایل گلوبال لینک‌ها در دارک مود
   ========================================= */

/* 1. لینک‌های معمولی (مثل ایمیل، تلفن و لینک‌های متنی): آبی روشن و خوانا */
[data-theme="dark"] a {
    color: #66b0ff; /* رنگ آبی روشن با کنتراست بالا برای زمینه تیره */
}

[data-theme="dark"] a:hover, 
[data-theme="dark"] a:focus {
    color: #99ccff; /* روشن‌تر شدن در زمان هاور */
}

/* 2. استثنا برای دکمه‌ها: لینک‌هایی که کلاس دکمه دارند (مثل اینستاگرام) باید سفید بمانند */
[data-theme="dark"] a.social-btn,
[data-theme="dark"] a.btn-buy,
[data-theme="dark"] a.btn-outline {
    color: #ffffff !important; 
}

/* تغییر رنگ متن دکمه‌های شبکه‌های اجتماعی هنگام رفتن موس روی آن‌ها (هاور) */
[data-theme="dark"] a.social-btn:hover {
    color: #99ccff !important;
}


/* =========================================
   استایل گلوبال تیترها و متون بولد در دارک مود
   ========================================= */

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text) !important; /* استفاده از متغیر رنگ متن روشن که در دارک مود تعریف کرده‌اید */
}

[data-theme="dark"] strong, 
[data-theme="dark"] b {
    color: #ffffff !important; /* متون بولد کاملاً سفید شوند تا در متن تیره برجسته‌تر دیده شوند */
}
/* اگر آیکون سبد خرید در دارک مود مشکی است و نیاز به سفید شدن دارد، این بخش را هم اضافه کنید */
[data-theme="dark"] .cart-link .icon {
    filter: invert(1);
}

/* ==========================================
   Store Menu (طراحی حرفه‌ای تب‌ها)
   ========================================== */

/* ۱. تعریف متغیرهای رنگی برای حالت روز (Light Mode) */
:root {
    --sm-border-color: #e5e7eb;   /* خط زیرین کل منو - خاکستری روشن */
    --sm-text-color: #6b7280;     /* رنگ متن تب‌های غیرفعال */
    --sm-text-hover: #111827;     /* رنگ متن هنگام هاور شدن - مشکی */
    --sm-text-active: #2563eb;    /* رنگ متن تب فعال - آبی (یا رنگ برند شما) */
    --sm-active-border: #2563eb;  /* رنگ خط زیرین تب فعال */
}

/* ۲. متغیرهای رنگی برای حالت شب (Dark Mode) */
@media (prefers-color-scheme: dark) {
    :root {
        --sm-border-color: #374151;  /* خط زیرین کل منو - تیره */
        --sm-text-color: #9ca3af;    /* رنگ متن تب‌های غیرفعال - روشن‌تر */
        --sm-text-hover: #f3f4f6;    /* رنگ متن هنگام هاور - متمایل به سفید */
        --sm-text-active: #ffffff;   /* رنگ متن تب فعال - کاملا سفید */
        --sm-active-border: #3b82f6; /* رنگ خط زیرین تب فعال - آبی روشن‌تر */
    }
}

/* در صورتی که دکمه تغییر حالت شب/روز دارید و کلاس dark به body می‌دهید: */
body.dark {
    --sm-border-color: #374151;
    --sm-text-color: #9ca3af;
    --sm-text-hover: #f3f4f6;
    --sm-text-active: #ffffff;
    --sm-active-border: #3b82f6;
}

/* ۳. نگهدارنده اصلی منو */
.store-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px; /* فاصله استانداردتر بین تب‌ها */
    padding: 0 20px; /* فقط پدینگ چپ و راست */
    margin-bottom: 20px; /* فاصله منو از محتوای پایین آن */
    border-bottom: 1px solid var(--sm-border-color);
    overflow-x: auto;
    -ms-overflow-style: none; /* مخفی کردن اسکرول‌بار در IE و Edge */
    scrollbar-width: none; /* مخفی کردن اسکرول‌بار در Firefox */
}

.store-menu::-webkit-scrollbar {
    display: none; /* مخفی کردن اسکرول‌بار در Chrome و Safari */
}

/* ۴. استایل لینک‌ها (تب‌ها) */
.store-menu a {
    text-decoration: none;
    color: var(--sm-text-color);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 4px; /* فضای کلیک بیشتر از بالا و پایین (پدینگ عمودی) */
    margin-bottom: -1px; /* ⭐ ترفند مهم: کشیدن تب به سمت پایین تا خط زیرین آن روی خط کانتینر بیفتد */
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease; /* انیمیشن نرم‌تر فقط برای رنگ‌ها */
}

/* ۵. استایل تب فعال */
.store-menu a.active {
    color: var(--sm-text-active);
    border-bottom-color: var(--sm-active-border);
    font-weight: 600;
}

/* ۶. افکت هاور برای تب‌های غیرفعال */
.store-menu a:hover:not(.active) {
    color: var(--sm-text-hover);
    border-bottom-color: var(--sm-border-color); /* هنگام هاور یک خط ظریف نشان داده شود */
}



/* =========================================
   واکنش‌گرایی (Media Queries)
   ========================================= */
@media (min-width: 768px) { .footer-bar { height: 68px; padding-inline: 20px; } .footer-bar a img { width: 26px; height: 26px; } body { padding-bottom: 80px; } }
@media (max-width: 768px) { 
header { padding: 0 12px; } 
.logo img { height: 34px; }
.store-navbar-inner { height: 44px; padding: 0 12px; } 
.store-menu { display: flex; overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 8px; padding: 0 10px; } 
.store-menu::-webkit-scrollbar { display: none; } 
    
}
@media (max-width: 640px) { .container { margin: 60px auto 20px; padding: 0; width: 100%; } }
@media (max-width: 576px) { #topDrawer { padding: 8px; align-items: flex-start; padding-top: 60px; } .google-like-search { padding: 20px 16px; border-radius: 12px; max-width: 100%;} .search-input-wrapper input[type="search"] { padding: 12px; padding-inline-start: 50px; padding-inline-end: 16px; font-size: 1rem; } }
/* =========================================
   لودر سراسری (Global Loader)
   ========================================= */
#global-loader {
    position: fixed;
    inset: 0; /* کشیده شدن به تمام جهت‌ها (بالا، پایین، چپ، راست) */
    background-color: var(--white); /* پس‌زمینه سفید (با دارک مود شما همگام است) */
    z-index: 99999; /* بالاتر از همه عناصر صفحه */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease; /* هماهنگ با تایمر 400 میلی‌ثانیه JS */
    
}

/* کلاس برای محو شدن نرم */
#global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* استایل اسپینر (حلقه چرخنده) */
#global-loader .spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.fade-out {
    opacity: 0;
    visibility: hidden;
}
/* انیمیشن چرخش */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ==========================================================
   Dark Mode Styles for Alerts, Warnings & Unverified Box
   ========================================================== */

/* ===== 1. Warning Message (پیام هشدار بالای صفحه) ===== */
[data-theme="dark"] .warning-message {
    /* استفاده از پس‌زمینه زرد/نارنجی با شفافیت ۱۵ درصد */
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffda6a; /* متن زرد روشن برای خوانایی بهتر */
    border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .warning-message a {
    color: #6ea8fe; /* لینک آبی روشن در پس‌زمینه تیره */
}

/* ===== 2. Alerts (آلرت‌های موفقیت، خطا، اطلاعات و ...) ===== */

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5; /* قرمز روشن */
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert-success {
    background-color: rgba(76, 175, 80, 0.15);
    color: #81c784; /* سبز روشن */
    border-color: rgba(76, 175, 80, 0.3);
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 143, 0, 0.15);
    color: #ffd54f; /* زرد/نارنجی روشن */
    border-color: rgba(255, 143, 0, 0.3);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(33, 150, 243, 0.15);
    color: #90caf9; /* آبی روشن */
    border-color: rgba(33, 150, 243, 0.3);
}

/* رنگ دکمه بستن در آلرت‌ها */
[data-theme="dark"] .alert-dismissible .close {
    color: inherit;
    opacity: 0.8;
}
[data-theme="dark"] .alert-dismissible .close:hover {
    opacity: 1;
}

/* ===== 3. Unverified Box (باکس حساب تایید نشده) ===== */
[data-theme="dark"] .unverified-box {
    background: #1e1e1e; /* پس‌زمینه تیره کارت */
    border-color: var(--danger, #ef4444); /* حفظ حاشیه قرمز */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4); /* تغییر رنگ سایه از قرمزِ روشن به مشکیِ غلیظ */
}

[data-theme="dark"] .unverified-box h3 {
    color: #fca5a5; /* قرمز روشن‌تر برای خوانایی بهتر تیتر */
}

[data-theme="dark"] .unverified-box p {
    color: #cbd5e1; /* خاکستری روشن برای متن توضیحات */
}

/* دکمه حذف کوچک */
[data-theme="dark"] .btn-delete {
    background: rgba(239, 68, 68, 0.15); /* قرمز محو */
    color: #ff7b72;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .btn-delete:hover {
    background: #ef4444;
    color: #ffffff;
}
/* =========================================
   حالت تاریک (Dark Mode) - هماهنگ با پالت شما
========================================= */
body.dark #topDrawer,
[data-theme="dark"] #topDrawer {
    background-color: #0a192f !important; /* رنگ آبی کلاسیک مخصوص دارک مد */
}

/* دکمه بستن کشو در دارک مد */
body.dark #topDrawer .close-btn,
[data-theme="dark"] #topDrawer .close-btn {
    color: #cbd5e1; /* رنگ خاکستری روشن/نقره‌ای برای دیده شدن روی پس‌زمینه تاریک */
    transition: all 0.3s ease; /* برای نرم‌تر شدن افکت هاور */
}

body.dark #topDrawer .close-btn:hover,
[data-theme="dark"] #topDrawer .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1); /* یک پس‌زمینه محو و شیشه‌ای روی تاریکی */
    color: #ffffff; /* در حالت هاور رنگ ضربدر کاملاً سفید شود */
}


/* فرم جستجو در دارک مد */
body.dark .search-input-wrapper,
[data-theme="dark"] .search-input-wrapper {
    background-color: var(--light-gray); /* در پالت شما رنگ #0f172a است */
    border-color: var(--border);         /* در پالت شما رنگ #334155 است */
}

body.dark .search-input-wrapper:focus-within,
[data-theme="dark"] .search-input-wrapper:focus-within {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    border-color: var(--primary); /* وقتی روی سرچ کلیک می‌شود، دور آن آبی ملایم می‌شود */
}

body.dark .search-input-wrapper input[type="search"],
[data-theme="dark"] .search-input-wrapper input[type="search"] {
    color: var(--text);
}

body.dark .search-input-wrapper input[type="search"]::placeholder,
[data-theme="dark"] .search-input-wrapper input[type="search"]::placeholder {
    color: var(--gray);
}

/* هاور دکمه ذره‌بین */
body.dark .search-input-wrapper .search-btn:hover,
[data-theme="dark"] .search-input-wrapper .search-btn:hover {
    background-color: var(--gray-200);
}

/* سفید کردن آیکون ذره‌بین در دارک مد */
body.dark .search-input-wrapper .search-btn img,
[data-theme="dark"] .search-input-wrapper .search-btn img {
    filter: invert(1) brightness(0.8);
}

body.dark .search-input-wrapper .search-btn:hover img,
[data-theme="dark"] .search-input-wrapper .search-btn:hover img {
    filter: invert(1) brightness(1);
}

/* پیشنهادات سریع در دارک مد */
body.dark .quick-suggestions a,
[data-theme="dark"] .quick-suggestions a {
    background-color: var(--light-gray);
    border-color: var(--border);
    color: var(--text);
}

body.dark .quick-suggestions a:hover,
[data-theme="dark"] .quick-suggestions a:hover {
    background-color: var(--gray-200);
    color: var(--primary); /* در حالت هاور، متن آن آبی می‌شود */
    border-color: var(--primary-dark);
}


/* نوار لودینگ بالای صفحه */
.htmx-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: #007bff; /* رنگ نوار لودینگ - می‌توانید تغییر دهید */
    z-index: 9999;
    opacity: 0;
    transition: opacity 200ms ease-in;
    pointer-events: none;
}
.htmx-request .htmx-indicator{
    opacity: 1;
    animation: load_animation 2s infinite linear;
}
@keyframes load_animation {
    0% { width: 0%; }
    50% { width: 50%; }
    100% { width: 100%; }
}
/* --- Bottom Navigation Styles --- */
.bottom-nav {
    display: none; /* در حالت دسکتاپ مخفی است */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color, #ffffff);
    border-top: 1px solid var(--border-color, #eaeaea);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* برای گوشی‌های آیفون ناچ‌دار */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav .nav-item, .bottom-nav .nav-item-placeholder {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    position: relative;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-item img {
    width: 26px;
    height: 26px;
    transition: transform 0.2s ease;
    filter: grayscale(100%) opacity(0.6);
}

/* حالت فعال (صفحه فعلی) */
.bottom-nav .nav-item.active img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

/* دکمه افزودن برجسته در وسط */
.bottom-nav .add-btn-wrapper {
    background: linear-gradient(45deg, #ff6b6b, #ff4757);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
    transform: translateY(-15px); /* بیرون زدن از نوار */
}

.bottom-nav .add-btn-wrapper img {
    filter: none;
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* سفید کردن آیکون */
}

.bottom-nav .icon-badge-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* هم‌اندازه با عرض بقیه آیکون‌ها */
    height: 24px; /* هم‌اندازه با ارتفاع بقیه آیکون‌ها */
}

.bottom-nav .icon-badge-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* تنظیم دقیق جایگاه بج روی آیکون */
.nav-badge {
    position: absolute;
    top: -6px;
    right: -8px; /* در حالت RTL ممکن است نیاز به left داشته باشید، بسته به جهت سایت */
    /* بقیه استایل‌های قبلی بج سر جایش بماند */
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--bg-color, #ffffff);
}

/* نمایش نوار فقط در موبایل و فاصله دادن به بدنه سایت */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    
    body {
        /* جلوگیری از رفتن محتوای صفحه زیر نوار پایین */
        padding-bottom: 70px !important; 
    }
}
/* برای صفحه‌نمایش‌های کوچکتر از ۷۶۸ پیکسل (موبایل و تبلت‌های کوچک) */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* در حالت پیش‌فرض (دسکتاپ) مخفی باشد */
.mobile-only {
    display: none !important;
}

/* فقط برای صفحه‌نمایش‌های کوچکتر از ۷۶۸ پیکسل (موبایل) نمایش داده شود */
@media (max-width: 768px) {
    .mobile-only {
        display: flex !important; /* یا block بسته به ساختار فعلی شما */
    }
}
/* --- Bottom Navigation Dark Mode --- */

[data-theme="dark"] .bottom-nav {
    background-color: var(--bg-color, #1a1a1a); /* رنگ پس‌زمینه تیره */
    border-top: 1px solid var(--border-color, #333); /* خط حاشیه تیره */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3); /* سایه غلیظ‌تر برای تم تیره */
}

/* اگر آیکون‌های شما در حالت روز تیره/مشکی هستند، در حالت شب باید سفید شوند (Invert) */
[data-theme="dark"] .bottom-nav .nav-item img {
    filter: invert(1) opacity(0.6); 
}

/* آیکون فعال در حالت شب */
[data-theme="dark"] .bottom-nav .nav-item.active img {
    /* اگر می‌خواهید آیکون فعال در حالت شب کاملا سفید باشد: */
    filter: invert(1) opacity(1); 
    
    /* توجه: اگر آیکون‌های فعال شما رنگی هستند و نمی‌خواهید سفید شوند، 
       خط بالا را پاک کنید و از این استفاده کنید:
       filter: grayscale(0%) opacity(1) brightness(1.2); */
}

/* دکمه افزودن (وسط) - تلطیف سایه در حالت شب برای جلوگیری از خستگی چشم */
[data-theme="dark"] .bottom-nav .add-btn-wrapper {
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.2);
}

/* حاشیه بج (Badge) در حالت شب برای هم‌رنگ شدن با پس‌زمینه تیره */
[data-theme="dark"] .nav-badge {
    border-color: var(--bg-color, #1a1a1a);
}
/* استایل دکمه شناور */
.floating-add-btn {
    position: fixed;
    /* فاصله از پایین - این عدد را طوری تنظیم کنید که دقیقاً بالای نوار فوتر شما قرار بگیرد (مثلاً اگر فوتر 60px است، این را 70px یا 80px بگذارید) */
    bottom: 80px; 
    
    /* این دستور جادویی بر اساس جهت متن (RTL یا LTR) دکمه را جایگذاری می‌کند */
    inset-inline-end: 20px; 
    
    width: 56px; /* عرض دکمه */
    height: 56px; /* ارتفاع دکمه */
    background-color: var(--primary-color, #007bff); /* رنگ اصلی دکمه - می‌توانید تغییر دهید */
    border-radius: 50%; /* دایره‌ای کردن دکمه */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* سایه جذاب */
    z-index: 1000; /* قرارگیری روی همه عناصر */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* استایل آیکون داخل دکمه */
.floating-add-btn img {
    width: 24px;
    height: 24px;
    /* اگر آیکون شما مشکی است و می‌خواهید روی پس‌زمینه رنگی سفید شود: */
    filter: brightness(0) invert(1); 
}

/* افکت هاور */
.floating-add-btn:hover {
    transform: scale(1.08); /* کمی بزرگ شدن هنگام رفتن موس */
}

/* پشتیبانی از حالت شب (Dark Mode) */
[data-theme="dark"] .floating-add-btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    /* در صورت نیاز می‌توانید رنگ پس‌زمینه را در حالت شب کمی تیره‌تر کنید */
}
.esc-footer-wrapper {
    text-align: center;
    padding: 20px 10px;
    margin-top: auto; /* برای چسبیدن فوتر به پایین در صورت کم بودن محتوا */
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.esc-footer-nav-links {
    display: flex;
    flex-wrap: wrap; /* این خط از فشرده شدن لینک‌ها جلوگیری می‌کند */
    justify-content: center;
    align-items: center;
    gap: 15px; /* فاصله کمی بیشتر شد تا زیباتر شود */
    margin-bottom: 15px;
}

.esc-footer-nav-links a {
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.esc-footer-nav-links a:hover {
    opacity: 0.8;
}

.esc-footer-separator {
    color: var(--text-muted);
}

.esc-footer-copy-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* استایل رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .esc-footer-nav-links {
        gap: 10px;
    }

    .esc-footer-wrapper a {
        padding: 6px 12px;
        background: var(--footer-bg-hover, rgba(128,128,128,0.1)); /* یک پس‌زمینه پیش‌فرض هم اضافه شد */
        border-radius: 6px;
        font-size: 13px;
        white-space: nowrap;
    }

    .esc-footer-separator {
        display: none !important; 
    }



    [data-theme="dark"] .esc-footer-wrapper a {
        background: rgba(255, 255, 255, 0.1);
    }

    /* مخفی کردن خطوط جداکننده در موبایل */
    .esc-footer-wrapper .esc-footer-separator {
        display: none !important; 
    }
}
[data-theme="dark"] .esc-footer-nav-links a {
    color: var(--text-color-dark, #eee);
}
[data-theme="dark"] .esc-footer-copy-text {
    color: #aaa;
}

/* =========================================
   استایل باکس‌های آماری (مناسب برای پس‌زمینه رنگی/آبی)
========================================= */
.stat-link {
    display: flex;
    flex-direction: column; /* برای اینکه عدد و متن زیر هم قرار بگیرند */
    align-items: center;
    justify-content: center;
    color: #ffffff !important; /* رنگ سفید برای خوانایی کامل */
    text-decoration: none;
}

/* حالت هاور (وقتی موس روی آن می‌رود) */
.stat-link:hover, 
.stat-link:focus {
    background-color: rgba(255, 255, 255, 0.25); /* روشن‌تر شدن پس‌زمینه شیشه‌ای */
    color: #ffffff;
    text-decoration: none;
}

/* =========================================
   اگر در حالت دارک‌مد رنگ پس‌زمینه هدر شما تغییر می‌کند (مثلا تیره می‌شود):
========================================= */
[data-theme="dark"] .stat-link,
.dark-mode .stat-link {
    /* اگر پس‌زمینه هدر در شب تیره است، می‌توانید این مقادیر را تغییر دهید. 
       اما اگر هدر همیشه آبی است، نیازی به این بخش ندارید. */
}
.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    direction: rtl;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 24px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    width: 40px;  /* عرض اولیه فقط به اندازه آیکون */
    height: 40px;
}

/* حالتی که سرچ باز شده است - کشیده تر شد */
.header-search-form.active {
    width: 280px; /* عرض از 220 به 280 افزایش یافت */
    background: #f5f5f5; /* رنگ پس‌زمینه کادر روشن */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-search-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #333; /* رنگ آیکون در حالت روز */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    transition: background 0.2s;
}

.header-search-form.active .header-search-btn:hover {
    background: #e0e0e0;
}

.header-search-input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    opacity: 0;
    font-size: 14px;
    font-family: inherit;
    color: #333; /* رنگ متن در حالت روز */
    transition: opacity 0.3s ease-in-out;
}

/* نمایش متن وقتی کادر باز است */
.header-search-form.active .header-search-input {
    opacity: 1;
    padding-left: 10px;
}

/* =========================================
   استایل‌های حالت تاریک (Dark Mode)
   توجه: سلکتور دارک مد سایت خود را جایگزین کنید 
   (مثلا [data-theme="dark"] یا body.dark-mode)
========================================= */

/* تغییر رنگ آیکون جستجو */
[data-theme="dark"] .header-search-btn,
body.dark-mode .header-search-btn {
    color: #f8f9fa; 
}

/* پس زمینه کادر در حالت باز */
[data-theme="dark"] .header-search-form.active,
body.dark-mode .header-search-form.active {
    background: #212529; /* رنگ تیره برای پس زمینه کادر */
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* رنگ متن تایپ شده */
[data-theme="dark"] .header-search-input,
body.dark-mode .header-search-input {
    color: #f8f9fa;
}

/* رنگ Placeholder (متن پیش‌فرض) */
[data-theme="dark"] .header-search-input::placeholder,
body.dark-mode .header-search-input::placeholder {
    color: #adb5bd;
}

/* رنگ هاور دکمه وقتی کادر باز است */
[data-theme="dark"] .header-search-form.active .header-search-btn:hover,
body.dark-mode .header-search-form.active .header-search-btn:hover {
    background: #343a40;
}



/* --- بدنه اصلی منوی کشویی --- */
.glass-side-menu {
    position: fixed;
    top: 0;
    right: -320px; /* در حالت عادی بیرون از کادر است */
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.05); /* پس‌زمینه بسیار شفاف */
    backdrop-filter: blur(15px); /* افکت تاری شیشه‌ای */
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* باز شدن منو */
.glass-side-menu.open {
    right: 0;
}

/* --- هدر منو --- */
.glass-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #333; /* اگر بک‌گراند سایت تیره است این را به #fff تغییر دهید */
}

.glass-title {
    font-weight: bold;
    font-size: 1.2rem;
}

.glass-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: #333; /* رنگ آیکون ضربدر */
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.glass-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- نگهدارنده حباب‌ها --- */
.glass-menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px; /* فاصله بین حباب‌ها */
}

/* --- استایل حباب‌های شیشه‌ای --- */
.glass-bubble {
    display: block;
    background: rgba(255, 255, 255, 0.2); /* رنگ شیشه */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4); /* حاشیه براق حباب */
    border-radius: 50px; /* گرد کردن لبه‌ها شبیه حباب */
    padding: 15px 25px;
    text-decoration: none;
    color: #333; /* رنگ متن */
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), inset 0 2px 5px rgba(255, 255, 255, 0.3); /* سایه بیرونی و درونی برای حجم دادن */
    
    /* وضعیت قبل از باز شدن (مخفی و پایین‌تر) */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* افکت هاور روی حباب */
.glass-bubble:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.02); /* کمی بزرگ شدن و بالا رفتن */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

/* --- انیمیشن ظاهر شدن حباب‌ها به ترتیب --- */
.glass-side-menu.open .glass-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* زمان‌بندی نمایش برای هر حباب */
.glass-side-menu.open .glass-bubble:nth-child(1) { transition-delay: 0.1s; }
.glass-side-menu.open .glass-bubble:nth-child(2) { transition-delay: 0.2s; }
.glass-side-menu.open .glass-bubble:nth-child(3) { transition-delay: 0.3s; }
.glass-side-menu.open .glass-bubble:nth-child(4) { transition-delay: 0.4s; }
.glass-add-menu-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%; /* دایره‌ای شکل */
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-add-menu-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

    /* این کلاس توسط خود HTMX مدیریت می‌شود */
    .htmx-indicator {
        opacity: 0;
        transition: opacity 200ms ease-in;
        display: none; /* مخفی بودن در حالت عادی */
    }
    
    /* وقتی درخواست در جریان است، HTMX کلاس htmx-request را اضافه می‌کند */
    .htmx-request .htmx-indicator {
        opacity: 1;
        display: inline-block;
    }
    .htmx-request.htmx-indicator {
        opacity: 1;
        display: inline-block;
    }

    /* ظاهر دلخواه لودر شما (یک چرخ‌دنده یا متن ساده) */
    .my-custom-loader {
        position: fixed;
        top: 20px;
        right: 20px;
        background: #333;
        color: #fff;
        padding: 5px 10px;
        border-radius: 5px;
        z-index: 9999;
        font-size: 14px;
    }



/* استایل‌های پیش‌فرض (لایت مد) */
.captcha-container {
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: #f8f9fa; 
    padding: 10px; 
    border-radius: 8px;
}
.captcha-label {
    font-size: 13px; 
    margin: 0;
    color: #333;
}
#captchaQuestion {
    font-weight: bold; 
    color: #ff4757; 
    direction: ltr; 
    display: inline-block;
}
.captcha-input {
    width: 70px; 
    padding: 5px; 
    border: 1px solid #ccc; 
    border-radius: 5px;
    background: #fff;
    color: #333;
}

/* استایل‌های دارک مد (با فرض اینکه کلاس دارک مد شما dark-mode یا مشابه آن در بادی است) */
body.dark-mode .captcha-container,
[data-theme="dark"] .captcha-container {
    background: #2b303b; /* رنگ پس‌زمینه تیره */
}
body.dark-mode .captcha-label,
[data-theme="dark"] .captcha-label {
    color: #e0e0e0;
}
body.dark-mode .captcha-input,
[data-theme="dark"] .captcha-input {
    background: #1a1d24; /* رنگ ورودی تیره */
    border: 1px solid #444;
    color: #fff;
}

/* ریسپانسیو (نسخه موبایل) */
@media (max-width: 576px) {
    .captcha-container {
        flex-direction: column; /* قرار گرفتن آیتم‌ها زیر هم */
        align-items: flex-start; 
        gap: 8px;
    }
    .captcha-input {
        width: 100%; /* برای راحتی لمس در موبایل */
        max-width: 120px; 
    }
}



    #pwa-smart-banner {
        position: fixed;
        top: -100px; /* مخفی در بالا */
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        z-index: 999999;
        transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        direction: rtl;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        display: none; /* پیش‌فرض مخفی */
    }
    #pwa-smart-banner.show {
        top: 0;
    }
    .pwa-banner-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        max-width: 600px;
        margin: 0 auto;
    }
    .pwa-banner-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .pwa-banner-icon {
        width: 38px;
        height: 38px;
        background: #f0f4f8;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    }
    .pwa-banner-text {
        display: flex;
        flex-direction: column;
    }
    .pwa-banner-title {
        font-size: 13px;
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 2px;
    }
    .pwa-banner-desc {
        font-size: 11px;
        color: #718096;
    }
    .pwa-banner-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .pwa-banner-btn {
        background: #2563eb;
        color: white !important;
        font-size: 12px;
        font-weight: 600;
        padding: 6px 14px;
        border-radius: 20px;
        text-decoration: none;
        transition: background 0.2s;
    }
    .pwa-banner-btn:hover {
        background: #1d4ed8;
    }
    .pwa-banner-close {
        background: none;
        border: none;
        color: #a0aec0;
        font-size: 18px;
        padding: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
/* =========================================
   Dark Mode Styles for PWA Smart Banner
========================================= */
[data-theme="dark"] #pwa-smart-banner {
    background: rgba(30, 30, 30, 0.85); /* پس‌زمینه تیره با کمی شفافیت */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* حاشیه پایین محوتر */
}

[data-theme="dark"] .pwa-banner-icon {
    background: #2d3748; /* پس‌زمینه آیکون تیره‌تر */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="dark"] .pwa-banner-title {
    color: #f7fafc; /* رنگ روشن برای عنوان */
}

[data-theme="dark"] .pwa-banner-desc {
    color: #a0aec0; /* رنگ خاکستری روشن برای توضیحات */
}

[data-theme="dark"] .pwa-banner-close {
    color: #cbd5e0; /* رنگ روشن‌تر برای دکمه ضربدر */
}

[data-theme="dark"] .pwa-banner-btn {
    background: #3b82f6; 
}

[data-theme="dark"] .pwa-banner-btn:hover {
    background: #2563eb;
}
