@use "@/assets/styles/variables" as *;
@use "@/assets/styles/mixins" as *;

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.mosha__toast {
  z-index: 1111111111111111 !important;
}

@font-face {
  font-family: "Lama Sans";
  src:
    url("/fonts/lamasans-regular-webfont.woff2") format("woff2"),
    url("/fonts/lamasans-regular-webfont.woff") format("woff");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
body {
  background: $body;
  font-family: 'Lama Sans', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: antialiased;

  &::-webkit-scrollbar-thumb {
    border-radius: 5px;
    // background-color: #a3a3a3;
    background-color: $primary;
  }
}
html,
body {
  width: 100%;
  overflow-x: clip;
}
::-webkit-scrollbar-track {
  border-radius: 5px;
}
::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background-color: #a3a3a3;
}

html[dir="rtl"] body {
  direction: rtl;
}
html[dir="ltr"] body {
  direction: ltr;
}

button {
  border: none;
  background-color: inherit;
}
input, textarea {
  background-color: inherit;
}

.icon-sticky {
  position: fixed;
  z-index: 5555555;
  bottom: 60px;
  left: 40px;
  transform: translateX(-300%);
  transition: 0.4s all;
  &.active {
    transform: translateX(0);
  }
}

@media (max-width: 800px) {
  .icon-sticky {
    left: 10px;
  }
}

// start product card

.primary {
  color: $primary !important;
}

.car-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  position: relative;
  // width: 100%;
  height: 440px;
  cursor: pointer;

  .disc2 {
    font-weight: 300 !important;
    text-decoration: line-through;
  }

  .compPrice {
    display: inline-flex;
    height: 26px;
    padding: 2px 8px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    border: 1px solid $yellow;

    span {
      font-size: 14px !important;
      font-style: normal;
      font-weight: 600 !important;
      color: $yellow !important;
    }
  }

  .image {
    width: 100%;
    height: 163px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffff;
    margin-bottom: 20px;

    img {
      width: 100%;
      border-radius: 8px;
      height: 100%;
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }

  .name {
    gap: 14px;
    margin-top: 24px;

    // margin-bottom: 10px;
    span {
      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      color: $sec;
    }

    .title-name {
      font-size: 16px;
      font-style: normal;
      font-weight: 700;
      color: $black;
      // margin-top: 8px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      position: relative;
    }
  }

  .types {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 10px;
    margin-top: 20px;

    .type {
      display: flex;
      align-items: center;
      gap: 5px;

      span {
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        color: $sec;
      }
    }
  }

  .price-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid #ebeaed;
    padding-top: 15px;

    span {
      color: $sec;
      font-size: 16px;
      font-style: normal;
      font-weight: 500;
    }

    h4 {
      font-size: 18px;
      font-style: normal;
      font-weight: 700;
      color: $primary;
    }
  }
}
.newPriceDesign {
  border: 1px solid $primary;
  border-radius: 8px;
  &.disc {
    position: absolute;
    width: 80%;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
  }
  .price-global {
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px 8px 0px 0px;
    padding: 10px 0px;
    background-color: $primary;
    text-align: center;
    display: block;
    color: #fff !important;
  }
  .prices {
    display: flex;
    align-items: center;
    // gap: 20px;
    justify-content: space-around;
    padding: 0px 7px;
    // justify-content: center;
    .divider {
      width: 2px;
      height: 46px;
      background-color: $primary;
    }
    p {
      font-size: 12px;
      font-style: normal;
      font-weight: 700;
      color: #2d3a4a;
      span {
        color: #2d3a4a;
        text-decoration: line-through;
      }
    }
    div {
      font-style: normal;
      padding: 5px 0px;
      span {
        font-size: 12px;
        color: $primary;
        font-weight: 600;
      }
      display: flex;
      gap: 5px;
      flex-direction: column;
    }
  }
  &.car {
    border: 1px solid #e7f2f2;
    width: 255px;
    .price-global {
      font-size:22px !important;
      background: #e7f2f2;
      color: $primary !important;
    }
    .divider {
      background-color: #e7f2f2;
      width: 1px;
    }
    h5 {
      color: #2d3a4a !important;
      display: flex;
      flex-direction: column;
      font-size: 12px;
      align-items: center;
      gap: 5px;
      span {
        color: #2d3a4a !important;
        font-size: 12px !important;
      }
    }
    h6 {
      color: #787878 !important;
          display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      span {
        color: #787878 !important;
        font-size: 12px !important;
      }
      .tax {
        font-size: 9px !important;
      }
    }
  }
}

// end product card

// start dropdown

.dropdown-container {
  position: relative;
  display: inline-block;
  .searchInput {
    input {
      width: 90%;
      outline: none;
    }
    padding-bottom: 7px;
    border-bottom: 1px solid #e6e8ec;
  }
  .dropdown-toggle-container {
    display: flex;
    // background-color: red;
    padding: 8px 8px 8px 16px;
    justify-content: space-between;
    align-items: center;
    color: $black;
    gap: 10px;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid #dfe3ea;
    .icon {
      transition: 0.3s all;
      &.active {
        transform: rotate(180deg);
      }
    }
  }

  &.cars {
    .dropdown-toggle-container {
      width: 260px;
    }
  }

  &.search {
    .dropdown-toggle-container {
      border: none;
      font-size: 20px;
      font-style: normal;
      font-weight: 700;
    }
  }

  .dropdown-menu {
    display: block;
    position: absolute;
    z-index: 1;
    margin-top: 5px;
    border-radius: 12px;
    border: 2px solid #e6e8ec;
    background: #fcfcfd;
    box-shadow: 0px 64px 64px -48px rgba(15, 15, 15, 0.1);
    min-width: fit-content;
    width: 100%;
    max-height: 270px;
    overflow-y: auto;
    input {
      border: none;
    }
    &::-webkit-scrollbar {
      width: 5px;
      height: 10px;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 5px;
      background-color: #a3a3a3;
    }

    &::-webkit-scrollbar-track {
      border-radius: 5px;
    }
  }

  .dropdown-item {
    padding: 10px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    transition: 0.3s all;
    // display: flex;
    // align-items: center;
    // justify-content: space-between;
    // gap: 20px;
    // text-align: center;

    span {
      color: $sec;
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
    }

    &:hover {
      border-radius: 8px;
      background: #f4f5f6;

      span {
        color: $black;
      }

      svg {
        fill: $black !important;

        path {
          fill: $black !important;
        }
      }
    }
  }
}

html[dir="rtl"] {
  .dropdown-item {
    text-align: right;
  }
}
html[dir="ltr"] {
  .dropdown-item {
    text-align: left;
  }
}
// end dropdown

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fancybox__container,
.swal2-container {
  z-index: 555555555555 !important;
}
.swal2-actions {
  width: 100%;
}
.swal2-confirm.swal2-styled {
  // background-color: $primary !important;
  width: 50% !important;
  border-radius: 30px;
  color: #fff;
}

// start common styles with rtl or ltr

html[dir="ltr"] .arrowDir {
  transform: scaleX(-1);
}

// end common styles with rtl or ltr

// start brands

.allBrands {
  .box {
    padding: 20px;
    border-radius: 16px;
    background: #f4f5f6;
    transition: 0.5s all;
    cursor: pointer;
    margin-bottom: 16px;

    .icon {
      opacity: 0;
    }

    img {
      width: 50px;
      height: 50px;
      //  object-fit: contain;
    }

    h2 {
      margin-top: 14px;
      margin-bottom: 8px;
      font-size: 20px;
      font-style: normal;
      font-weight: 700;
      color: $black;
      @include text-line(1);
    }

    span {
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      color: $sec;
    }

    &:hover {
      background: linear-gradient(114deg, #363f4d -1.62%, #0e131b 64.19%);

      h2,
      span {
        color: #fff;
      }
      h2 {
        @include no-trunc();
      }

      .icon {
        opacity: 1;
      }

      img {
        filter: invert(100%) brightness(10000%);
      }
    }
  }
  .showmoreBTN {
    button {
      background-color: transparent;
      padding: 0px 20px;
      height: 40px;
      border-radius: 32px;
      color: $primary;
      font-weight: bolder;
      border: 1px solid $primary;
    }
  }
}

// end brands

// start inputs style

.input-custom {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  background: #f4f5f6;
  position: relative;
  // transition: 0.3s all;
  .num {
    position: absolute;
  }
  input,
  textarea {
    outline: none;
    border: none;
    width: 100%;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    color: $sec;
    resize: none;

    &::placeholder {
      color: $sec;
    }
  }

  .label-container {
    width: 100%;
    position: relative;
    input {
      width: 75%;
    }
    label {
      position: absolute;
      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      color: $primary;
      top: -15px;
      z-index: -1;
      opacity: 0;
      // display: none;
    }
  }

  &:focus-within {
    background-color: transparent;
    border: 1px solid $primary;
    position: relative;

    .label-container {
      // margin-top: 10px;
      position: absolute;
      top: 40%;

      label {
        opacity: 1;
        z-index: 1;
        // display: block;
      }
    }

    svg {
      fill: $primary !important;

      path {
        fill: $primary !important;
      }
    }
  }

  &.area {
    align-items: flex-start;
  }
}

html[dir="rtl"] .input-custom {
  .num {
    left: 13px;
  }
  input,
  textarea {
    direction: rtl;
  }
  &:focus-within {
    .label-container {
      right: 50px;
    }
  }
}
html[dir="ltr"] .input-custom {
  .num {
    right: 13px;
  }
  input,
  textarea {
    direction: ltr;
  }
  &:focus-within {
    .label-container {
      left: 50px;
    }
  }
}

.p-select {
  width: 100%;
}
.p-select-header {
  background-color: #fcfcfd;
  padding: 5px 25px !important;
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  border-left: 2px solid #e6e8ec;
  border-right: 2px solid #e6e8ec;
  border-top: 2px solid #e6e8ec;
  padding-bottom: 5px !important;
  border-bottom: 2px solid #e6e8ec;
  svg{
    display: none;
  }
}
.p-select-list-container {
  padding: 5px 10px;
  max-height: 270px;
  overflow-y: auto;
  &::-webkit-scrollbar {
    width: 5px;
    height: 10px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #a3a3a3;
  }

  &::-webkit-scrollbar-track {
    border-radius: 5px;
  }
  input {
    outline: none;
  }
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  border-left: 2px solid #e6e8ec;
  border-right: 2px solid #e6e8ec;
  border-bottom: 2px solid #e6e8ec;
  background: #fcfcfd;

  /* depth/4 */
  // box-shadow: 0px 64px 64px -48px rgba(15, 15, 15, 0.1);
  ul {
    padding: 0px 4px;
    li {
      padding: 10px !important;
      color: $sec !important;
      font-size: 14px !important;
      font-style: normal;
      font-weight: 400 !important;
      &:hover {
        border-radius: 8px;
        background: #f4f5f6;

        span {
          color: $black;
        }

        svg {
          fill: $black !important;

          path {
            fill: $black !important;
          }
        }
      }
    }
  }
}
.p-dropdown-filter-container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  padding: 3px 5px;
  border-bottom: 1px solid #dfe3ea;
  padding-bottom: 7px;
  // svg {
  //   display: none;
  // }
}

.p-dropdown-items-wrapper {
  box-shadow: none !important;
  width: 100% !important;
  // margin-top: 10px;

  /* depth/4 */
  box-shadow: 0px 64px 64px -48px rgba(15, 15, 15, 0.1);

  ul {
    padding: 10px;
    li {
      cursor: pointer;
      margin: 5px 0px;
      list-style: none;
      font-size: 16px;
      color: $sec;
    }
  }
}
// end inputs style

.addMoreBtn {
  display: flex;
  width: 129px;
  height: 40px;
  padding: 0px 20px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 32px;
  border: 1px solid $primary;
  color: $primary;
  margin-top: 15px;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;

  &:hover {
    background-color: $primary;
    color: #fff;
    transform: translateY(-2px);
  }
}

.empty-container {
  // height: 100vh;
  // margin-top: 120px;
  // margin-bottom: 120px;
  height: 562px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: #fff;
  .empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    h4 {
      font-size: 24px;
      font-weight: 700;
      color: $black;
    }
    p {
      font-size: 16px;
      width: 382px;
      font-weight: 400;
      color: #5a7184;
    }
    button {
      margin-top: 32px;
      display: flex;
      width: 200px;
      height: 48px;
      padding: 8px 16px;
      justify-content: center;
      align-items: center;
      align-content: center;
      color: $black;
      font-weight: 700;
      border-radius: 12px;
      border: 1px solid #2d3a4a;
    }
  }
}

// start empty states

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  text-align: center;
  margin-bottom: 70px;
  h4 {
    color: $primary;
    font-weight: 700;
    font-size: 25px;
  }
  p {
    width: 380px;
    font-size: 17px;
    line-height: 32px;
    color: $black;
  }
}

// end empty states

// start popups

.popup-container {
  position: fixed;
  z-index: 5555555555555;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(14, 19, 27, 0.64);
    backdrop-filter: blur(2px);
  }

  .modal-custom-container {
    width: 800px;
    padding: 56px 0px;
    border-radius: 24px;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    text-align: center;
    iframe {
      width: 100% !important;
      height: 300px !important;
    }
    .item {
      cursor: pointer;
      width: 253px;
      height: 267px;
      border-radius: 12px;
      border: 1px solid #dfe3ea;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    h5 {
      margin-top: 33px;
      margin-bottom: 16px;
      font-size: 16px;
      font-style: normal;
      font-weight: 700;
      color: $black;
    }

    p {
      width: 187px;
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      line-height: 150%;
      /* 21px */
      letter-spacing: 0.2px;
      color: $sec;
    }

    .close {
      position: absolute;
      top: 20px;
      left: 20px;
      cursor: pointer;
    }
  }

  .modal-form {
    border-radius: 24px;
    background: #fff;
    z-index: 111;
    width: 596px;
    padding: 32px 40px;

    .header-form {
      margin-bottom: 25px;
    }

    .apply-div {
      display: inline-flex;
      padding: 8px 16px;
      justify-content: center;
      align-items: center;
      gap: 10px;
      border-radius: 8px;
      background: #f4f5f6;

      span {
        font-size: 14px;
        font-style: normal;
        font-weight: 600;
        color: $sec;
      }
    }

    .head {
      display: flex;
      align-items: center;
      gap: 16px;

      h5 {
        font-size: 24px;
        font-style: normal;
        font-weight: 700;
        color: $black;
      }

      .line {
        width: 2px;
        height: 24px;
        background: #dfe3ea;
      }

      span {
        font-size: 16px;
        font-style: normal;
        font-weight: 700;
        color: $primary;
      }
    }

    .inputs {
      margin-top: 33px;
      display: flex;
      flex-direction: column;
      gap: 16px;

      button {
        margin-top: 40px;
        display: flex;
        height: 56px;
        padding: 16px 24px;
        justify-content: center;
        align-items: center;
        gap: 12px;
        border-radius: 90px;
        background: $primary;
        color: #fff;
        font-weight: 700;
      }
    }

    .main-folder-container {
      p {
        margin: 0;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        color: $sec;
        margin-top: 12px;
      }

      .folder-container {
        cursor: pointer;
        width: 100%;
        height: 130px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px dashed #a7b9d0;

        span {
          font-size: 16px;
          font-style: normal;
          font-weight: 400;
          color: #363f4d;
        }
      }
    }
  }
}

// end popups
