@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@200..900&display=swap');

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

html {
  background-color: hsl(248, 70%, 10%);
  overflow-x: hidden;
}

body {
  font-size: 16px;
  color: #fff;
  font-family: 'Inconsolata', monospace;
  overflow-y: auto;
  background-image: url('/assets/images/background-mobile.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: auto;
  overflow: hidden;
  padding-bottom: 7rem;
}

.pattern-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 53rem;
  height: 50rem;
  background-image: url('/assets/images/pattern-lines.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top left;
  z-index: 2;
}

.pattern-circle {
  position: absolute;
  top: -4.5%;
  right: 62%;
  width: 169px;
  height: 120px;
  background-image: url('/assets/images/pattern-circle.svg');
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 3;
}

.squiggly-line {
  position: absolute;
  top: 3%;
  right: 0;
  width: 110px;
  height: 200px;
  background-image: url('/assets/images/pattern-squiggly-line-top.svg');
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 3;
}

.pattern-circle2 {
  position: absolute;
  bottom: 34%;
  right: -14%;
  width: 118px;
  height: 203px;
  background-image: url('/assets/images/pattern-circle.svg');
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
  z-index: 3;
}

.main-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 32px;
  padding-inline: 1rem;
  gap: 1.5rem;
  z-index: 4;
}

.logo {
  position: static;
  width: 180px;
  height: auto;
  margin-bottom: 20px;
}

h2 {
  color: #ffffff;
  font-weight: 700;
  padding: 1px;
  word-spacing: 3px;
  font-size: 28px;
}

p.header-p {
  color: hsl(245, 15%, 58%);
  font-size: 21px;
  font-weight: 500;
}

.form {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 35px auto 0 auto;
  padding: 0;
  z-index: 4;
}

.upload {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  align-self: flex-start;
  margin-left: calc(50% - 170px);
}

.drop-box {
  width: 340px;
  height: 130px;
  border: 2px dashed hsl(245, 15%, 58%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  background-color: hsl(248, 42%, 18%);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.icon-upload {
  border: 1px solid hsl(245, 19%, 35%);
  padding: 0.6rem;
  border-radius: 10px;
  background-color: hsl(244, 22%, 25%);
}

.upload-text {
  text-align: center;
  font-size: 0.97rem;
  color: hsl(252, 6%, 83%);
}

.icon-info {
  display: flex;
  gap: 8px;
  color: hsl(252, 6%, 83%);
  align-items: flex-start;
  flex-wrap: nowrap;
  max-width: 340px;
  width: 100%;
}

#upload-error-text {
  font-size: 13px;
  text-align: left;
  line-height: 1.4;
}

#upload-error-text .error {
  font-size: 13px;
  text-align: left;
  flex: 0;
}

.icon-info img {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.input {
  display: flex;
  flex-direction: column;
}

.input label {
  font-size: 20px;
}

.input input {
  display: block;
  outline: none;
  width: 340px;
  margin-top: 10px;
  margin-bottom: 25px;
  padding: 18px;
  background-color: hsl(248, 42%, 18%);
  border: 1px solid hsl(245, 19%, 35%);
  color: hsl(252, 6%, 83%);
  border-radius: 10px;
  font-size: 17px;
  caret-color: hsl(252, 6%, 83%);
}

.input input::placeholder {
  font-family: 'Inconsolata', monospace;
  color: hsl(252, 6%, 83%);
  font-size: 17px;
}

.input input:active {
  color: hsl(245, 19%, 35%);
}

/* input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input:-webkit-autofill:focus-visible {
  font-family: 'Inconsolata', monospace !important;
  font-size: 17px !important;
  background-color: hsl(248, 42%, 18%) !important;
  -webkit-text-fill-color: hsl(252, 6%, 83%) !important;
  caret-color: hsl(252, 6%, 83%) !important;
  border: 1px solid hsl(245, 19%, 35%) !important;
  border-radius: 10px !important;
  transition: background-color 5000s ease-in-out 0s !important;
  outline-offset: 0;
  outline: none !important;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px hsl(248, 42%, 18%) inset;
  -webkit-text-fill-color: hsl(252, 6%, 83%);
  font-size: 17px;
} */

.hidden {
  display: none;
}

.border {
  border-color: hsl(7, 71%, 60%) !important;
}

.error {
  filter: saturate(197752%) hue-rotate(106deg) contrast(134%);
}

.icon-info-2 {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: hsl(252, 6%, 83%);
  margin-top: -13px;
  margin-bottom: 20px;
}

#submit-btn:active {
  transform: scale(0.97);
  background-color: hsl(7, 80%, 74%);
  box-shadow: 0 0 0 transparent;
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.button-clicked {
  animation: buttonPulse 0.2s ease;
}

@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

.uploaded-image {
  width: 45px;
  height: 45px;
  border: 2px solid hsl(245, 15%, 58%);
  border-radius: 13px;
  padding: 0.1rem;
}

.remove-btn,
.change-btn {
  width: 100px;
  padding: 3px;
  cursor: pointer;
  background-color: hsl(245, 19%, 35%);
  color: hsl(252, 6%, 83%);
  border: none;
  border-radius: 5px;
  margin: 1px 0 5px 8px;
  font-weight: normal;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.remove-btn:hover,
.change-btn:hover {
  background-color: hsl(245, 15%, 58%);
}

.image-action {
  display: flex;
}

button {
  position: relative;
  z-index: 4;
  padding: 15px;
  margin-top: -15px;
  width: 340px;
  outline: none;
  border: 1px solid hsl(7, 71%, 60%);
  border-radius: 10px;
  background-color: hsl(7, 71%, 60%);
  color: hsl(248, 70%, 10%);
  font-family: 'Inconsolata', monospace;
  font-weight: 900;
  font-size: 22px;
}

button:active {
  font-family: 'Inconsolata', monospace;
  outline: none;
}

.squiggly-line2 {
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  width: 340px;
  z-index: 2;
  pointer-events: none;
  height: 230px;
  background-image: url('/assets/images/pattern-squiggly-line-bottom-mobile-tablet.svg');
  background-repeat: no-repeat;
  background-size: contain;
}

/* Media query for the Z fold 5 type screens */
@media (max-width: 350px) and (min-height: 880px) {
  .form {
    width: 100%;
    max-width: 400px;
    margin: 40px auto 0 auto;
    padding: 0 16px;
    align-items: flex-start;
  }

  .upload,
  .icon-info {
    text-align: left;
    width: 100%;
    margin-left: 0;
  }

  .drop-box {
    width: 100%;
    max-width: 400px;
    height: 150px;
    gap: 24px;
    margin: 0 auto;
  }

  .icon-info {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .icon-info img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
  }

  #upload-error-text,
  .icon-info .error {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
  }

  .input {
    align-items: flex-start;
    width: 100%;
  }

  .input input,
  button {
    width: 300px;
    font-size: 16px;
  }

  .logo {
    width: 150px;
  }

  h2 {
    font-size: 24px;
    text-align: center;
  }

  p.header-p {
    font-size: 18px;
    text-align: center;
  }

  .upload {
    font-size: 18px;
    margin-left: calc(50% - 150px);
  }

  .squiggly-line2 {
    position: absolute;
    top: 796px;
    left: 0px;
    overflow: hidden;
    width: 320px;
    z-index: 2;
    pointer-events: none;
    height: 100%;
    background-image: url('/assets/images/pattern-squiggly-line-bottom-mobile-tablet.svg');
    background-repeat: no-repeat;
    background-size: contain;
  }
}

/* Media query for Tablets and Ipads */
@media (min-width: 768px) and (max-width: 1024px) and (min-height: 601px) {
  body {
    overflow-y: auto;
    background-image: url('/assets/images/background-desktop.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .pattern-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    background-size: auto;
    overflow-x: hidden;
    z-index: 2;
  }

  .pattern-circle {
    position: absolute;
    top: -5.5%;
    left: -3%;
    width: 159px;
    height: 100%;
    z-index: 3;
  }

  .squiggly-line {
    position: absolute;
    top: 3%;
    right: 0;
    width: 100%;
    max-width: 169px;
    height: 100%;
    z-index: 3;
  }

  .pattern-circle2 {
    position: absolute;
    bottom: 35%;
    right: 9.5%;
    width: 183px;
    height: 100%;
    background-image: url('/assets/images/pattern-circle.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    z-index: 3;
  }

  h2 {
    color: #fff;
    font-weight: 700;
    font-size: 41px;
    max-width: 570px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.3;
  }

  .main-content {
    padding-inline: 2rem;
    gap: 2rem;
  }

  .logo {
    width: 200px;
  }

  p.header-p {
    font-size: 18px;
    max-width: 600px;
  }

  .form {
    padding: 0;
    width: 400px;
    margin: 40px auto 0 auto;
    align-items: flex-start;
  }

  .upload,
  .icon-info {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }

  .icon-info {
    max-width: 360px;
  }

  .drop-box {
    width: 400px;
    height: 150px;
    gap: 24px;
  }

  .upload-text {
    font-size: 1rem;
  }

  .icon-upload {
    padding: 0.8rem;
  }

  .input input {
    width: 400px;
    padding: 16px;
    font-size: 18px;
  }

  label {
    font-size: 22px;
  }

  button,
  #submit-btn {
    width: 400px;
    padding: 18px;
    font-size: 24px;
  }

  .icon-info-2 {
    font-size: 14px;
    gap: 10px;
  }

  #upload-error-text {
    font-size: 14px;
  }

  .uploaded-image {
    width: 50px;
    height: 50px;
  }

  .remove-btn,
  .change-btn {
    width: auto;
    padding: 6px 12px;
    margin: 1px 0 5px 8px;
    font-size: 15px;
    gap: 5px;
  }

  .squiggly-line2 {
    position: absolute;
    width: 3485px;
    bottom: 0;
    left: 0;
    max-width: 550px;
    height: 330px;
    z-index: 2;
    overflow: hidden;
    background-image: url('/assets/images/pattern-squiggly-line-bottom-mobile-tablet.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom left;
    pointer-events: none;
  }
}

/* For the Nest Hub type screens */
@media (width: 1024px) and (min-height: 600px) {
  body {
    overflow-y: auto;
    background-image: url('/assets/images/background-desktop.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .pattern-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    background-size: auto;
    overflow-x: hidden;
    z-index: 2;
  }

  .pattern-circle {
    position: absolute;
    top: -5.5%;
    left: -3%;
    width: 159px;
    height: 100%;
    z-index: 3;
  }

  .squiggly-line {
    position: absolute;
    top: 3%;
    right: 0;
    width: 100%;
    max-width: 169px;
    height: 100%;
    z-index: 3;
  }

  .pattern-circle2 {
    position: absolute;
    bottom: 35%;
    right: 9.5%;
    width: 183px;
    height: 100%;
    background-image: url('/assets/images/pattern-circle.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    z-index: 3;
  }

  h2 {
    color: #fff;
    font-weight: 700;
    font-size: 41px;
    max-width: 570px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.3;
  }

  .main-content {
    padding-inline: 2rem;
    gap: 2rem;
  }

  .logo {
    width: 200px;
  }

  p.header-p {
    font-size: 18px;
    max-width: 600px;
  }

  .form {
    padding: 0;
    width: 400px;
    margin: 40px auto 0 auto;
    align-items: flex-start;
  }

  .upload,
  .icon-info {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }

  .icon-info {
    max-width: 360px;
  }

  .drop-box {
    width: 400px;
    height: 150px;
    gap: 24px;
  }

  .upload-text {
    font-size: 1rem;
  }

  .icon-upload {
    padding: 0.8rem;
  }

  .input input {
    width: 400px;
    padding: 16px;
    font-size: 18px;
  }

  label {
    font-size: 22px;
  }

  button,
  #submit-btn {
    width: 400px;
    padding: 18px;
    font-size: 24px;
  }

  .icon-info-2 {
    font-size: 14px;
    gap: 10px;
  }

  #upload-error-text {
    font-size: 14px;
  }

  .uploaded-image {
    width: 50px;
    height: 50px;
  }

  .remove-btn,
  .change-btn {
    width: auto;
    padding: 6px 12px;
    margin: 1px 0 5px 8px;
    font-size: 15px;
    gap: 5px;
  }

  .squiggly-line2 {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -167px;
    width: 100%;
    max-width: 50rem;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background-image: url('/assets/images/pattern-squiggly-line-bottom-desktop.svg');
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: contain;
  }
}

/* ----- DESKTOP MEDIA QUERY -------*/

@media (min-width: 1025px) {
  body {
    overflow-y: auto;
    background-image: url('/assets/images/background-desktop.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .pattern-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    background-size: auto;
    overflow-x: hidden;
    z-index: 2;
  }

  .pattern-circle {
    position: absolute;
    top: -5.5%;
    left: -3%;
    width: 140px;
    height: 100%;
    z-index: 3;
  }

  .squiggly-line {
    position: absolute;
    top: 3%;
    right: 0;
    width: 100%;
    max-width: 370px;
    height: 100%;
    z-index: 3;
  }

  .pattern-circle2 {
    position: absolute;
    bottom: 31%;
    right: 28.5%;
    width: 183px;
    height: 100%;
    background-image: url('/assets/images/pattern-circle.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    z-index: 3;
  }

  .squiggly-line2 {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -167px;
    width: 100%;
    max-width: 50rem;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background-image: url('/assets/images/pattern-squiggly-line-bottom-desktop.svg');
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: contain;
  }

  .logo {
    position: static;
    width: 100%;
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
  }

  .main-content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 32px;
    padding-inline: 1rem;
    gap: 1.5rem;
  }

  h2 {
    color: #fff;
    font-weight: 700;
    /* word-spacing: 3px; */
    font-size: 41px;
    max-width: 570px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.3;
  }

  p.header-p {
    color: hsl(252, 6%, 83%);
    font-size: 18px;
    font-weight: 500;
  }

  .form {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 auto;
    width: 100%;
    max-width: 365px;
    padding-top: 2rem;
  }

  .drop-box {
    width: 100%;
    max-width: 365px;
    height: 130px;
    border: 2px dashed hsl(245, 15%, 58%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    background-color: hsl(248, 42%, 18%);
    cursor: pointer;
    transition: border-color 0.3s ease;
    position: relative;
    object-fit: contain;
    overflow: hidden;
  }

  .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .input input {
    display: block;
    outline: none;
    width: 365px;
    margin-top: 10px;
    margin-bottom: 25px;
    padding: 14px;
    background-color: hsl(248, 42%, 18%);
    border: 1px solid hsl(245, 19%, 35%);
    color: hsl(252, 6%, 83%);
    border-radius: 10px;
    font-size: 15px;
  }

  .input input::placeholder {
    font-family: 'Inconsolata', monospace;
    color: hsl(252, 6%, 83%);
    font-size: 15px;
  }

  .input input:active {
    color: hsl(245, 19%, 35%);
  }

  .hidden {
    display: none;
  }

  .border {
    border-color: hsl(7, 71%, 60%) !important;
  }

  .error {
    filter: saturate(197752%) hue-rotate(106deg) contrast(134%);
  }

  .icon-info-2 {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: hsl(252, 6%, 83%);
    margin-top: -13px;
    margin-bottom: 20px;
  }

  button {
    position: relative;
    z-index: 4;
    padding: 15px;
    margin-top: -15px;
    width: 365px;
    outline: none;
    border: 1px solid hsl(7, 71%, 60%);
    border-radius: 10px;
    background-color: hsl(7, 71%, 60%);
    color: hsl(248, 70%, 10%);
    font-family: 'Inconsolata', monospace;
    font-weight: 900;
    font-size: 22px;
    cursor: pointer;
  }

  #submit-btn:active {
    transform: scale(0.97);
    background-color: hsl(7, 80%, 74%);
    box-shadow: 0 0 0 transparent;
    transition: transform 0.1s ease, background-color 0.2s ease;
  }

  .button-clicked {
    animation: buttonPulse 0.2s ease;
  }

  @keyframes buttonPulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(0.98);
    }
    100% {
      transform: scale(1);
    }
  }

  .uploaded-image {
    width: 45px;
    height: 45px;
    border: 2px solid hsl(245, 15%, 58%);
    border-radius: 13px;
    padding: 0.1rem;
  }

  .remove-btn,
  .change-btn {
    width: 100px;
    padding: 3px;
    cursor: pointer;
    background-color: hsl(245, 19%, 35%);
    color: hsl(252, 6%, 83%);
    border: none;
    border-radius: 5px;
    margin: 1px 0 5px 8px;
    font-weight: normal;
    font-size: 14px;
    transition: background-color 0.3s ease;
  }

  .remove-btn:hover,
  .change-btn:hover {
    background-color: hsl(245, 15%, 58%);
  }

  .image-action {
    display: flex;
  }
}
