/******************* MEDAI **********************/



/* Window Backgrounds*/

/* form section */
.computerListGrid {
  display: grid;
  /*grid-template-columns: 1fr 1fr 1fr;*/
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));

  gap: 20px;

  height: 100%;
  width: 100%;

  overflow-x: hidden;
  overflow-y: auto;

  padding-top: 5px;
}

/* Colour the computer cards */
.computerCardOuter {
  background: linear-gradient(to left,
      #F8a51c 0%,
      #f4d03f 20%,
      #f39c12 50%,
      #f4d03f 80%,
      #e67e22 100%);

  border: 2px solid #000;
  border-radius: 10px;
  width: 330px;
  height: 420px;

  display: flex;
  flex-direction: column;
  margin: auto;
  justify-content: center;
  align-items: center;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/*raises the card as the mouse moves over*/
.computerCardOuter:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.16),
    0 4px 6px rgba(0, 0, 0, 0.12);
}

.computerCardDiv {
  position: relative;

}


.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardBackground {
  background: linear-gradient(to top left,
      #ff7675 0%,
      #ffcccb 20%,
      #e74c3c 50%,
      #ffcccb 80%,
      #ff7675 100%);

  border: solid 1px #FF7675;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardBackground {
  background: linear-gradient(to top left,
      #55A630 0%,
      #D1F2A5 20%,
      #27AE60 50%,
      #D1F2A5 80%,
      #55A630 100%);

  border: solid 1px #55A630;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardBackground {
  background: linear-gradient(to top left,
      #74B9FF 0%,
      #A8E6CF 20%,
      #0984E3 50%,
      #A8E6CF 80%,
      #74B9FF 100%);

  border: solid 1px #74B9FF;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardBackground {
  background: linear-gradient(to top left,
      #A29BFE 0%,
      #E1BEE7 20%,
      #8E44AD 50%,
      #E1BEE7 80%,
      #A29BFE 100%);

  border: solid 1px #A29BFE;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardBackground {
  background: linear-gradient(to top left,
      #FFB347 0%,
      #FFE0B2 20%,
      #E67E22 50%,
      #FFE0B2 80%,
      #FFB347 100%);

  border: solid 1px #FFB347;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardBackground {
  background: linear-gradient(to top left,
      #F8A5C2 0%,
      #FCDDE2 20%,
      #E84393 50%,
      #FCDDE2 80%,
      #F8A5C2 100%);

  border: solid 1px #F8A5C2;
}

img {
  max-inline-size: 100%;
}

.computerCardBackground {
  width: 95%;
  height: 95%;
  border-radius: 10px;
  border: 0;

  display: flex;
  flex-direction: column;
  margin: auto;
  justify-content: center;
  align-items: center;
}

.computerCardInner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin: auto;
}

.innerGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 10px;
}


.blackStar {
  color: #000;
}

.whiteStar {
  color: #fff;
}

.computerCardTitle {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  /* Center inside product card */
  margin: 0 auto;
}

/* The white background of the computer card title */
.computerCardTitleBkg {
  position: absolute;
  width: 92%;
  height: 38px;
  background: white;
  border-radius: 30px;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;

}

.makerImage {
  width: 68px;
  height: 20px;
  transform: translateX(15%);
  margin-top: 2px;


}

.makerImage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The computer name and year (the coloured part) */
.computerCardTitleColoured {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 2;
  left: 48%;
  transform: translateX(-52%);
}

/* Middle coloured title piece */
.computerCardTitleMiddle {
  position: relative;
  display: flex;
  align-items: center;
  transform: translateX(10%);
  justify-content: center;
}

/*Position computer name correctly*/
.computerName {
  position: absolute;
  transform: translateX(16%);
}

/* Coloured end of computer card title */
.computerCardTitleEnd {
  display: flex;
  align-items: center;
}
/*Position year correctly*/
.computerYear {
  position: absolute;
  transform: translateX(70%);
}

.errNinput {
    color: #1A1A1A;
    font-weight: 700;
    justify-self: center;
}


/* Colour the computer card titles */
.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #ff7675;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #ffcccb;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #e74c3c;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #ffcccb;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 1) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #ff7675;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #55A630;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #D1F2A5;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #27AE60;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #D1F2A5;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 2) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #55A630;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #74B9FF;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #A8E6CF;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #0984E3;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #A8E6CF;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 3) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #74B9FF;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #A29BFE;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #E1BEE7;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #8E44AD;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #E1BEE7;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 4) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #A29BFE;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #FFB347;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #FFE0B2;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #E67E22;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #FFE0B2;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 5) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #FFB347;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardTitleMiddle svg .grad-1 {
  stop-color: #F8A5C2;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardTitleMiddle svg .grad-2 {
  stop-color: #FCDDE2;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardTitleMiddle svg .grad-3 {
  stop-color: #E84393;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardTitleMiddle svg .grad-4 {
  stop-color: #FCDDE2;
}

.computerListGrid>.computerCardDiv:nth-child(6n + 6) .computerCardTitleMiddle svg .grad-5 {
  stop-color: #F8A5C2;
}

/***** Carousel ********/
#carouselContainer {
  display: flex;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}


#sliderContainer {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));*/
  gap: 40px;
  height: 100%;
  width: 100%;
  place-items: center;
  align-items: center;
  padding-bottom: 7px;
  grid-auto-columns: 330px;
  grid-auto-flow: column;
  overflow-y: hidden;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;

}

#sliderContainer::-webkit-scrollbar {
  display: none;
}

#sliderContainer>div {

  scroll-snap-align: start;

}

.sliderBtn {
  display: flex;
  align-items: center;
  width: 40px;
  height: 20px;
  box-sizing: border-box;
  background-color: #000;

  clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
  border-radius: 5px;
}

#slideLeftBtn {
  transform: rotate(90deg);
}

#slideRightBtn {
  transform: rotate(270deg);
}

/*** search bar***/
#searchComputer {
  background-color: transparent;
  border: 0;

  /* Center dialog */
  padding: 0;
}

#searchComputer::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

#searchBarContent {
  width: min(90vw, 500px);
  /* responsive */
  background-color: #7e7f7f;
  border-radius: 20px;
  padding: 20px;
  position: relative;
  /* needed for X button */
  border: 1px solid white;
}

#btnResearch {
  border-radius: 6px;
  background-color: #D3CBCB;
  color: #3C3C43CC;


  border: 1px #b2afaf solid;

  padding: 5px;

  width: 5rem;
  font-size: 1rem;

}

#btnResearch:hover {
  background-color: #7c7c7d;
  color: #fff;
}

.closeBtn {
  color: white;
}

fieldset {
  border: 0;
  color: #fff;
  justify-self: center;
}

#searchBar {
  border-radius: 10px 0px 0 10px;
}

#searchForm {
  align-content: center;
}

#searchGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.squareBtnClose {
  position: absolute;
  top: 12px;
  right: 12px;

  display: flex;
  justify-content: center;
  align-items: center;

  height: 28px;
  width: 28px;
  border-radius: 6px;

  background: transparent;
  border: 1px solid #fff;
  color: #fff;

  cursor: pointer;
}

.computerCardButtons {
  position: absolute;
  bottom: 1rem;
  right: 1rem;

  display: flex;
  gap: 0.5rem;

  z-index: 10;

  bottom: clamp(0.5rem, 2vw, 1rem);
  right: clamp(0.5rem, 2vw, 1rem);

  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.computerCardButtons button {
  border-radius: 6px;

}

.computerCardButtons button:hover {
  background-color: #7c7c7d;
  color: #fff;
}

.computerCardButtons {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.computerCardDiv:hover .computerCardButtons {
  opacity: 1;
  pointer-events: auto;
}



.squareBtnClose:hover {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 480px) {
  #searchBarContent {
    border-radius: 16px;
    padding: 16px;
  }

  .computerCardOuter {
    width: 303px;
  }
  .computerListGrid {
    grid-template-columns: repeat(auto-fit, minmax(303px, 1fr));
  }
}

@media (max-width: 490px) {

  #slideLeftBtn,
  #slideRightBtn {
    display: none;
  }

  .squareBtnClose {
    position: absolute;
    top: 12px;
    right: 12px;

    display: flex;
    justify-content: center;
    align-items: center;

    height: 28px;
    width: 28px;
    border-radius: 6px;

    background: transparent;
    border: 1px solid #fff;
    color: #fff;

    cursor: pointer;
  }

  .squareBtnClose:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .squareBtnReduce {
    margin-left: 10px;
  }

  #sliderContainer {
    /* Switch to vertical layout */
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;

    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;

  }

  #sliderContainer>* {
    scroll-snap-align: start;
    max-width: 300px;
  }

}

.computerListGridA {
  color: inherit;
  text-decoration: inherit
}

@media (max-width: 800px) {
  #searchGrid {
    grid-template-columns: 1fr;
  }
}