@import "tailwindcss";

/* Vazirmatn Font Family */
@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
}

:root {
  --color-bg: #0d1117;
}

@theme {
  --font-vazir: "Vazirmatn";
}

@layer base {
  * {
    @apply font-vazir;
    scrollbar-width: thin;
    scrollbar-color: #30363d #161b22;
  }

  html,
  body {
    color: inherit;
    background-color: inherit;
  }
}

@layer components {
  .main-input {
    @apply w-full pl-50 bg-[#30363D] border border-[#6B7280] rounded-md p-4 text-sm text-right focus:outline-none focus:border-[#8B9DC3] relative z-10;
  }

  .submit-button {
    @apply h-[calc(100%-14px)] absolute left-2 top-[7px] text-[14px] p-2 px-5 transition rounded bg-[#38727C] !text-white flex items-center gap-2 cursor-pointer hover:bg-[#96989A] hover:text-[#848484] disabled:opacity-50 disabled:cursor-not-allowed z-20;
  }
}

/* Apply Vazirmatn font globally and ensure text-white works */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Force text-white to work by adding !important if needed */
.text-white {
  color: white !important;
}

.skeleton {
  background-color: #30363d;
  border-radius: 8px;
  animation: skeleton-animation 1.5s infinite;
}

@keyframes skeleton-animation {
  0% {
    background-color: #30363d;
  }

  50% {
    background-color: #444c56;
  }

  100% {
    background-color: #30363d;
  }
}

.skeleton-text {
  width: 100%;
  height: 16px;
  animation: skeleton-animation 1.5s infinite;
}

.dir-fa {
  direction: rtl;
}

.dir-en {
  direction: ltr;
}

.spin-clockwise {
  animation: spin 2s linear infinite;
}

.spin-counter-clockwise {
  animation: spin-reverse 1.5s linear infinite;
}

@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

.pulse-effect {
  animation-name: pulse-animation;
  animation-duration: 4s;
  animation-iteration-count: infinite;
}

@keyframes pulse-animation {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* Copy feedback animations */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-bounce-once {
  animation: bounceOnce 0.6s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceOnce {

  0%,
  100% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(0.95);
  }

  75% {
    transform: scale(1.05);
  }
}

/* Custom Scrollbar Styling to match dark theme */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background: #0d1117;
}

::-webkit-scrollbar-track {
  background: #161b22;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 6px;
  border: 1px solid #21262d;
}

::-webkit-scrollbar-thumb:hover {
  background: #444c56;
}

::-webkit-scrollbar-thumb:active {
  background: #5a6470;
}

::-webkit-scrollbar-corner {
  background: #0d1117;
}

.people-item-text:hover {
  color: #155dfc;
}

.people-item-text:hover path {
  stroke: #155dfc !important;
}

/* sonner */
.toast-item {
  gap: 12px !important;
}