:root {
	--color-black: #000000;
    --color-black-detail: rgba(0, 0, 0, 0.8);
}

input:not([type=checkbox], [type=submit]),
select, 
textarea {
    padding: 0;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
}

input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}

.form-wrapper {
    max-width: 800px;
    margin: var(--pagination-spacer-y) auto 0;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.checkbox-wrapper,
.input-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;

    margin: 1rem 0;
}

.input-wrapper .input-field {
    display: block;
    min-height: 3rem;
    height: 100%;
    width: 100%;
    padding: 1rem 0 1px;
    border: none;
    border-bottom: 1px solid var(--color-black-detail);
    
    color: var(--color-black-detail);
    font-family: inherit;
    font-size: inherit;
}
.input-wrapper .input-field:focus-within{
    border-bottom: 2px solid var(--color-black);
    padding-bottom: 0;
}
.input-wrapper textarea.input-field {
    /* min-height: none;
    height: auto; */
}
.input-wrapper textarea.input-field {
    min-height: 3rem;
    height: auto;
    min-width: 100%;
    max-width: 100%;
}

.input-wrapper label {
    font-weight: 500;
    line-height: 1;
}

.icon-carat {
    position: relative;
}
.icon-carat > select {
    padding-right: 24px;
}
.icon-carat:after {
    content: "";
    position: absolute;
    bottom: 18px;
    right: 20px;
    width: 17px;
    height: 9px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDE3IDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOC42MTI4IDguNDEwNTVDOC44OTY4MiA4LjM4NTg2IDkuMTY2MjggOC4yNzU0NyA5LjM4MDM5IDguMDkzOTFMMTYuMDAxOCAyLjYwMDU5QzE2LjU4IDIuMTQ3NDIgMTYuNjY3NCAxLjMyNTMxIDE2LjE5ODQgMC43NjQ2NDRDMTUuNzI5NCAwLjIwNjg4OCAxNC44ODE3IDAuMTIxMTkxIDE0LjMwMzUgMC41NzQzNjhDMTQuMjgwMiAwLjU5MzI1IDE0LjI1NjggMC42MTM1ODUgMTQuMjMzNSAwLjYzMzkyTDguNDk2MjggNS4zODUwMkwyLjc2MzM4IDAuNjA3Nzc1QzIuMjIwMSAwLjExNjgzNCAxLjM2ODAzIDAuMTQ1ODgzIDAuODYxMTU4IDAuNjczMTM3QzAuMzU0Mjg3IDEuMTk4OTQgMC4zODQ4NzQgMi4wMjU0MSAwLjkyODE1OSAyLjUxNDg5QzAuOTUwMDA3IDIuNTM2NjggMC45NzMzMTEgMi41NTU1NiAwLjk5NjYxNiAyLjU3Mjk5TDcuNjEyMTcgOC4wOTM5MUM3Ljg4ODkxIDguMzI2MzEgOC4yNDg2NyA4LjQ0MTA2IDguNjEyOCA4LjQxMDU1WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==")
}
.icon-carat:focus-within:after {
    transform: rotate(180deg);
}

.checkbox-wrapper label {
    display: flex;
}
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 21px;
  min-width: 21px;
  height: 21px;
  margin: 0;
  margin-right: 1rem;
  border: 1px solid var(--color-text);
  background-color: var(--color-bg);
  border-radius: 2px;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

/* Tick */
.custom-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 6px;
  height: 11px;
  border: solid black;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.submit-wrapper {
    position: relative;
    margin: 2rem auto 0;
}
.submit-wrapper button {
    appearance: none;
    border: none;
    background-color: var(--color-black);
    color: var(--color-white);

    font-family: inherit;
    line-height: 1;
    font-size: var(--fsize-normal);
    padding: 1rem 2rem;
    border-radius: 32px;

    transition: all 0.3s linear;
}
.submit-wrapper button:hover {
    cursor: pointer;
    scale: 1.05;
}
.submit-wrapper button:disabled {
    cursor: not-allowed;
    opacity: .75;
}
.submit-wrapper .spinner {
    display: none;

    position: absolute;
    right: -1rem;
    top: 50%;
    translate: 100% -50%;

    height: 24px;
    width: 24px;

    border-radius: 50%;
    border: 3px solid var(--color-black-detail);
    border-bottom: 3px solid transparent;
    background-color: transparent;
    animation-name: spin;
    animation-duration: 1000ms;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.submit-wrapper .spinner.loading {
    display: block;
}

.message-wrapper {
    display: none;
    position: relative;

    margin: 2rem auto 0;
    padding: 1rem 2rem;
    text-align: center;
    width: 100%;

    border-radius: 12px;
    border: 1px solid;
    color: #000;
    font-size: 16px;
    line-height: 1;
}

.message-wrapper.success {
    --color-status: var(--color-success);
}
.message-wrapper.error {
    --color-status: var(--color-error);
}
.message-wrapper.warning {
    --color-status: var(--color-warning);
}
.message-wrapper.success,
.message-wrapper.error,
.message-wrapper.warning {
    display: block;
    
    border-color: rgb(var(--color-status));
    background-color: rgba(var(--color-status), 0.3);
}
.message-icon__wrapper {
    position: absolute;
    top: .25rem;
    right: .25rem;
    height: 21px;
    width: 21px;
}
.message-icon__wrapper:hover {
    cursor: pointer;
}

.form-wrapper a {
    text-decoration: underline;
}

@media (min-width: 576px) {
    .checkbox-wrapper,
    .input-wrapper {
        padding: 0 1.25rem;
    }
    .input-wrapper.halved {
        width: 50%;
    }
}

@keyframes spin {
	from    { transform: rotate(0deg) }
	to      { transform: rotate(360deg) }
}