/* Custom Scrollbar Styles - مینیمال و زیبا */

/* اسکرول‌بار اصلی صفحه */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(240, 240, 240, 0.3);
  border-radius: 10px;
  margin: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #0891b2, #06b6d4);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #0e7490, #0891b2);
  transform: scale(1.1);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(45deg, #164e63, #0e7490);
}

/* اسکرول‌بار برای المان‌های خاص مثل چت */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(8, 145, 178, 0.6);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 145, 178, 0.8);
}

/* اسکرول‌بار برای المان‌های تیره */
.dark-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.dark-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.dark-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #374151, #4b5563);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.dark-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #4b5563, #6b7280);
}

/* اسکرول‌بار نازک برای موبایل */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 4px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(8, 145, 178, 0.7);
    border-radius: 2px;
    border: none;
  }
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #0891b2 rgba(240, 240, 240, 0.3);
}

/* اسکرول‌بار برای containers خاص */
.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: #0891b2 transparent;
}

.custom-scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(8, 145, 178, 0.5);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 145, 178, 0.8);
}

/* انیمیشن ظاهر شدن اسکرول‌بار */
::-webkit-scrollbar-thumb {
  opacity: 0.7;
  transition: opacity 0.3s ease, background 0.3s ease;
}

:hover::-webkit-scrollbar-thumb {
  opacity: 1;
}

/* استایل مخصوص حالت فوکوس */
:focus::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #0891b2, #06b6d4);
  box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.3);
}

/* حذف کامل اسکرول‌بار (اگر نیاز بود) */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}