// Color Variables
$primary-color: #007bff;
$secondary-color: #f8f9fa;
$highlight-color: #5abac6;
$button-hover-color: #7ecbd5;
$shadow-color: #a6babd;
$grey-color: #5e5e5e;
$light-grey: rgba(182, 182, 182, 0.6);
$accent-color: #70d2de;
$button-bg-color: #75c5cf;
$button-border-color: #35929e;
$button-hover-bg-color: #5d959c;
$white-color: white;

// Container
.container {
  margin: 0 auto;
  max-width: 1300px;
}

// Select Rooms
.selectrooms {
  display: flex;
  justify-content: flex-start;
  gap: 15px;

  button {
    padding: 8px 15px;
    border: none;
    border-radius: 7px;
    background-color: #51a9b4;
    color: white;
    transition: 0.2s all ease;
    box-shadow: 0px 0px 12px 4px $shadow-color;

    &:hover {
      background-color: $button-hover-color;
      box-shadow: 0px 0px 13px 4px #51a9b4;
    }
  }
}

// Bottom Section
.bottom {
  position: relative;
  top: 120px;
  box-shadow: 0px 3px 5px 2px $shadow-color;
  border-radius: 8px;
  height: 250px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  box-sizing: border-box;

  ngx-slider {
    width: 250px;
    transform: scale(0.85);
  }

  input,
  select {
    padding: 10px 20px;
    outline: none;
    border: 1px solid $shadow-color;
    border-radius: 8px;
    cursor: pointer;
  }

  p {
    text-align: center;
  }

  .inputboxs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;

    i {
      color: $highlight-color;
    }
  }

  .inputbuttons {
    display: flex;
    flex-direction: column;
    gap: 20px;

    .mainbtn {
      background-color: rgb(81, 169, 180);
      box-shadow: rgb(166, 186, 189) 0px 0px 12px 4px;
      color: white;
      font-weight: 600;
      padding: 7px 25px;
      border-width: initial;
      border-style: none;
      border-color: initial;
      border-image: initial;
      border-radius: 8px;
      transition: 0.2s;
      cursor: pointer;
    }
  }

  @media screen and (max-width: 768px) {
    width: 90%;
    height: auto;
    padding: 20px;

    .inputboxs {
      transform: scale(0.8);
    }
  }
}

// Card Section
.card {
  width: 360px;
  height: 290px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0px 0px 25px 5px #888787;

  .card-items {
    width: 100%;
    transition: 0.5s all ease;

    &:hover {
      transform: translateY(-70%);
    }
  }

  .info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;

    .card-text {
      margin-top: 10px;
      padding: 1px 20px;
    }

    .prices {
      background-color: rgb(236, 236, 236);
      display: flex;
      flex-direction: column;
      padding: 7px 25px;
      position: relative;

      .price {
        font-weight: 600;
        color: $highlight-color;
        font-size: 18px;
        letter-spacing: 1px;
      }

      .night {
        font-size: 12px;
        position: absolute;
        top: 30px;
      }
    }
  }

  .card-body-top {
    button {
      width: 100%;
      font-weight: bold;
      padding: 10px 0;
      border: none;
      background-color: darkblue;
      color: white;
      transition: 0.2s all ease;

      &:hover {
        background-color: rgb(43, 105, 241);
      }
    }
  }
}

// Section: Favourite Rooms
section.favouriteRooms {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 80px;
  margin-top: 80px;

  .title {
    position: relative;
    height: 40px;
    display: flex;
    justify-content: center;
    width: 100%;

    &::before {
      content: "";
      width: 80%;
      height: 1px;
      background: $grey-color;
      position: absolute;
      top: 15px;
    }

    h1 {
      font-size: 24px;
      color: $grey-color;
      width: 320px;
      text-align: center;
      position: relative;
      background-color: $white-color;
    }

    .titleLine {
      width: 45%;
      height: 2px;
      border-radius: 3px;
      background-color: $light-grey;
    }
  }

  div.favouriteRoomsList {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 80px;
    width: 100%;
  }

  @media screen and (max-width: 900px) {
    .title h1 {
      margin: 0 5px;
    }

    div.favouriteRoomsList {
      grid-template-columns: auto auto;
    }
  }

  @media screen and (max-width: 768px) {
    padding: 0 5%;
  }

  @media screen and (max-width: 650px) {
    div.favouriteRoomsList {
      grid-template-columns: auto;
    }
  }
}

// Room Card Styles
.roomCard {
  max-width: 400px;
  width: 100%;
  height: 235px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  cursor: pointer;

  img {
    width: 400px;
    height: 200px;
    transition: 0.4s ease-in-out;
    object-fit: cover;
  }

  .roomInfo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
    transition: 0.4s ease-in-out;

    div {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 0 10px;

      span.roomPrice {
        color: $accent-color;
        font-weight: bold;
        font-size: 14px;
      }

      span.roomName {
        font-weight: bold;
        font-size: 14px;
        color: $grey-color;
      }
    }

    button {
      transition: 0.4s ease-in-out;
      width: 100%;
      background-color: $button-bg-color;
      border: 1px solid $button-border-color;
      border-radius: 7px;
      text-shadow: 0 -1px 0 #50878e;
      color: $white-color;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;

      &:hover {
        background-color: $button-hover-bg-color;
        border: 1px solid $button-border-color;
      }
    }
  }

  &:hover {
    img {
      transform: translateY(-100%);
    }

    .roomInfo {
      transform: translateY(-200%);
    }

    button {
      transform: translateY(-20%);
    }
  }
}

/*--------------------------------------------------------------
   Skeleton image placeholder for loading state
--------------------------------------------------------------*/
.skeleton-img {
  width: 400px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.skeleton {
  opacity: 0.7;
  animation: skeleton-loading 1s linear infinite alternate;
  margin-bottom: 0.25rem;
  border: 0.125rem;
}

@keyframes skeleton-loading {
  0% {
    background-color: hsl(200, 20%, 70%);
  }
  100% {
    background-color: hsl(200, 20%, 95%);
  }
}
