/* Extracted from theme style.css. Keep cascade order in functions.php. */

/* --------------- SEARCH PAGE --------------------- */

.search {
  background-color: #f2f2f2;
}

.main-container-search {
  padding: 7rem 9rem 6rem 9rem;
  min-height: 100vh;
  height: 100%;
  background: var(--bg);

  display: flex;
  flex-direction: column;
  gap: 2rem;

  .title-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
  }
}

.search-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  gap: 2rem;

  .left-part-search {
    flex: 1;
    height: fit-content;
    background-color: var(--white);
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    padding: 2rem;

    position: sticky;
    top: 6rem;
    align-self: flex-start;

    display: flex;
    flex-direction: column;
    gap: 2rem;

    .form-search-top {
      display: none;
    }

    .form-search-content {
      display: flex;
      flex-direction: column;
      gap: 2rem;
    }

    .filter-row {
      display: flex;
      flex-direction: column;
      gap: 1rem;

      input[type="text"],
      select {
        padding: 1rem;
        border: 1px solid var(--gray-3);
        border-radius: var(--radius-3);
        background-color: #FAFAFA;
        box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;

        font-size: 1rem;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.5);

        &:focus {
          outline: none;
          border-color: var(--purple-stroke);
        }

        &::placeholder {
          opacity: 0.8;
          font-size: 1rem;
          font-weight: 500;
        }
      }
    }

    .filter-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;

      a {
        text-decoration: none;
      }
    }
  }
}

.right-part-search {
  flex: 3;
  height: 100%;

  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--bg);
}

.class-card {
  width: 100%;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  border-radius: var(--radius-3);
  border-top-left-radius: 0;

  display: flex;
  align-items: center;
  overflow: hidden;
  height: 300px;
  position: relative;
  transition: all 0.6s ease;
  cursor: pointer;

  .left-banner {
    width: 25%;
    height: 100%;
    background: var(--gradient-learnio);
    padding: 1rem;

    display: flex;
    align-items: center;
    justify-content: center;

    .user-avatar {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      border: 6px solid white;
      position: relative;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
      }

      .vertified-badge {
        position: absolute;
        bottom: 5px;
        right: 5px;
        transform: translate(-5px, 5px);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: white;
        padding: 5px;

        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
        }
      }
    }
  }

  .content {
    padding: 1.5rem;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    height: 100%;

    .header {
      display: flex;
      gap: 0.5rem;
      justify-content: space-between;
      align-items: center;

      .class-name {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
      }

      .tags {
        display: flex;
        gap: 0.5rem;

        .tag {
          padding: 0.3rem 0.6rem;
          border-radius: var(--radius-3);
          background-color: var(--purple-stroke-light);
          color: var(--purple-stroke);

          &.inversed {
            background-color: transparent;
            border: 1px solid var(--purple-stroke);
          }
        }
      }

      .teacher-info {
        display: flex;
        gap: 0.3rem;
        flex-direction: column;
        align-items: flex-end;

        .rating {
          display: flex;
          gap: 0.3rem;
          align-items: center;

          img {
            width: 15px;
            height: 15px;
            object-fit: contain;
          }

        }
      }
    }

    .footer {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;

      .foot-head {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        width: 100%;

        span {
          flex: 5;
          height: 1px;
          width: 100%;
          background-color: var(--purple-stroke);
          display: block;
        }

        .price {
          flex: 1;
          display: flex;
          padding: 0.3rem 0.7rem;
          border-radius: var(--radius-2);
          background-color: #E9DDF6;
          color: var(--purple-stroke);
          gap: 0.3rem;
          align-items: center;
          justify-content: center;
        }
      }

      .foot-body {
        display: flex;
        gap: 3rem;
        align-items: center;
        width: 100%;

        .info-block {
          display: flex;
          flex-direction: column;
          gap: 0.6rem;
          align-items: flex-start;
          padding-top: 0.3rem;

          .info {
            display: flex;
            gap: 0.3rem;
            align-items: center;

            img {
              width: 15px;
              height: 15px;
              object-fit: contain;
            }
          }

          &.countries {
            .info {
              gap: 0.6rem;
            }

            .country {
              width: 20px;
              height: 20px;
              border-radius: 50%;
              overflow: hidden;
              box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;

              display: flex;
              align-items: center;
              justify-content: center;

              img {
                width: 60%;
                height: 60%;
                object-fit: cover;
              }
            }
          }
        }

        .is-booked {
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          justify-content: center;
          gap: 0.6rem;
          padding-top: 0.3rem;

          border-radius: var(--radius-2);
          padding: 0.3rem 0.7rem;
          background-color: #FF5252;
          color: var(--white);
        }
      }
    }
  }

  .featured-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--brand-orange);
    color: var(--white);
    width: 50px;
    height: 45px;
    border-top-left-radius: var(--radius-2);
    border-bottom-right-radius: var(--radius-3);
    border-bottom-left-radius: 0;
    border-top-right-radius: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;

    transition: all 0.6s ease;

    img {
      width: 20px;
      height: 20px;
      object-fit: contain;
      transition: all 0.6s ease;
      position: relative;
    }

    .featured-text {
      opacity: 0;
      visibility: visible;
      left: 100%;
      display: none;
      transition: all 0.6s ease;
    }
  }
}


.class-card:hover {
  transform: translateY(-5px);

  .featured-tag {
    width: 120px;

    .featured-text {
      opacity: 1;
      left: 0%;
      top: 1px;
      transform: translateX(0%);
      position: relative;
      display: block;
    }

    img {
      transform: rotate(360deg);
      /* Animación de rotación */
    }
  }
}

.classes-pagination {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.classes-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.classes-pagination a.page-numbers,
.classes-pagination span.page-numbers {
  align-items: center;
  border: 1px solid var(--purple-stroke);
  border-radius: var(--radius-2);
  color: var(--purple-stroke);
  display: flex;
  font-weight: 600;
  justify-content: center;
  min-height: 2.4rem;
  min-width: 2.4rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.classes-pagination a.page-numbers:hover,
.classes-pagination span.page-numbers.current {
  background: var(--gradient-learnio);
  border-color: transparent;
  color: var(--white);
}


.search-section,
.right-part-search,
.class-card,
.class-card .content {
  min-width: 0;
}

.class-card-link {
  width: 100%;
  display: block;
  text-decoration: none;
  color: inherit;
}