/* INITIAL COLOURING OF FORM */
:root {
    --form-blue: #4244d2;
    --form-blue-lighter: #877ced;

    --form-default-background: #d2d2d2;
    --form-overlay: #f1f1f1aa;

    --form-alert: #9c5656;
    --form-input-initial-border: #a9a9a9;
    --form-input-focus-border: #4e4e4e;
}

/* OUTSIDE FORM */
.form-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1600px;
    width: 97.5%;
    margin: auto;
    padding: 80px 60px;
}

.form-wrapper h2 {
    margin: 10px 0px;
}

.form-wrapper h4 {
    margin: 10px 0px;
}

/* FORM */
.form-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 24px;
    position: relative;
    padding: 36px;
    box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.51);
    border-radius: 8px;
    width: 100%;
}

/* FORM OVERLAY */
.form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--form-overlay);
    backdrop-filter: blur(0.5px);
    display: none;
}

/* FORM ROW */
.form-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* FORM LABEL */
.form-row label {
    font-weight: 600;
    text-align: left;
    width: 80%;
}

.form-row:has(input[required]) label::after, .form-row:has(textarea[required]) label::after  {
    content: " - Required";
    color: var(--form-alert);
    font-size: 0.75rem;
    display: inline;
}

/* FORM INPUT, SELECT & TEXTAREA */
.form-row input, .form-row select, .form-row textarea {
    border: solid 2px var(--form-input-initial-border);
    padding: 5px;
    font-family: inherit;
    width: 80%;
    outline: none;
    transition: border 0.3s ease-in-out;
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    border: solid 2px var(--form-input-focus-border);
}

/* FORM CHECKBOX */
.form-row .checkbox-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin-top: 10px;
}

.form-row .checkbox-row label {
    font-weight: normal;
}

.form-row .checkbox-row input[type="checkbox"] {
    width: 30px;
    height: 30px;
}

/* FORM TEXTAREA */
.form-row textarea {
    resize: none;
    height: 150px;
}

/* FORM #ERRORLABEL */
#error-label {
    color: var(--form-alert);
    margin: 0 0 -30px 0;
    visibility: hidden;
    min-height: 1.5rem;
}

/* FORM SUBMIT */
.form-main input[type="submit"] {
    border: none;
    font-family: inherit;
    padding: 10px 20px;
    box-shadow: 2px 2px 1px -1px black;
    transition: box-shadow 0.3s linear;
}

.form-main input[type="submit"]:hover {
    box-shadow: 2px 2px 2px 0px black;
    cursor: pointer;
}

#form-main #rw-form-step {
      background-color: rgba(25, 118, 210, 1);
      color: white;
      width: fit-content;
      align-self: center;
      height: 50px;
      width: 60%;
      max-width: 400px;
      font-size: 16px;
      font-weight: 400;
      border: none;
      transition: all 0.2s ease-in-out;
      border-radius: 50px;
      position: relative;
      user-select: none;
      box-shadow: inset 0px 0px 24px -8px black;
      padding: 4px 0;
      touch-action: none;
}

#form-main #rw-form-step-cover {
      position: absolute;
      width: 100%;
      height: 100%;
      background-color: rgba(255, 255, 255, 0.6);
      border-radius: 50px;
      top: 0;
      left: 0;
      z-index: 30;
      display: none;
}

#form-main #rw-form-step-sub {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
      height: 42px;
      width: 42px;
      z-index: 20;
      color: rgba(25, 118, 210, 1);
      background-color: white;
      box-shadow: 0px 0px 8px -2px black;
      cursor: pointer;
      transform: translateX(4px);
}

#form-main #rw-form-step-sub .step-sub-up {
      width: 60%;
      position: absolute;
      transition: all 0.2s ease-out;
      display: block;
      opacity: 0%;
}

#form-main #rw-form-step-sub .step-sub-arrow {
      width: 60%;
      position: absolute;
      transition: all 0.2s ease-out;
      display: block;
      opacity: 100%;
}

#form-main #rw-form-step-what {
      color: black;
      margin: 0;
      width: full;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      font-weight: 500;
      height: 100%;
}

@keyframes appleShake {
      0% { transform: translateX(0); }
      20% { transform: translateX(-4px); }
      40% { transform: translateX(4px); }
      60% { transform: translateX(-4px); }
      80% { transform: translateX(4px); }
      100% { transform: translateX(0); }
}

.apple-shake {
      animation: appleShake 0.3s ease-in-out;
}