:root {
    --primary-light: #8abdff;
    --primary: #6d5dfc;
    --primary-dark: #5b0eeb;
    --white: #222222;
    --greyLight-1: #111111;
    --greyLight-2: #000000;
    --greyDark: #ffffff;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
    overflow-y: scroll;
    background: var(--greyLight-1);
}

@media screen and (min-width: 900px) {
    html {
        font-size: 75%;
    }
}

.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", sans-serif;
    background: var(--greyLight-1);
}

.components {
    width: 95rem;
    border-radius: 3rem;
    box-shadow: 0.8rem 0.8rem 1.4rem var(--greyLight-2), -0.2rem -0.2rem 1.8rem var(--white);
    padding: 4rem;
    display: grid;
    align-items: center;

    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div1 {
    grid-area: 1 / 1 / 2 / 2;
}

.div2 {
    grid-area: 2 / 1 / 3 / 2;
}

.div3 {
    grid-area: 3 / 1 / 4 / 2;
}

.div4 {
    grid-area: 4 / 1 / 5 / 2;
}

.div5 {
    grid-area: 5 / 1 / 6 / 2;
}

/*  BUTTONS  */
button {
    border: none;
}

.btn {
    width: 100%;
    /* Make the button take up 100% width of the parent container */
    height: 4rem;
    border-radius: 1rem;
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s ease;
    margin: 0 auto;
    /* Ensure it's centered */
}

.form__input,
.btn {
    max-width: 30rem;
    /* Add a max width for both inputs and buttons */
    margin: 0 auto;
    /* Center them within the parent */
}

a.btn {
    text-align: center;
    /* Center the text inside the <a> */
}

.btn__primary {
    grid-row: 2;
    background: var(--primary);
    box-shadow: inset 0.2rem 0.2rem 1rem var(--primary-light), inset -0.2rem -0.2rem 1rem var(--primary-dark), 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    color: white
}

.btn__primary:hover {
    color: white;
}

.btn__primary:active {
    box-shadow: inset 0.2rem 0.2rem 1rem var(--primary-dark), inset -0.2rem -0.2rem 1rem var(--primary-light);
}

.btn__secondary {
    grid-row: 3;
    color: #888;
}

.btn__secondary:hover {
    color: white;
}

.btn__secondary:active {
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
}

.btn p {
    font-size: 1.6rem;
}

a {
    text-decoration: none;
}

/*  CHIP  */
.chip {
    grid-row: 0;
    justify-self: center;
    width: 17rem;
    height: 4rem;
    border-radius: 1rem;
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;

    transition: opacity 0.3s ease-in-out;
    /* Fade in and out */
}

/* Fade in when the chip is visible */
.chip.show {
    opacity: 1;
    pointer-events: auto;
}

/* Chip icon and close button */
.chip__icon,
.chip__close {
    font-size: 1.6rem;
    cursor: pointer;
}

/* Add keyframe animations for fade-out effect */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.chip__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    margin: 0 0 0 0.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary);
}

.chip p {
    font-size: 0.9rem;
    margin-left: -1.8rem;
    color: var(--greyDark);
}

.chip__close {
    width: 1.6rem;
    height: 1.6rem;
    margin: 0 0.5rem;
    display: flex;
    font-size: 1.6rem;
    color: var(--greyLight-3);
    cursor: pointer;
}

/*  FORM  */
.form {
    grid-row: 1;
    justify-self: center;
    align-items: center;
    justify-content: center;
}

.form__input {
    height: 4rem;
    border: none;
    border-radius: 1rem;
    font-size: 1.4rem;
    padding-left: 1.4rem;
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
    background: none;
    font-family: inherit;
    color: var(--greyDark);
    padding-right: 1.4rem;
}

.form__input::-moz-placeholder {
    color: var(--greyLight-3);
}

.form__input:-ms-input-placeholder {
    color: var(--greyLight-3);
}

.form__input::placeholder {
    color: var(--greyLight-3);
}

.form__input:focus {
    outline: none;
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
}

/*  ICONS  */
.icon {
    grid-row: 4/5;
    display: flex;
    justify-content: space-between;
}

.icon__account,
.icon__home,
.icon__settings {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    color: var(--greyDark);
    transition: all 0.5s ease;
}

.icon__account:active,
.icon__home:active,
.icon__settings:active {
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
    color: var(--primary);
}

.icon__account:hover,
.icon__home:hover,
.icon__settings:hover {
    color: var(--primary);
}

/*  CHECKBOX  */
.checkbox div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Default color for unchecked state */
.checkbox__text {
    color: #888 !important;
}

/* Make sure this rule targets the text when the checkbox is checked */
.checkbox input[type="checkbox"]:checked+p.checkbox__text {
    color: white !important;
}

.checkbox div p {
    margin: 0;
    line-height: 1;
}

.checkbox {
    grid-row: 1/2;
    display: grid;
    justify-content: left;
    grid-gap: 1rem;
}

.checkbox input {
    display: none;
}

.checkbox p {
    color: #888;
    display: inline;
    font-weight: bold;
}

.checkbox__1,
.checkbox__2,
.checkbox__3,
.checkbox__4 {
    /* width: 6rem; */
    display: flex;
    justify-content: center;
}

.checkbox__1 label,
.checkbox__2 label,
.checkbox__3 label,
.checkbox__4 label {
    color: #888;
    /* Set the color to #888 for unchecked state */
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    width: 2.8rem;
    height: 2.8rem;
}

.checkbox__1 label i,
.checkbox__2 label i,
.checkbox__3 label i,
.checkbox__4 label i {
    font-size: 1.8rem;
    font-weight: 700;
    color: #888888;
    transition: 0.3s ease;
}

.checkbox__1 input:checked~label,
.checkbox__2 input:checked~label,
.checkbox__3 input:checked~label,
.checkbox__4 input:checked~label {
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
}

.checkbox__1 input:checked~label,
.checkbox__2 input:checked~label,
.checkbox__3 input:checked~label,
.checkbox__4 input:checked~label {
    color: white;
    /* Change the color to white for checked state */
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
}

/*  SEGMENTED-CONTROL */
.segmented-control {
    grid-column: 3/4;
    grid-row: 1/2;
    width: 20.4rem;
    height: 4rem;
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.segmented-control input {
    display: none;
}

.segmented-control>input:checked+label {
    transition: all 0.5s ease;
    color: white;
}

.segmented-control__1,
.segmented-control__2,
.segmented-control__3 {
    width: 6.8rem;
    height: 3.6rem;
    font-size: 1.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #888888;
    transition: all 0.5s ease;
}

.segmented-control__1:hover,
.segmented-control__2:hover,
.segmented-control__3:hover {
    color: var(--primary);
}

.segmented-control__color {
    position: absolute;
    height: 3.4rem;
    width: 6.2rem;
    margin-left: 0.3rem;
    border-radius: 0.8rem;
    box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
    pointer-events: none;
}

#tab-1:checked~.segmented-control__color {
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#tab-2:checked~.segmented-control__color {
    transform: translateX(6.8rem);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#tab-3:checked~.segmented-control__color {
    transform: translateX(13.6rem);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}