@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

body {
  font-family: 'IBM Plex Sans Arabic' !important;
}

:root {
  --white: #ffffff;
  --black: #000000;
  --Border-Default: rgba(0, 0, 0, 0.05);
  --Text-Primary: #020617;
  --Icon-Tertiary: #374151;
  --Text-Tertiary: #475569;
  --Action-Primary: #4931af;
  --Action-Secondary: #4931af;
  --Text-Error: #dc2626;
  --Background-Default: #fafafa;
  --Text-On-Primary: white;
}

:is(.top-shape, .bottom-shape) {
  transform: scale(0);
  opacity: 0.2;
  transform-origin: top right;
  animation: scale-up 1s ease-in-out forwards;
  &::after {
    content: '';
    background-color: #fff;
    display: block;
    aspect-ratio: 1;

    position: absolute;
    border-radius: 10px;
    transform: scale(0);
    animation: scale-up 1s ease-in-out 0.8s forwards;
    transform-origin: top right;
  }
}
.bottom-shape {
  transform-origin: bottom left;
  &::after {
    inset-inline-end: 50px;
    bottom: 50px;
    transform-origin: bottom left;
  }
}
@keyframes scale-up {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Keyframes for input slide-up with fade-in */
@keyframes slideUp {
  0% {
    transform: translateY(20px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Keyframes for button fade-in */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slideLeft {
  0% {
    transform: translateX(20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideRight {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Animation classes */
.animate-slide-up {
  opacity: 0; /* Start hidden */
  animation-name: slideUp, fadeIn;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

.animate-fade-in {
  opacity: 0; /* Start hidden */
  animation-name: fadeIn;
  animation-duration: 0.6s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-in;
}

.validation-criteria-item {
  position: relative;
  padding-right: 28px; /* Space for the icon */
  transition: color 0.3s ease;
}

.validation-criteria-item:before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
  transition: all 0.3s ease;
}

/* Neutral state */
.criteria-neutral {
  color: #6b7280; /* gray-500 */
}

.criteria-neutral:before {
  border: 1.5px solid #9ca3af; /* gray-400 */
  background-color: transparent;
}

/* Valid state */
.criteria-valid {
  color: #10b981; /* green-500 */
}

.criteria-valid:before {
  background-color: #10b981; /* green-500 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  border: none;
}

/* Invalid state */
.criteria-invalid {
  color: #ef4444; /* red-500 */
}

.criteria-invalid:before {
  background-color: #ef4444; /* red-500 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
  border: none;
}

@keyframes slowPanBackground {
  0% {
    background-position: 50% 50%;
  }
  33% {
    background-position: 0% 50%;
  }
  66% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 50% 50%;
  }
}

.page-side-bg {
  animation: slowPanBackground 60s ease-in-out infinite;
}

.error-message {
  display: none;
}

.has-error ~ .error-message {
  display: block;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slideLeft {
  animation: slideLeft 0.5s ease-in-out forwards;
}

.animate-slideRight {
  animation: slideRight 0.5s ease-in-out forwards;
}
