@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --coupon-bg: linear-gradient(#ffffff, #fbfbfb);
  --coupon-footer: radial-gradient(circle, transparent, transparent 50%, #fbfbfb 50%, #fbfbfb 100%) -7px -2px /
    16px 16px repeat-x;
  --datepicker-bg: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.6012780112044818) 0%,
    rgba(255, 255, 255, 0) 56%,
    rgba(255, 255, 255, 0.5984768907563025) 100%
  );
}

.dark {
  --coupon-bg: linear-gradient(#18191d, #888888);
  --coupon-footer: radial-gradient(circle, transparent, transparent 50%, #888888 50%, #888888 100%) -7px -2px /
    16px 16px repeat-x;
  --datepicker-bg: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.6012780112044818) 0%,
    rgba(110, 110, 110, 0.8029586834733894) 50%,
    rgba(0, 0, 0, 0.5984768907563025) 100%
  );
}

@layer components {
  .focus-ring {
    @apply focus-visible:ring-primary focus-visible:ring-2;
  }

  .swiper-button-next {
    border-radius: 50%;
    width: 46px !important;
    height: 46px !important;
    @apply bg-gray-float inline-flex items-center justify-center;
  }

  .swiper-button-prev {
    transform: rotate(180deg);
    border-radius: 50%;
    height: 46px !important;
    width: 46px !important;
    @apply bg-gray-float inline-flex items-center justify-center;
  }

  .swiper-button-prev.swiper-button-disabled,
  .swiper-button-next.swiper-button-disabled {
    display: none;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    display: none;
  }

  .product-modal .swiper-slide-thumb-active img {
    @apply ring-1 ring-offset-1 ring-gray-500 p-[2px] outline-none;
  }

  .product-detail .swiper-slide img {
    @apply brightness-75;
  }

  .product-detail .swiper-slide-thumb-active img {
    @apply brightness-100;
  }

  .product-detail-3 .swiper-slide-thumb-active img {
    @apply brightness-100;
  }

  .datepicker.ios .datepicker-wheel {
    @apply !border-b !border-primary !border-t !border-primary;
  }

  .Toastify__toast {
    @apply rounded-2xl bg-opacity-30;
  }

  .Toastify__toast-container {
    width: min(400px, 100vw);
  }

  .Toastify__close-button > svg {
    @apply !stroke-white;
  }

  .datepicker.ios .datepicker-scroll li {
    @apply dark:text-amber-50;
  }

  .progress {
    position: relative;
    overflow: hidden;
  }

  .progress::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    @apply bg-primary;
    width: var(--progress);
  }
}

@layer utilities {
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

.auth-body {
  min-height: calc(100vh - 104px);
  border-radius: 25px;
}

.overlay-bg {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
  transition: background 0.4s linear;
  -webkit-transition: background 0.2s ease-in-out;
}

.overlay-bg:hover {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.coupon {
  position: relative;
  box-sizing: border-box;
  padding: 20px;
  background: var(--coupon-bg);
  margin-bottom: 30px;
  filter: drop-shadow(0px 20px 5px rgba(0, 0, 0, 0.08));
}

.coupon::before,
.coupon::after {
  content: "";
  position: absolute;
  left: 5px;
  height: 6px;
  width: calc(100% - 10px);
}

.coupon::after {
  bottom: -5px;
  background: var(--coupon-footer);
}

.svg-pi-indicator--spinner {
  animation: spinner 0.75s linear infinite;
  transform-origin: center;
}

@keyframes spinner {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

.datepicker.ios {
  background-color: transparent !important;
}

.datepicker.ios .datepicker-content {
  padding: 0 !important;
}

.datepicker.ios .datepicker-header {
  display: none !important;
}

.datepicker {
  position: initial !important;
}

.datepicker.ios .datepicker-navbar {
  display: none !important;
}

.datepicker.ios .datepicker-viewport::after {
  /*background: transparent !important;*/
  background: var(--datepicker-bg) !important;
}

.react-tel-input .flag-dropdown.open .selected-flag {
  background: transparent !important;
}

.react-tel-input .flag-dropdown.open .selected-flag:focus {
  background: transparent !important;
}

.react-tel-input .flag-dropdown.open {
  background: transparent !important;
}

.react-tel-input .flag-dropdown.open:focus {
  background: transparent !important;
}

.react-tel-input .selected-flag:focus {
  background: transparent !important;
}

.react-tel-input .selected-flag:hover {
  background: transparent !important;
}

.react-tel-input .form-control {
  background: transparent !important;
}

.checkIcon path {
  filter: drop-shadow(2px 1px 4px rgba(0, 0, 0, 1));
}

.portal {
  position: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
}

.gradient {
  background: linear-gradient(to right top, #ffc600 20%, #ff0040, #e600cc 80%);
}

.left-dir-gradient:active {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent);
}

.right-dir-gradient:active {
  background: linear-gradient(-90deg, rgba(0, 0, 0, 0.5), transparent);
}

.card-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%),
    transparent -22.857px 0px / 110.159% 100% no-repeat;
}

.card-overlay2 {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%),
    transparent -22.857px 0px / 110.159% 100% no-repeat;
}

.chat-body {
  max-height: calc(100vh - 46px);
  max-height: calc(100svh - 46px);
}

.store-bg {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
}
