/* Setup default input field */
.input-field {
    position: relative;
    margin-top: .5rem;
    width: 280px;
    border: 1px solid var(--white-70);
    border-radius: var(--rounded-s);
    display: flex;
    align-items: center;
    justify-content: start;
}

.input-field > .input-icon {
    position: relative;
    font-size: 18px;
    padding: 8px;
    margin-right: 8px;
    border-right: 1px solid var(--white-90);
}

.input-field > input {
    position: relative;
    outline: unset;
    border: none;
    font-size: 16px;
    line-height: 18px;
    margin-right: 4px;
    color: var(--text-secondary);
}

/* Setup input field states */
.input-field > input:active .input-field {
    border: 3px solid var(--primary);
}

/* Setup input field validation states */
/* Validation information */
.input-field-info {
    background-color: var(--info-90);
    border: 3px solid var(--info);
}
.input-info { background-color: var(--info-90);}

/* Validation success */
.input-field-success {
    background-color: var(--success-90);
    border: 3px solid var(--success);
}
.input-success { background-color: var(--success-90);}

/* Validation warning */
.input-field-warning {
    background-color: var(--warning-90);
    border: 3px solid var(--warning);
}
.input-warning { background-color: var(--warning-90);}

/* Validation error */
.input-field-error {
    background-color: var(--error-90);
    border: 3px solid var(--error);
}
.input-error { background-color: var(--error-90);}

/* Setup input validation states */
.validation-info { color: var(--info);}
.validation-success { color: var(--success);}
.validation-warning { color: var(--warning);}
.validation-error { color: var(--error);}

/* ----------------------------- */
/* ------- Password input ------ */
/* ----------------------------- */
.password-input-box > .password-input-field > .show-password-button {
    position: relative;
    height: 2rem;
    width: 2rem;
    margin-right: .25rem;
    font-size: 18px;
    background-color: transparent;
}

.show-password-button:hover {
    cursor: pointer;
    transition: var(--transition-duration);
    background-color: var(--white-90) !important;
}

/* ----------------------------- */
/* --------- Searchbar --------- */
/* ----------------------------- */
.searchbar-box {
    position: relative;
    margin-top: .5rem;
    width: 280px;
    border: 1px solid var(--white-70);
    border-radius: var(--rounded-s);
    display: flex;
    align-items: center;
    justify-content: start;
}

.searchbar-box .searchbar {
    position: relative;
    width: calc(100% - 20px) !important;
    outline: unset;
    border: none;
    padding: 6px;
    margin-left: 8px;
    font-size: 16px;
    line-height: 18px;
    margin-right: 4px;
    color: var(--text-secondary);
}

.searchbar-box .search-button {
    position: relative;
    font-size: 18px;
    padding: 8px 12px;
    margin-left: 4px;
    background-color: transparent;
}

.search-button:hover {
    cursor: pointer;
    transition: var(--transition-duration);
    background-color: var(--white-90);
}

/* ----------------------------- */
/* ---------- Slider ----------- */
/* ----------------------------- */
.slider-box {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: .5rem;
  max-width: 500px;
  height: 4rem;
  width: 280px;
  padding: 0px 10px;
}

.simple-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  border-radius: 16px;
}

.simple-slider::-webkit-slider-runnable-track {
  height: 15px;
  background: var(--white-90);
  border-radius: 16px;
}

.simple-slider::-moz-range-track {
  height: 15px;
  background: var(--white-90);
  border-radius: 16px;
}

.simple-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 15px;
  width: 15px;
  background-color: #fff;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: -407px 0 0 400px var(--primary);
}

.simple-slider::-moz-range-thumb {
  height: 15px;
  width: 15px;
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid var(--primary);
  box-shadow: -407px 0 0 400px var(--primary);
}

/* ----------------------------- */
/* ------- Code/PIN input ------ */
/* ----------------------------- */
.digit-box {
    position: relative;
    width: calc(4 * 15% + 4 * 0.5rem);
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.digit-box > .digit-field-group {
    position: relative;
    width: auto;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.digit-field-group > .digit-field {
    position: relative;
    min-width: 4rem;
    width: 15%;
    max-width: 8rem;
    height: 2.5rem;
    border: 1px solid var(--white-70);
    border-radius: var(--rounded-m);
    text-align: center;
    outline-color: var(--primary-70);
    color: var(--text-secondary);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.input-box > #submit-digits-button {
    position: relative;
    width: calc(4 * 15% + 4 * 0.5rem) !important;
    height: 2.5rem;
    margin-bottom: 2rem;
}

#submit-digits-button > .button-icon { color: var(--text-button);}

/* ----------------------------- */
/* --------- Checkboxes -------- */
/* ----------------------------- */
/* Setup default checkbox */
.checkbox-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0.3rem;
}

.checkbox-box > .checkbox {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    padding: 4px 0;
    margin-left: .2rem;
    background-color: #fff;
    display: grid;
    place-content: center;
    font: inherit;
    width: 16px;
    height: 16px;
    border: 1px solid var(--white-60);
    border-radius: 0.15em;
    transform: translateY(-0.075em);
}

.checkbox-box > .checkbox::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--text-button);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.checkbox-box > .checkbox:checked {
    border: 1px solid var(--white-80);
    background-color: var(--primary);
}

.checkbox-box > .checkbox:checked::before {
    transform: scale(1);
}

/* Setup accent checkbox */
.checkbox-box > .checkbox-accent:checked {
    background-color: var(--accent);
}

/* Setup information checkbox */
.checkbox-box > .checkbox-info:checked {
    background-color: var(--info);
}

/* Setup success checkbox */
.checkbox-box > .checkbox-success:checked {
    background-color: var(--success);
}

/* Setup warning checkbox */
.checkbox-box > .checkbox-warning:checked {
    background-color: var(--warning);
}

/* Setup error checkbox */
.checkbox-box > .checkbox-error:checked {
    background-color: var(--error);
}

/* Setup checkbox label */
.checkbox-box > .checkbox-label {
    position: relative;
    top: -.05rem;
    padding: 4px 0;
    margin-right: .5rem;
    font-size: 16px;
}

/* ----------------------------- */
/* -------- Radio buttons ------ */
/* ----------------------------- */
/* Setup default radio button */
.radio-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0.3rem;
}

.radio-box > .radio-button {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    padding: 4px 0;
    margin-left: .2rem;
    background-color: #fff;
    display: grid;
    place-content: center;
    font: inherit;
    width: 16px;
    height: 16px;
    border: 1px solid var(--white-60);
    border-radius: 2rem;
    transform: translateY(-0.075em);
}

.radio-box > .radio-button::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    transform: scale(0);
    border-radius: 2rem;
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--primary);
}

.radio-box > .radio-button:checked {
    border: 1px solid var(--white-80);
    background-color: var(--text-button);
}

.radio-box > .radio-button:checked::before {
    transform: scale(1);
}

/* Primary radio button */
.radio-box > .radio-button::before { box-shadow: inset 1em 1em var(--primary);}

/* Accent radio button */
.radio-box > .radio-button-accent::before { box-shadow: inset 1em 1em var(--accent);}

/* Information radio button */
.radio-box > .radio-button-info::before { box-shadow: inset 1em 1em var(--info);}

/* Success radio button */
.radio-box > .radio-button-success::before { box-shadow: inset 1em 1em var(--success);}

/* Warning radio button */
.radio-box > .radio-button-warning::before { box-shadow: inset 1em 1em var(--warning);}

/* Accent radio button */
.radio-box > .radio-button-error::before { box-shadow: inset 1em 1em var(--error);}

/* ----------------------------- */
/* -------- Radio buttons ------ */
/* ----------------------------- */
.select-box {
	display: flex;
	position: relative;
	gap: 2px;
	padding: 8px 32px;
	background-color: var(--background);
	cursor: pointer;
	border: 1px solid var(--white-70);
	border-radius: var(--rounded-s);
	align-items: center;
	justify-content: start;
}

.hidden-select {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
}

.hidden-select:hover {
	cursor: pointer;
}

.hidden-select option {
	font-size: 16px;
	line-height: 32px;
	padding: 12px 0;
}
