/* Checkbox components */
.checkbox-primary {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-content: center;
    justify-content: center;
    padding: 0.15rem;
    border: 2px solid var(--Brand-600);
    border-radius: 0.5rem;
}

.checkbox-primary:focus {
    box-shadow: 0px 0px 0px 4px var(--Brand-100);
}

.checkbox-primary:hover {
      background: var(--Brand-50);
}

.checkbox-primary::before {
    content: "";
    width: clamp(0.75rem, 0.75rem + 1.5vw, 2rem);
    height: clamp(0.75rem, 0.75rem + 1.5vw, 2rem);
    clip-path: polygon(14% 40%, 0 55%, 35% 90%, 100% 20%, 85% 5%, 35% 60%);
    transform: scale(0);
    background-color: var(--Brand-600);
}

.checkbox-primary:checked::before {
    transform: scale(1);
}

.checkboxv2-primary {
    appearance: none;
    -webkit-appearance: none;
    width: 1.625rem;
    height: 1.625rem;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    background-image: url("../images/checkboxes/unchecked.svg");
    background-repeat: no-repeat;
    background-size: cover;
}

.checkboxv2-primary:focus {
    background-image: url("../images/checkboxes/unchecked-focus.svg");
}

.checkboxv2-primary:hover {
    background-image: url("../images/checkboxes/unchecked-hover.svg");
}

.checkboxv2-primary:disabled {
    background-image: url("../images/checkboxes/unchecked-disabled.svg");
}

.checkboxv2-primary:checked {
    background-image: url("../images/checkboxes/checked.svg");
}

.checkboxv2-primary:checked:focus {
    background-image: url("../images/checkboxes/checked-focus.svg");
}

.checkboxv2-primary:checked:hover {
    background-image: url("../images/checkboxes/checked-hover.svg");
}

.checkboxv2-primary-disabled, .checkboxv2-primary:checked:disabled {
    background-image: url("../images/checkboxes/checked-disabled.svg") !important;
}

/* Button components */
.button-primary,
.button-secondary,
.button-warning,
.button-error,
.button-cancel,
.button-borderless,
.button-text,
.button-neutral {
    font: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.button-primary {
    border: 1px solid var(--Brand-500);
    background: var(--Brand-500);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Brand);
    border-radius: 0.5rem;
}

.button-primary:hover {
    background: var(--Brand-600);
}

.button-primary:focus {
    box-shadow: 0px 1px 2px 0px var(--Shadow-Brand-focused), 0px 0px 0px 4px var(--Brand-100);
}

.button-primary:disabled {
    color: var(--Grey-600);
    border: 1px solid var(--Grey-100);
    background: var(--Grey-100);
    box-shadow: 0 1px 2px 0 var(--Shadow-Grey);
}

.button-secondary {
    border: 1px solid var(--Brand-200);
    background: var(--Grey-0);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Brand);
    color: var(--Brand-600);
    border-radius: 0.5rem;
}

.button-secondary:hover {
    background: var(--Brand-50);
    color: var(--Brand-800);
}

.button-secondary:focus {
    color: var(--Brand-700);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Brand-focused), 0px 0px 0px 4px var(--Brand-100);
}

.button-secondary:disabled {
    color: var(--Grey-600);
    border: 1px solid var(--Grey-100);
    background: var(--Grey-100);
    box-shadow: 0 1px 2px 0 var(--Shadow-Grey);
    cursor: not-allowed;
}

.button-secondary-icon {
    align-self: center;
    background: var(--Brand-600);
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
}

.button-secondary:hover .button-secondary-icon {
    background: var(--Brand-800);
}

.button-secondary:focus .button-secondary-icon {
    background: var(--Brand-700);
}

.button-warning {
    border: 1px solid var(--Error-300);
    background: var(--Grey-0);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Error);
    color: var(--Error-600);
    border-radius: 0.5rem;
}

.button-warning:hover {
    color: var(--Error-800);
    background: var(--Error-50);
}

.button-warning:focus {
    color: var(--Error-700);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Error-focused), 0px 0px 0px 4px var(--Error-100);
}

.button-error {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--Error-500);
    background: var(--Error-500);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Error);
    color: var(--Grey-0);
    border-radius: 0.5rem;
}

.button-error:hover {
    border: 1px solid var(--Error-600);
    background: var(--Error-600);
}

.button-error:focus {
    border: 1px solid var(--Error-500);
    background: var(--Error-500);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Error-focused), 0px 0px 0px 4px var(--Error-100);
}

.button-cancel {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--Grey-400);
    background: var(--Grey-0);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Grey);
    color: var(--Grey-950);
    border-radius: 0.5rem;
}

.button-cancel:hover {
    background: var(--Grey-50);
}

.button-cancel:focus {
    box-shadow: 0px 1px 2px 0px var(--Shadow-Grey-focused), 0px 0px 0px 4px var(--Grey-100);
}

.button-borderless {
    padding: 0.625rem 1.25rem;
    background: var(--Grey-0);
    color: var(--Grey-950);
    border: 0;
}

.button-borderless:hover {
    color: var(--Grey-900);
}

.button-borderless:focus {
    color: var(--Grey-800);
}

.button-text {
    border: 0;
    width: fit-content;
    padding: 0;
    font-weight: 600;
}

.button-text-icon {
    margin-top: 2px;
    align-self: center;
}

.button-neutral {
    font-weight: 600;
    line-height: 1.5rem;
    font-size: 1rem;
    border-radius: 1.25rem;
    box-shadow: 0 1px 2px 0 var(--Shadow-Grey);
    border: 1px solid var(--Grey-500);
    background: var(--Grey-0);
    color: var(--Grey-950);
    padding: 0.625rem 1.25rem;
}

.button-neutral:hover {
    background: var(--Grey-50);
}

.button-neutral:focus {
    box-shadow: 0 1px 2px 0 var(--Shadow-Grey-focused), 0 0 0 4px var(--Grey-100);
}

.button-neutral:disabled {
    color: var(--Grey-400);
    border: 1px solid var(--Grey-200);
    box-shadow: var(--Shadow-Grey);
    cursor: not-allowed;
}

.button-neutral-icon {
    align-self: center;
    background: var(--Grey-0);
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
}

/* Text components */
.text-primary-content,
.text-title {
    color: var(--Grey-950);
    font-weight: 400;
}

.text-primary-content {
    font: inherit;
    font-size: 1.3rem;
    font-style: normal;
}

.text-title {
    font-size: 1.875rem;
    line-height: 2.375rem;
}

.text-label,
.text-accent,
.text-accent-bold {
    line-height: 1.25rem;
    font-size: 0.875rem;
}

.text-label {
    font-weight: 600;
}

.text-accent,
.text-accent-bold {
    color: var(--Brand-600);
}

.text-accent {
    font-weight: 400;
}

.text-accent-bold {
    font-weight: 600;
}

/* Input components */
.input-box {
    display: flex;
    align-items: center;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--Brand-500);
    background: var(--Grey-0);
    box-shadow: 0px 1px 2px 0px var(--Shadow-Brand);
}

.input-box[aria-disabled="true"] {
    border-color: var(--Grey-400) !important;
}

.input-box-invalid {
    border-color: var(--Error-500);
    box-shadow: 0 1px 2px 0 var(--Shadow-Error);
}

.input-divider {
    width: 0.0625rem;
    height: 2.75rem;
    background: var(--Brand-500);
}

.input-divider-disabled {
    background: var(--Grey-400) !important;
}

.input-divider-invalid {
    background: var(--Error-500);
}