h1 {
  font-size: clamp(2.5rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
}

.sgtb-container,
.mytb-container {
  h2 {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
  }
}

p,
li,
button {
  font-size: clamp(0.7rem, 1.5vw, 1rem);
}

table{
  font-size: clamp(0.7rem, 1.5vw, 1rem);
}

li {
  list-style: none;
}

.text-bold {
  font-weight: 700;
}

header {
  min-height: 32rem;

  position: relative;
  overflow: hidden;

  p {
    font-weight: 300;
  }
}

.hero-image {
  width: 100%;
  height: 100%;

  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;

  object-fit: cover;
  object-position: center 80%;
}

.box-shadow {
 display: flex; 
 flex-direction: column;
 justify-content: center;
 align-items: center;

 width: 100%;
 min-height: 32rem;

 text-align: center;
 color: white;
 background-color: #1b1b1b52;

 position: relative;
 z-index: 2;
}

/* Main */
main {
  padding: 0 1rem 5rem 1rem;

  transition: padding 0.5s ease;
}

@media (min-width: 700px) {
  main {
    padding-left: 5rem;
    padding-right: 5rem;
    transition: padding 0.5s ease;
  }
}

@media (min-width: 1280px) {
  main {
    padding-left: 10rem;
    padding-right: 10rem;
    transition: padding 0.5s ease;
  }
}

/* Switch */
.table-switch-container {
  display: flex;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);

  max-width: 1920px;
  height: 10rem;

  margin: 4rem auto 1rem auto;  
}

.switch-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 20px;

  color: rgba(255,255,255,0.7);
  font-weight: bold;
  letter-spacing: 1px;

  background-color: #333;
  background-blend-mode: luminosity;

  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

  cursor: pointer;

  & h2 {
    font-size: clamp(0.8rem, 5vw, 3rem);
  }

  &.sg-switch {
  background-image: url(../../images/singapore-menu.webp);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  }

  &.my-switch {
    background-image: url(../../images/malaysia-menu.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
}

.switch-image:not(.active):hover {
  background-blend-mode: multiply;
  color: white;
}

.sgtb-container,
.mytb-container {
  max-width: 1920px;
  margin: 0 auto;
  
  border: 2px solid #a7a7a7;
  border-radius: 10px;  
}

.tb-title {
  p {
    text-align: end;
  }
}

.tb-title,
.tb-filter,
.tb-foot {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  
  padding: 1rem 0.5rem;
}

.tb-title {
  padding: 1rem 0.5rem 0 0.5rem;
}

.tb-title-left {
  width: 80%;
}

.tb-title-left,
.tb-filter-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trips-quantity {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;

  width: clamp(5rem, 20vw, 8rem);

  line-height: 1.5rem;

  background: none;
  border: none;

  anchor-name: --tq-list;
  
  cursor: pointer;

  &:hover {
    background-image: linear-gradient(90deg, #0c4a6e, #55aedf);
    background-repeat: no-repeat;
    background-position-y: 100%;
    background-size: 100% 8%;
  }
}

.tq-option-list {
  display: none;
  flex-direction: column;
  gap: 0.5rem;

  width: clamp(5rem, 20vw, 8rem);
  margin-top: 0.5rem;

  border: 1px solid #7b7b7b;
  border-radius: 10px;

  background-color: white;

  box-shadow: 0px 0px 5px #7a7a7a;

  position: absolute;
  position-anchor: --tq-list;
  position-area: bottom center;
  z-index: 2;
  cursor: pointer;

  li {
    padding: 0.2rem 0;
  }
}

.tq-option-list li:hover {
  color: white;
  border-radius: 5px;

  background-image: linear-gradient(90deg, #0c4a6e, #55aedf);
}

/* Right filter */

.tb-filter-right {
  width: clamp(8rem, 30vw, 18rem);

  margin-left: 0.5rem;
}

.trips-type {
  display: flex;
  justify-content: space-between;

  width: 100%;
  padding: 0.2rem 0.5rem;

  border: 1px dashed #a7a7a7;
  border-radius: 5px;

  background-color: #eaecef;

  cursor: pointer;

  anchor-name: --tt-filter-menu;
}

.tt-filter-container {
  display: none;
  flex-direction: column;

  width: clamp(15rem, 30vw, 25rem);
  padding: 1rem;
  margin-top: 0.5rem;

  box-shadow: 0px 0px 5px #a7a7a7;
  background-color: white;
  border: 2px solid #a7a7a7;
  border-radius: 10px;

  position: absolute;
  position-anchor: --tt-filter-menu;
  position-area: bottom span-left;
}

.tt-filter-top {
  display: flex;
  justify-content: space-between;

  padding-bottom: 0.5rem;

  border-bottom: 2px dashed #a7a7a7;
}

.tt-filter-top .reset-btn {
  cursor: pointer;
}

.tt-filter-bottom {
  display: flex;
  flex-direction: column;
  
  padding-top: 0.5rem;
}

.tt-operator-container {
  margin: 1.5rem 0;
}

.tt-destination,
.tt-operator {
  display: flex;
  justify-content: space-between;
  align-items: center ;

  width: 100%;
  padding: 0.5rem;
  margin-top: 0.2rem;

  border: 1px solid #a7a7a7;
  border-radius: 5px;

  background: none;

  cursor: pointer;
}

.tt-destination {
  anchor-name: --destination-list;
}

.tt-operator {
  anchor-name: --operator-list;
}

.tt-destination-list,
.tt-operator-list {
  display: none;
  flex-direction: column;

  width: 100%;
  margin-top: 0.5rem;
  
  border: 2px solid #a7a7a7;
  border-radius: 10px;

  background-color: white;

  position: absolute;
  position-anchor: --destination-list;
  position-area: bottom center;

  li {
    padding: 0.4rem 1.5rem;
  }

  & li:hover {
    border-radius: 5px;

    color: white;
    background: linear-gradient(90deg, #0c4a6e, #55aedf);
  }
}

.tt-destination-list {
  position-anchor: --destination-list;
  position-area: bottom center;
}

.tt-operator-list {
  position-anchor: --operator-list;
  position-area: bottom center;
}

.tt-apply-filter-btn {
  padding: 0.5rem;

  border: none;
  border-radius: 5px;

  color: white;

  background-color: #5f9dbe;
  cursor: pointer;
}

/* To center every text in table */
.tb-text-center {
  text-align: center;
}

/* Table Css */
.schedule-sg,
.schedule-my {
  width: 100%;

  border-top: 2px solid #a7a7a7;
  border-bottom: 2px solid #a7a7a7;
  border-collapse: collapse;
}

thead {
  tr {
    line-height: 1;
    height: 1.5rem;
  }
}

tbody {
  tr {
    line-height: 0.5;
  }
}

td {
  width: 25%;
}

.row-no {
  width: 10%;
}

.row-time {
  width: 10%;
}

.tb-body {
  height: 1.8rem;

  border-top: 2px solid #a7a7a7;

  & .logo-majestic {
    width: 6rem;
  }

  & .logo-sindo,
  & .logo-batamfast {
    width: 3rem;
  }
}

@media (min-width: 700px) {
  .tb-head {
    height: 2rem;
  }
  
  .tb-body {
    height: 2rem;

  & .logo-majestic {
    width: 7rem;
  }

  & .logo-sindo,
  & .logo-batamfast {
    width: 4rem;
  }
  }
}

@media (min-width: 1280px) {
  .tb-head {
    height: 3rem;
  }
  
  .tb-body {
    height: 3rem;

  & .logo-majestic {
    width: 9rem;
  }

  & .logo-sindo,
  & .logo-batamfast {
    width: 6rem;
  }
  }
}

.tb-navigation {
  display: flex;

  & .active {
    color: white;
    background: linear-gradient(90deg, #0c4a6e, #55aedf);
  }

  & button {
    padding: 0.5em;

    border: 1px solid #a7a7a7;

    background-color: white;
  }

  & button:hover {
    color: white;
    background: linear-gradient(90deg, #0c4a6e, #55aedf);
  }

  & .tb-nav-pagination {
    display: flex;
  }

  & .previous-btn {
    border-radius: 10px 0px 0px 10px;
  }

  & .next-btn {
    border-radius: 0px 10px 10px 0px;
  }
}

@media (min-width: 700px) {
  .tb-navigation {
    & button {
      padding: 0.5rem 1rem;
    }
  }
}

.mytb-container {
  & > h2 {
    padding: 0.5rem 0.5rem;
  }
}

.mytb-title {
  margin-top: 2rem;
}

.schedule-my {
  .logo-idm {
    width: 5rem;
  }

  .logo-ctf {
    width: 4rem;
  }

  .logo-dff,
  .logo-psa,
  .logo-igs {
    width: 2rem;
  }

  .logo-dbs {
    width: 2.5rem;
  }
}

@media (min-width: 700px) {
  .schedule-my {
    .logo-idm {
      width: 5.5rem;
    }

    .logo-ctf {
      width: 4rem;
    }

    .logo-dff,
    .logo-psa,
    .logo-igs {
      width: 2rem;
    }

    .logo-dbs {
      width: 2.5rem;
    }
  }
}

@media (min-width: 1000px) {
  .schedule-my {
    .logo-idm {
      width: 8rem;
    }

    .logo-ctf {
      width: 6rem;
    }

    .logo-dff,
    .logo-psa,
    .logo-igs {
      width: 3.7rem;
    }

    .logo-dbs {
      width: 4rem;
    }
  }
}


/* Classlist add class for js */
.active {
  color: #ffd700;
  background-color: transparent;
  background-blend-mode: normal;

  border: 2px solid #007bff;

  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.filter-open {
  display: flex;
}

.hidden {
  display: none;
}

.darken {
  filter: opacity(10%);
}

.inactive-schedule {
  color: red;
}