@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --blur: 60px;
  --textColor: #001f3f;
  --textColorOpposite: #f6f5f7;
  --baseColor: #aab7ea;
  --darkColor: #dadada;
  --firstGradientColor: #dadada;
  --lightColor: #adadad;
  --secondGradientColor: #adadad;
  --positionX: 30px;
  --positionXOpposite: -30px;
  --positionY: 30px;
  --positionYOpposite: -30px;
  --angle: 145deg;
  --size: 150px;
  --radius: 30px;
  --lightgray: #e8e8e8;
  --border-radius: 10px;
  --semibold: 600;
  --offwhite: #f2f2f2;
  --grey: #9c9c9c;
  --blue-grey-1: #9fa3af;
  --blue-grey-2: #bbbec9be;
  --secondary-grey-light: #dcdcdc;
  --maindark: #171717;
  --dark: #212121;
  --darker: #111111;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--baseColor);
  color: var(--textColor);
  font-family: 'Noto Sans JP', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  margin: 0;
  padding-top: 40px;

  @media only screen and (min-height: 800px) {
    justify-content: center;
  }
  @media only screen and (max-height: 600px) {
    padding-top: 10px;
  }
}
.soft-element {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: var(--size);
  height: var(--size);
  border-radius: var(--radius);
}

.soft-shadow {
  background: linear-gradient(var(--angle), var(--firstGradientColor), var(--secondGradientColor));
  box-shadow: var(--positionX) var(--positionY) var(--blur) var(--darkColor),
    var(--positionXOpposite) var(--positionYOpposite) var(--blur) var(--lightColor);

  &.pressed {
    box-shadow: inset var(--positionX) var(--positionY) var(--blur) var(--darkColor),
      inset var(--positionXOpposite) var(--positionYOpposite) var(--blur) var(--lightColor);
  }
}

.title {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 20px;
  z-index: 1;

  @media only screen and (min-width: 1200px) {
    margin-bottom: 60px;
    margin-top: 0;
    h1 {
      font-size: 35px;
    }
    h2 {
      font-size: 25px;
    }
  }

  @media only screen and (max-width: 680px) and (max-height: 800px) {
    margin-bottom: 10px;
    margin-top: 10px;
    h1 {
      font-size: 22px;
    }
    h2 {
      font-size: 15px;
    }
  }
  @media only screen and (max-width: 680px) and (max-height: 620px) {
    h1 {
      display: none;
    }
    h2 {
      font-size: 14px;
    }
  }

  @media only screen and (max-height: 600px) {
    display: none;
    h2 {
      display: none;
    }
  }

  h1 {
    font-weight: bold;
    margin: 0;
  }
  h2 {
    font-weight: normal;
    margin: 0;
    margin-top: 5px;
    font-size: 21px;
  }
}

.container {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;

  @media only screen and (min-height: 800px) {
    margin-bottom: 70px;
  }

  .flex-custom {
    display: inline-flex;
    margin-inline: auto;
    align-items: flex-start;

    @media only screen and (max-width: 680px) {
      flex-direction: column;
      align-items: center;
    }

    .preview {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 500px;
      height: 500px;
      margin-right: 50px;

      @media only screen and (max-width: 1000px), only screen and (max-height: 713px) {
        width: 400px;
        height: 400px;
        margin-right: 30px;
      }
      @media only screen and (max-width: 800px) {
        width: 300px;
        height: 300px;
        margin-right: 20px;
      }
      @media only screen and (max-width: 680px) {
        width: 100%;
        height: 200px;
        margin-right: 0px;
        margin-bottom: 30px;
        z-index: 1;
      }
      @media only screen and (max-height: 735px) {
        margin-bottom: 20px;
      }
      @media only screen and (max-height: 720px) {
        margin-bottom: 0px;
      }
    }

    .configuration {
      display: flex;
      flex-direction: column;
      padding: 20px 30px;
      border-radius: 30px;
      text-align: left;
      position: relative;

      @media only screen and (min-width: 1700px) {
        font-size: 16px;
      }

      @media only screen and (max-width: 950px) {
        font-size: 12px;
      }

      @media only screen and (max-width: 680px) {
        font-size: 11px;
        padding: 15px;
        border-radius: 15px;
        box-shadow: none;
        background: var(--baseColor);
      }

      .row {
        display: flex;
        align-items: center;
        font-weight: bold;
        color: var(--textColor);
        margin-bottom: 20px;
        margin-top: 0px;

        &--label {
          margin-bottom: 10px;
        }

        @media only screen and (max-width: 680px) and (max-height: 715px),
          screen and (max-height: 720px) {
          margin-bottom: 10px;

          &.row--checkbox {
            margin-bottom: 7px;
          }
        }

        @media only screen and (max-width: 680px) and (max-height: 650px),
          screen and (max-height: 600px) {
          margin-bottom: 5px;

          &.row--checkbox {
            margin-bottom: 7px;
          }
        }

        label {
          padding-right: 10px;
          user-select: none;

          @media only screen and (max-width: 950px) {
            padding-right: 6px;
          }
        }
      }
      .code-block {
        font-size: 10px;
        position: relative;

        pre {
          margin: 0 !important;
          padding: 15px !important;
          background: var(--textColor) !important;
          min-width: 354px;

          code {
            //white-space: pre-line !important;
          }
        }

        @media only screen and (min-width: 1500px) {
          font-size: 12px;

          pre {
            min-width: 430px !important;
          }
        }

        @media only screen and (min-width: 1700px) {
          font-size: 14px;

          pre {
            min-width: 500px !important;
          }
        }

        @media only screen and (max-width: 950px) {
          font-size: 8px;

          pre {
            min-width: 290px !important;
          }
        }

        &:before {
          content: 'Copied to clipboard!';
          position: absolute;
          width: 100%;
          height: 100%;
          background: #47a049;
          color: #f6f5f7;
          font-size: 15px;
          font-weight: bold;
          opacity: 0.9;
          vertical-align: middle;
          display: flex;
          align-items: center;
          justify-content: center;
          text-align: center;
          left: 0;
          right: 0;
          top: 0;
          bottom: 0;
          z-index: -1;
        }

        &.copied:before {
          z-index: 2;
        }

        &.copied {
          .copy {
            display: none;
          }
        }

        .copy {
          position: absolute;
          top: 4px;
          right: 4px;
          border-radius: 3px;
          background-color: #3b843c;
          color: white;
          border: none;
          cursor: pointer;
          padding: 3px 7px;
        }

        #code-container,
        .hidden {
          position: absolute;
          left: -9999px;
        }
      }
      .shape-switch {
        display: flex;
        overflow: hidden;
        border-radius: 3px;
        flex-grow: 1;

        button {
          flex-grow: 1;
          padding: 4px 10px;
          background: var(--textColor);
          color: var(--textColorOpposite);
          cursor: pointer;
          outline: 0;
          border: none;
          opacity: 0.8;

          svg {
            stroke: var(--textColorOpposite);
            width: 45px;
          }

          * {
            pointer-events: none;
          }

          &.active {
            opacity: 1;
          }
        }
      }
    }
  }
}

@import './styles/inputs.scss';
@import './styles/footer.scss';
@import './styles/Card.scss';
