/* Overall container for form */
#form {
  width: 85vw;
  margin: 0 auto;
  padding: 1rem;
  font-size: var(--font-size-m);
  display: flex;
  flex-direction: row;
  gap: 3%;
  overflow: hidden;
}

/* left and right container to have 50% of overall container width */
.left_container,
.right_container {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* let the label be above the input */
.input-control {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* styling for the label */
.input-control label {
  font-size: var(--font-size-xl);
  color: rgb(var(--gray-300));
  font-weight: 300;
}

/* styling for input area and textarea */
.input-control input,
.input-control textarea {
  border: 2px solid rgb(var(--gray-600));
  border-radius: 0.4rem;
  display: block;
  font-size: var(--font-size-l);
  padding: 0.8rem;
  width: 100%;
  background: rgb(var(--gray-800));
  color: rgb(var(--gray-200));
  transition: 0.5s ease;
}

/* set the input field heights */
.input-control input {
  height: 3.2rem;
}

/* When user input has an error in it, it highlights the border red */
.input-control.error input,
.input-control.error textarea {
  border: 2px solid rgb(255, 56, 96);
}

/* When user input has no error in it, it highlights the border green */
.input-control.success input,
.input-control.success textarea {
  border: 2px solid rgb(126, 193, 26);
}

/* styling for the input and textarea when text is written in it */
.input-control input:focus,
.input-control textarea:focus {
  outline: 0;
  box-shadow: inset 0px 0px 1px 1.2px rgb(var(--gray-600));
}

/* style for the error text below the input and text fields */
.input-control .error {
  color: #ff3860;
  font-size: var(--font-size-m);
  height: 1rem;
}

/* Styling for submit button */
.right_container button {
  cursor: pointer;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 35%;
  height: 55px;
  border: 2px solid rgb(var(--gray-600));
  background: rgb(var(--gray-900));
  font-weight: 400;
  font-size: var(--font-size-xl);
  box-shadow: 0px 3px 7px 1.2px rgb(var(--gray-400), 0.2);
  color: rgb(var(--gray-300));
  border-radius: 0.8rem;
  z-index: 1;
  overflow: hidden;
  transition: 0.5s;
}

.right_container button::before {
  content: "";
  position: absolute;
  top: 0%;
  left: 0%;
  width: 0%;
  height: 100%;
  background: rgb(var(--gray-700), 0.5);
  z-index: -1;
  transition: 0.5s;
}

/* button when hovered and focused */
.right_container button:hover,
.right_container button:focus {
  color: rgb(var(--gray-100));
}

.right_container button:hover::before,
.right_container button:focus::before {
  width: 100%;
}

/* for tablet and small screens */
@media (max-width: 768px) {
  /* make the form display by column and increase width */
  #form {
    width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  /* left and right container to have 100% of overall container width */
  .left_container,
  .right_container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
}


/* Light mode contact panel & form */
.right_container.surface {
  background: #fff;
  border: 1px solid rgb(var(--gray-300));
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(24,24,30,.08);
}

.contact_form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact_form label span {
  display:block;
  font-size: var(--font-size-s);
  color: rgb(var(--gray-700));
  margin-bottom: .35rem;
}

.contact_form input, .contact_form textarea {
  width: 100%;
  background: #fff;
  border: 1px solid rgb(var(--gray-300));
  border-radius: 12px;
  padding: .8rem 1rem;
  color: rgb(var(--gray-900));
  outline: none;
}

.contact_form input::placeholder, .contact_form textarea::placeholder {
  color: rgb(var(--gray-400));
}

.contact_form .submit {
  align-self: flex-start;
  background: rgb(var(--blue-400));
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .75rem 1.25rem;
  box-shadow: 0 6px 14px rgba(59,130,246,.25);
  cursor: pointer;
}

.contact_form .submit:hover, .contact_form .submit:focus {
  background: rgb(var(--blue-500));
}
