styles

mail@pastecode.io avatar
unknown
scss
2 years ago
4.3 kB
1
Indexable
Never
@use "./colors" as colors;
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap");

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

html {
  min-height: 100vh;
}

body {
  background-image: linear-gradient(
    -225deg,
    #2cd8d5 0%,
    #c5c1ff 56%,
    #ffbac3 100%
  );
  font-family: "Montserrat", sans-serif;
  color: colors.$primary-color;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  h1 {
    font-size: 2.5rem;
    margin: 2rem 0;
    text-align: center;
    text-transform: uppercase;
  }

  .navbar {
    border-radius: 0 0 50px 50px;
    background-color: colors.$white;
    color: #121212;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;
    width: 100%;

    h1 {
      background: linear-gradient(
        to right,
        #00ff00,
        #07bdea,
        #0000ff,
        #ff00c8,
        yellow
      );
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      background-size: 200% 100%;
      animation: move-gradient 3s ease-in-out infinite;
    }
  }

  .search {
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;

    label {
      font-size: 1.5rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
    }

    input {
      text-align: center;
      font-size: 1.2rem;
      padding: 0.8rem;
      height: 60px;
      color: colors.$white;
      border: 2px solid colors.$primary-color;
      border-radius: 4px;
      width: 80%;
      background: none;
      outline: none;
      color: colors.$primary-color;

      &::placeholder {
        color: colors.$primary-color;
      }
    }
  }

  .station-list {
    h2 {
      font-size: 1.8rem;
      margin-bottom: 1rem;
      text-align: center;
    }

    .stations {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      gap: 2rem;
      .box__stations {
        &_weather,
        &_hydro {
          width: 80%;
          padding: 1rem;
          border: 2px solid colors.$primary-color;
          border-radius: 4px;
          margin-bottom: 1rem;
          transition: 0.2s ease-in-out all;
        }
        &_hydro {
          background-color: #457b9d;
          color: #f1faee;
          &:hover {
            background-color: #073b4c;
            color: #06d6a0;
          }
        }
        h2 {
          font-size: 1.5rem;
          margin-bottom: 0.5rem;
        }

        div {
          font-size: 1.2rem;
          margin-bottom: 0.5rem;
        }
        &_weather {
          background-color: #f1faee;
          color: #457b9d;
          min-width: max-content;
          &:hover {
            background-color: #003566;
            color: #ffc300;
          }
          &.low {
            border-color: colors.$secondary-color;
            color: colors.$secondary-color;
          }

          &.high {
            border-color: #ffc857;
            color: #ffc857;
          }

          &.normal {
            border-color: colors.$primary-color;
            color: colors.$primary-color;
          }
        }
      }

      @media (min-width: 768px) {
        .box__stations_weather, .box__stations_hydro {
          height: 180px;
          max-width: 45%;
          box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
        }
        .station-list {
          width: 800px;
        }
        .container {
          flex-direction: row;
          justify-content: space-between;
          align-items: flex-start;

          .navbar {
            border-radius: 50px 0 0 50px;
            width: auto;
            h1 {
              font-size: 3rem;
            }
          }

          .search {
            width: 40%;

            input {
              font-size: 1.5rem;
              height: 80px;
            }
          }
        }
      }
    }
  }
}