/* stylelint-disable no-descending-specificity */
/* stylelint-disable selector-class-pattern */

/*
Common styles for faas form Dexter's
*/

a[href*='/tools/faas#'], a[href*='/tools/faas?'] {
  visibility: hidden !important;
}

.faas {
  --faas-form-border: #6E6E6E;
  --faas-form-error: #D7373F;
  --faas-form-focus: #147AF3;
  --faas-form-text: #535353;

  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
  box-shadow: 0 3px 10px 0 rgb(0 0 0 / 10%);
  background-color: #FBFBFB;
  color: #2C2C2C;
}

.faas-aria-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.faas .note {
  display: none;
}

.faas-title {
  margin-bottom: 1.25em;
}

.faas-title.text-center {
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}

.faas-title.text-right {
  text-align: right;
}

.faas-form .row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 12px 0;
}

.faas-form .submit input {
  background: var(--color-accent);
  border-radius: 16px;
  border: 2px solid var(--color-accent);
  height: 32px;
  color: var(--color-white);
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  padding: 0 14px;
  margin: 0 auto;
  text-decoration: none;
  cursor: pointer;
}

.faas-form .submit input:is(:hover, :active, :focus) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
  text-decoration: none;
}

.faas-form label,
.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.faas-form select,
.faas-form textarea {
  box-sizing: border-box;
  width: 50%;
  min-width: 352px;
}

.faas-form label {
  font-size: 16px;
  font-weight: 600;
}

.faas-form label .required {
  display: none;
}

input[type="checkbox"] + label {
  width: 95%;
  font-weight: normal;
}

.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.faas-form select,
.faas-form textarea {
  appearance: none;
  outline: 0;
  padding: 0.5rem 1rem;
  font-size: 18px;
  line-height: 38px;
  border: 1px solid var(--faas-form-border);
  border-radius: 4px;
  color: var(--text-color);
  background-color: var(--color-white);
  box-shadow: none;
}

.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit])::placeholder,
.faas-form select::placeholder,
.faas-form textarea::placeholder {
  font-weight: normal;
  color: var(--faas-form-text);
  opacity: 1;
}

.faas-form select {
  appearance: none;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii01OCAyOSAzMiAzNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAtNTggMjkgMzIgMzQiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0tNTYgNDMgNi0xMiA2IDEyaC0xMnpNLTQ0IDQ5bC02IDEyLTYtMTJoMTJ6IiBmaWxsPSIjNTM1MzUzIi8+PC9zdmc+') no-repeat 128% 54%;
  background-color: inherit;
  background-position: 100% 50%;
  background-size: 1em 1em;
  height: 58px;
  color: var(--text-color);
}

.faas-form .error input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.faas-form .error select {
  border: 1px solid var(--faas-form-error);
}

.faas-form .error input:not([type=checkbox]):not([type=radio]):not([type=submit]) {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHBhdGggZD0iTTguNTY0IDEuMjg5LjIgMTYuMjU2QS41LjUgMCAwIDAgLjYzNiAxN2gxNi43MjhhLjUuNSAwIDAgMCAuNS0uNS40OTQuNDk0IDAgMCAwLS4wNjQtLjI0NEw5LjQzNiAxLjI4OWEuNS41IDAgMCAwLS44NzIgMFpNMTAgMTQuNzVhLjI1LjI1IDAgMCAxLS4yNS4yNWgtMS41YS4yNS4yNSAwIDAgMS0uMjUtLjI1di0xLjVhLjI1LjI1IDAgMCAxIC4yNS0uMjVoMS41YS4yNS4yNSAwIDAgMSAuMjUuMjVabTAtM2EuMjUuMjUgMCAwIDEtLjI1LjI1aC0xLjVhLjI1LjI1IDAgMCAxLS4yNS0uMjV2LTZhLjI1LjI1IDAgMCAxIC4yNS0uMjVoMS41YS4yNS4yNSAwIDAgMSAuMjUuMjVaIiBmaWxsPSIjZDczNzNmIi8+PC9zdmc+');
  background-position: 96%;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 2rem;
}

.faas-form .error select {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHBhdGggZD0iTTguNTY0IDEuMjg5LjIgMTYuMjU2QS41LjUgMCAwIDAgLjYzNiAxN2gxNi43MjhhLjUuNSAwIDAgMCAuNS0uNS40OTQuNDk0IDAgMCAwLS4wNjQtLjI0NEw5LjQzNiAxLjI4OWEuNS41IDAgMCAwLS44NzIgMFpNMTAgMTQuNzVhLjI1LjI1IDAgMCAxLS4yNS4yNWgtMS41YS4yNS4yNSAwIDAgMS0uMjUtLjI1di0xLjVhLjI1LjI1IDAgMCAxIC4yNS0uMjVoMS41YS4yNS4yNSAwIDAgMSAuMjUuMjVabTAtM2EuMjUuMjUgMCAwIDEtLjI1LjI1aC0xLjVhLjI1LjI1IDAgMCAxLS4yNS0uMjV2LTZhLjI1LjI1IDAgMCAxIC4yNS0uMjVoMS41YS4yNS4yNSAwIDAgMSAuMjUuMjVaIiBmaWxsPSIjZDczNzNmIi8+PC9zdmc+'),url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii01OCAyOSAzMiAzNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAtNTggMjkgMzIgMzQiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0tNTYgNDMgNi0xMiA2IDEyaC0xMnpNLTQ0IDQ5bC02IDEyLTYtMTJoMTJ6IiBmaWxsPSIjNTM1MzUzIi8+PC9zdmc+');
  background-position: calc(100% - 20px),100% 50%;
  background-repeat: no-repeat;
  background-size: 18px,1em 1em;
  padding-right: 2.5rem;
}

.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):active,.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):focus,.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):focus-visible,
.faas-form select:active,.faas-form select:focus,.faas-form select:focus-visible,
.faas-form textarea:active, .faas-form textarea:focus,.faas-form textarea:focus-visible {
  outline: 2px solid var(--faas-form-focus);
  outline-offset: 2px;
}

.faas-form .row.error {
  color: var(--faas-form-error);
}

.faas.column2 .faas-form select + div,
.faas.column2 .faas-form textarea + div,
.faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]) + div {
  width: 100%;
  font-size: 16px;
}

.faas-form .legal {
  border-top: 1px solid #b9b9b9;
  margin-top: 24px;
  font-size: 16px;
}

.faas-form .errorSummary {
  font-size: 16px;
  display: none !important;
}

.faas-form .legalnotice {
  font-style: italic;
}

.faas-form .legalnotice a {
  color: var(--link-color);
}

/* dark theme */
.faas.dark {
  color: var(--color-white);
  background-color: #262626;
}

.faas.dark select,
.faas.dark textarea,
.faas.dark input:not([type=submit]) {
  background-color: var(--color-white);
}

/* column2 theme */
.faas.column2 {
  padding: 48px 33px;
}

.faas.column2 .faas-form {
  display: flex;
  flex-wrap: wrap;
}

.faas.column2 .faas-form .row:not(.submit) {
  box-sizing: border-box;
  width: 50%;
  padding: 12px 15px 20px;
  position: relative;
}

.faas.column2 input[type="checkbox"] + label {
  min-width: 90%;
  width: 90%;
}

.faas.column2 .faas-form select + div,
.faas.column2 .faas-form textarea + div,
.faas.column2 .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]) + div {
  position: absolute;
  bottom: 0;
}

.faas.column2 .faas-form label {
  margin-bottom: 8px;
}

.faas.column2 .faas-form label,
.faas.column2 .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.faas.column2 .faas-form select,
.faas.column2 .faas-form textarea {
  min-width: 100%;
}

.faas.column2 .faas-form .row.legal {
  width: 100%;
}

.faas.column2 .errorMessage {
  font-size: 16px;
  background: var(--color-white);
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  box-shadow: 0 0 12px rgb(0 0 0 / 25%);
  display: none!important;
  margin-top: 2px;
  max-width: 15em;
  padding: 0.2em 0.4em;
  position: absolute;
  top: -14px;
  width: 100%;
  z-index: 2;
}

.faas.column2 .errorMessage::before,
.faas.column2 .errorMessage::after {
  border-bottom: 6px solid transparent;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  content: "";
  left: 10px;
  position: absolute;
  z-index: 2;
}

.faas.column2 .errorMessage::before {
  border-bottom-color: #e0e0e0;
  top: -6px;
}

.faas.column2 .errorMessage::after {
  border-bottom-color: var(--color-white);
  top: -5px;
}

.faas.column2 .row.error input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]):focus + div .errorMessage,
.faas.column2 .row.error select:focus + div .errorMessage,
.faas.column2 .row.error textarea:focus + div .errorMessage {
  display: block !important;
}

/* next */
.faas.next {
  padding: 48px;
}

.faas.next .faas-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
}

.faas.next .faas-form .row {
  width: 50%;
  position: relative;
}

.faas.next .faas-form .row.submit {
  justify-content: flex-start;
  position: relative;
}

.faas.next .faas-form .row.submit input {
  margin: 20px 0 0 20px;
  border: 0;
  border-radius: 0;
  padding-right: 30px;
  background: none;
  position: relative;
  z-index: 1;
  transition: color 125ms ease-out;
  color: inherit;
}

.faas.next .faas-form .row.submit input + div {
  position: relative;
  top: 18px;
  left: -20px;
}

.faas.next .faas-form .row.submit input + div::after {
  content: '';
  display: inline-block;
  border: solid;
  border-color: #333;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(-45deg);
  transition: border-color 125ms ease-out;
}

.faas.next.dark .faas-form .row.submit input + div::after {
  border-color: #fff;
}

.faas.next .faas-form label {
  margin-bottom: 8px;
  min-width: 100%;
}

.faas.next .faas-form .row.submit input:is(:hover, :focus),
.faas.next .faas-form .row.submit input:is(:hover, :focus) + div::after {
  color: var(--link-color);
  border-color: var(--link-color);
}

.faas.next .faas-form input[type=email] {
  max-width: 231px;
  min-width: 100%;
  padding: 0.5rem 2rem 0.5rem 1rem;
  line-height: 1.375;
}

.faas.next .faas-form input[type=email] + div {
  position: absolute;
  bottom: -10px;
}

/* for bottom checkbox */
.faas.column2 .faas-form .row:not(.submit).FaaS-35 {
  width: 100%;
}

/* for modal */
.dialog-modal .faas {
  font-size: 13px;
  max-width: 100%;
  min-width: 200px;
}

.dialog-modal .faas .faas-form-wrapper {
  max-width: 650px;
  margin: 0 auto;
}

.dialog-modal .faas .faas-form .row:not(.submit):not(.checkbox) {
  padding-bottom: .5rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.dialog-modal .faas-form label {
  font-size: .875em;
}

.dialog-modal .faas-form select {
  height: 2.5rem;
  font-size: 1.125em;
  padding: 0 1em;
}

.dialog-modal .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]) {
  font-size: 1.125em;
  padding: 0.622rem 2em 0.622rem 1em;
  line-height: 1.375em;
}

.dialog-modal .faas-form-confirm-overlay {
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: #FBFBFB;
  opacity: 0.5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in-to-opaque .5s ease-in;
}

.dialog-modal .faas-form-confirm-overlay .icon-milo.checkmark-green {
  height: 44px;
  animation: pulse 2s ease;
}

/* for mobile */
@media (max-width:799.99px) {
  .faas-form label,
  .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
  .faas-form select,
  .faas-form textarea {
    width: 100%;
    min-width: initial;
  }

  .faas-form .row > label {
    margin-bottom: 10px;
  }

  .faas.column2 {
    padding: 48px;
  }

  .faas.column2 .faas-form .row:not(.submit) {
    width: 100%;
    padding: 12px 0;
  }

  .faas.column2 .faas-form select + div,
  .faas.column2 .faas-form textarea + div,
  .faas.column2 .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]) + div {
    position: static;
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  .section.one-up-tablet .faas-form label,
  .section.one-up-tablet .faas-form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
  .section.one-up-tablet .faas-form select,
  .section.one-up-tablet .faas-form textarea {
    width: 50%;
  }

  .section.one-up-tablet .faas-form .row > label {
    margin-bottom: 8px;
  }

  .section.one-up-tablet .faas.column2 {
    padding: 48px 33px;
  }

  .section.one-up-tablet .faas.column2 .faas-form .row:not(.submit) {
    width: 50%;
    padding: 12px 15px 20px;
  }

  .section.one-up-tablet .faas.column2 .faas-form .row.legal,
  .section.one-up-tablet .faas.column2 .faas-form .row:not(.submit).FaaS-35 {
    width: 100%;
  }
}


@keyframes pulse {
  0% {
    transform: scale(0.7);
  }

  50% {
    transform: scale(1);
  }

  100% {
    transform: scale(0.7);
  }
}

@keyframes fade-in-to-opaque {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 0.5;
  }
}
