/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

@font-face {
  font-family: 'IRY';
  src: url('../fonts/IRY.woff2') format('woff2'), url('../fonts/IRY.woff') format('woff'), url('../fonts/IRY.svg#IRY') format('svg');
  font-weight: normal;
  font-style: normal
}

@font-face {
  font-family: 'IRY';
  src: url('../fonts/IRY-Medium.woff2') format('woff2'), url('../fonts/IRY-Medium.woff') format('woff'), url('../fonts/IRY-Medium.svg#IRY-Medium') format('svg');
  font-weight: 500;
  font-style: normal
}

/* متغیرهای رنگی اصلی */
:root {
  --dark: #34495E;
  --light: #ffffff;
  --success: #0ABF30;
  --error: #E24D4C;
  --warning: #E9BD0C;
  --info: #3498DB;
}

.notifications {
  position: fixed;
  top: 30px;
  right: 20px;
  /* برای سایت‌های فارسی می‌توانید از left: 20px; استفاده کنید */
  z-index: 10000;
}

.notifications :where(.toast, .column) {
  display: flex;
  align-items: center;
}

.notifications .toast {
  width: 400px;
  position: relative;
  overflow: hidden;
  list-style: none;
  border-radius: 5px;
  padding: 16px 17px;
  margin-bottom: 10px;
  justify-content: space-between;
  animation: show_toast 0.3s ease forwards;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  /* border-left: 5px solid; نوار رنگی کنار هر نوتیفیکیشن */
  color: #555;
  /* رنگ متن پیش‌فرض */
  font-family: 'IRY';

}

/* --- بخش جدید برای رنگ‌بندی --- */
.toast.success {
  background-color: var(--success);
  /* border-color: var(--success); */
  color: var(--light);

}

.toast.error {
  background-color: var(--error);
  /* border-color: var(--error); */
  color: var(--light);
}

.toast.warning {
  background-color: var(--warning);
  /* border-color: var(--warning); */
}

.toast.info {
  background-color: var(--info);
  /* border-color: var(--info); */
}

/* --- پایان بخش جدید --- */


@keyframes show_toast {
  0% {
    transform: translateX(100%);
  }

  40% {
    transform: translateX(-5%);
  }

  80% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-10px);
  }
}

.notifications .toast.hide {
  animation: hide_toast 0.3s ease forwards;
}

@keyframes hide_toast {
  0% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(calc(100% + 20px));
  }
}

.toast::before {
  position: absolute;
  content: "";
  height: 3px;
  width: 100%;
  bottom: 0px;
  left: 0px;
  animation: progress 5s linear forwards;
}

@keyframes progress {
  100% {
    width: 0%;
  }
}

.toast.success::before {
  background: var(--success);
}

.toast.error::before {
  background: var(--error);
}

.toast.warning::before {
  background: var(--warning);
}

.toast.info::before {
  background: var(--info);
}

.toast .column i {
  font-size: 1.75rem;
  /* --- بخش جدید برای حل مشکل آیکون --- */
  font-family: "Font Awesome 6 Free";
  /* استفاده از فونت آیکون */
  font-weight: 900;
  /* برای نمایش آیکون‌های solid */
}

.toast.success .column i {
  color: var(--success);
}

.toast.error .column i {
  color: var(--error);
}

.toast.warning .column i {
  color: var(--warning);
}

.toast.info .column i {
  color: var(--info);
}

.toast .column span {
  font-size: 1.07rem;
  margin-left: 12px;
}

.toast>i:last-child {
  color: #aeb0d7;
  cursor: pointer;
  font-family: "Font Awesome 6 Free";
  /* اطمینان از فونت صحیح برای آیکون بستن */
  font-weight: 900;
}

.toast>i:last-child:hover {
  color: var(--dark);
}

/* Media Queries */
@media screen and (max-width: 530px) {
  .notifications {
    width: 95%;
    right: 50%;
    transform: translateX(50%);
  }

  .notifications .toast {
    width: 100%;
    font-size: 1rem;
  }
}