:root {
    --text-color: #1a1b1f;
    --btn-color: #3f52c6;
    --btn-alter-color: #3077be;
    --btn-submit-color: #fff;
    --btn-submit-text-color: #4559ce;
    --default-color: #2136aa;
    --fg: #a3aff6;
    --bg: #2136aa;
    --value: 60;
}

/* General Classes */
.flex {
    display: flex;
}
.j-c-c {
    justify-content: center;
}
.j-c-s {
    justify-content: start;
}
.a-i-c {
    align-items: center;
}
.a-i-s {
    align-items: start;
}
.f-d-c {
    flex-direction: column;
}
.f-w-w {
    flex-wrap: wrap;
}
.hide {
    display: none;
}
.hide-desktop {
    display: none;
}
.fd-c {
    flex-direction: column;
}
.fd-r {
    flex-direction: row;
}
.jc-b {
    justify-content: space-between;
}

/* Keyframes */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes load {
    0% {
        content: 'Calculating';
    }
    33% {
        content: 'Calculating.';
    }
    67% {
        content: 'Calculating..';
    }
    100% {
        content: 'Calculating...';
    }
}
.sleep-calculator-link {
    text-decoration: none;
}

/*
  Questions View 
  */
.sleep-calculator {
    background: linear-gradient(180deg, #ebeffa 0%, #dfe5f2 100%), #dfe5f2;
    padding: 24px 40px 50px;
    min-height: 497px;
    border-radius: 22px;
}
.sc-view {
    width: 100%;
    flex-direction: row;
    gap: 60px;
}
.sc-title {
    margin: 0 0 20px;
    gap: 16px;
    height: 87px;
}
.sc-title-img {
    margin-right: 7px;
    width: 50px;
}
.sc-title-top {
    color: var(--text-color);
    margin: 0;
    font-size: 52px;
    font-weight: 700;
    line-height: 60px; /* 115.385% */
    letter-spacing: -1.04px;
}
.sc-sub-title {
    margin: 0 0 20px;
    color: var(--text-color);
    width: 100%;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    line-height: 26px; /* 118.182% */
}
.sc-age-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 8px;
    grid-row-gap: 8px;
}
.btn-active {
    background-color: var(--btn-alter-color) !important;
    color: #fff !important;
}
.sc-age-btn {
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    color: #444850;
    background-color: #fff;
    border-radius: 8px;
    width: 92px;
    border: unset;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    font-size: 14px;
    line-height: 22px;
}
.sc-age-btn b {
    font-size: 16px;
    line-height: 26px;
}
.sc-age-btn:hover,
.sc-sleep-btn:hover {
    color: #3077be;

    outline: 1px solid #3077be;
    outline-offset: -1px;
}
.sc-sleep {
    flex-direction: column;
    gap: 8px;
}
.sc-sleep-img.moon {
    height: 28px;
    width: 28px;
}
.sc-sleep-img.sun {
    height: 32px;
    width: 32px;
}
.sc-sleep-btn {
    padding: 0 16px 0 24px;
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #444850;
    background-color: #fff;
    border: unset;
    border-radius: 10px;
    width: 100%;
    height: 79px;
}

.sc-sleep-btn img {
    filter: brightness(0) saturate(100%) invert(29%) sepia(11%) saturate(427%) hue-rotate(182deg) brightness(90%) contrast(93%);
}
.sc-sleep-btn.btn-active img {
    filter: unset;
}
.hide-mobile {
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
}

.sc-time {
    gap: 5px;
    margin: 32px 0;
}
.sc-time select {
    border: none;
    outline: 0px;
    border-radius: 10px;
    display: flex;
    width: 120px;
    padding: 12px 8px 12px 16px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,%3Csvg xmlns%3D%22http%3A//www.w3.org/2000/svg%22 width%3D%2232%22 height%3D%2232%22 viewBox%3D%220 0 32 32%22 fill%3D%22none%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M8.3978 12.9826C8.95971 12.3739 9.9087 12.3359 10.5174 12.8978L16 17.9586L21.4826 12.8978C22.0913 12.3359 23.0403 12.3739 23.6022 12.9826C24.1641 13.5913 24.1262 14.5403 23.5174 15.1022L17.0174 21.1022C16.4428 21.6326 15.5572 21.6326 14.9826 21.1022L8.48259 15.1022C7.87386 14.5403 7.8359 13.5913 8.3978 12.9826Z%22 fill%3D%22%231A1B1F%22/%3E%3C/svg%3E');
    background-color: white;
    border: 1px solid #a5d4f6;
    color: #1a1b1f;
    font-size: 18px;
    line-height: 28px;
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: 5px;
}

.sc-btn {
    display: flex;
    height: 54px;
    padding: 14px 60px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 27px;
    background: #2f4571;
    color: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    width: fit-content;
    margin: 0 auto;
    outline: none;
    border: unset;
}
.sc-btn:hover {
    background-color: #172a50;
}
.sc-go-back-btn {
    border: unset;
    background: transparent;
    color: #2f4571;
    font-size: 16px;
    font-weight: 700;
    line-height: 18px;
    gap: 4px;
}

.sc-go-back-btn:hover {
    color: #172a50;
    outline: unset;
    cursor: pointer;
}

.sc-go-back-btn:hover svg path {
    fill: #172a50;
}

.sc-btn-radio {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    background-color: #dfe5f2; /* Default inactive state */
    border-radius: 50%;
    margin-right: 10px; /* Adds space between the circle and text */
    transition: background-color 0.3s ease; /* Smooth color transition */
}
.inner-circle {
    width: 8px;
    height: 8px;
    background-color: #2f4571;
    border-radius: 50%;
    display: none;
}
.sc-sleep-btn.btn-active .sc-btn-radio .inner-circle,
.sc-sleep-btn.btn-active:focus .sc-btn-radio .inner-circle,
.sc-sleep-btn.btn-active:active .sc-btn-radio .inner-circle {
    display: flex;
}

@media screen and (max-width: 767px) {
    .sc-age-grid {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
        grid-column-gap: 8px;
        grid-row-gap: 8px;
    }
    .hide-mobile {
        display: none;
    }
    .hide-desktop {
        display: block;
        font-size: 12px;
        line-height: 14px;
    }
    .sleep-calculator {
        padding: 25px 12px;
    }
    .sc-view {
        flex-direction: column;
        gap: 0;
    }
    .sc-title {
        margin: 0;
        font-size: 26px;
        line-height: 28px;
        gap: 7px;
        height: unset;
    }
    .sc-sub-title {
        font-size: 16px;
        line-height: 18px;
        margin: 24px 0 12px;
    }
    .sc-age {
        width: 100%;
    }
    .sc-title-img {
        width: 32px;
    }
    .sc-title-top {
        font-size: 32px;
        line-height: 48px;
        margin: 0;
    }
    .sc-age-btn {
        width: unset;
        height: unset;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 14px;
    }
    .sc-age-btn b {
        font-size: 14px;
        line-height: 16px;
    }

    .sc-age-title {
        font-size: 18px;
    }
    .sc-sleep {
        width: 100%;
        flex-direction: row;
    }
    .sc-sleep-btn {
        font-size: 18px;
        padding: 16px 12px;
        width: 50%;
        line-height: 27px;
        height: 52px;
    }
    .sc-sleep-img.sun,
    .sc-sleep-img.moon {
        height: 20px;
        width: 20px;
    }
    .sc-right {
        width: 100%;
    }
    .sc-time {
        margin: 24px 0;
        width: 100%;
    }
    .sc-time select {
        font-size: 16px;
        line-height: 26px;
        width: calc((100% / 3));
    }
    .sc-button {
        padding: 14px 40px;
    }
}

/*
  Results View 
  */
.sc-results {
    flex-direction: column;
}
.scr-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 26px;
    margin: 0 0 8px;
}
.scr-content {
    font-size: 16px;
    text-align: center;
    font-weight: 400;
    line-height: 26px;
    margin: 0;
    color: #444850;
}
#age-set {
    text-transform: lowercase;
}
.scr-boxes {
    gap: 40px;
    margin: 40px 0;
    width: 100%;
}
.scr-boxes[data-wake-sleep='wake up'] .scr-box .scr-time-text.wake {
    display: none;
}
.scr-boxes[data-wake-sleep='go to bed'] .scr-box .scr-time-text.sleep {
    display: none;
}

.scr-boxes[data-wake-sleep='wake up'] .scr-box-bed-time img {
    filter: brightness(0) saturate(100%) invert(83%) sepia(55%) saturate(590%) hue-rotate(174deg) brightness(98%) contrast(98%);
}
.scr-boxes[data-wake-sleep='go to bed'] .scr-box-wake-time img {
    filter: brightness(0) saturate(100%) invert(83%) sepia(55%) saturate(590%) hue-rotate(174deg) brightness(98%) contrast(98%);
}
.scr-boxes[data-wake-sleep='wake up'] .scr-box-bed-time .scr-time-text,
.scr-boxes[data-wake-sleep='wake up'] .scr-box-bed-time .scr-time {
    color: #a5d4f6;
}
.scr-boxes[data-wake-sleep='wake up'] .scr-box-wake-time .scr-time-text,
.scr-boxes[data-wake-sleep='wake up'] .scr-box-wake-time .scr-time {
    color: #48fcc9;
}
.scr-boxes[data-wake-sleep='wake up'] .scr-box-wake-time {
}

.scr-box {
    background-color: #2f4571;
    border-radius: 12px;
    flex-direction: column;
    overflow: hidden;
    width: 50%;
}
.total-time b::before {
    content: attr(data-before);
    padding-right: 4px;
    font-weight: bold;
}
.scr-time {
    margin: 0;
    color: #48fcc9;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    line-height: 34px;
    display: flex;
    align-items: baseline;
}
.scr-time span {
    font-size: 18px;
    line-height: 20px;
    margin-left: 4px;
}
.scr-time-text {
    margin: 0;
    color: #48fcc9;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
}
.scr-box-wake-time .scr-time,
.scr-box-wake-time .scr-time .ampm,
.scr-box-wake-time .scr-time-text {
    color: #a5d4f6;
}
.img-text {
    flex-direction: column;
}
.scr-box-data {
    padding: 20px 32px;
    flex-direction: row;
}
.separators {
    color: #fff;
    font-size: 10px;
}
.total-time {
    color: #dfe5f2;
    text-align: center;
    font-size: 12px;
    line-height: 14px;
    background-color: #3077be;
    height: 28px;
    width: 100%;
}
/*
  Loading View 
  */
.loader-wheel {
    animation: spin 1s infinite linear;
    border: 2px solid rgba(30, 30, 30, 0.5);
    border-left: 4px solid #fff;
    border-radius: 50%;
    height: 50px;
    width: 50px;
    min-width: 50px;
}

.loader-text {
    color: var(--text-color);
    margin-top: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    line-height: 26px;
}

.loader-text:after {
    content: 'Calculating';
    animation: load 2s linear infinite;
}

@media screen and (max-width: 767px) {
    .scr-content {
        font-size: 14px;
        line-height: 22px;
    }
    .scr-title {
        font-size: 16px;
        line-height: 18px;
        margin: 24px 0 4px;
    }
    .scr-time {
        text-align: left;
    }
    .scr-time span {
    }
    .scr-time-text {
        font-size: 12px;
        text-align: left;
    }
    .scr-boxes {
        gap: 12px;
    }
    .scr-box {
    }
    .scr-box-data {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
        justify-content: flex-start;
        width: 100%;
    }
    .scr-box-data > div {
        width: 100%;
        align-items: flex-start !important;
    }
    .scr-time-text.mbl br {
        display: none;
    }
    .scr-img {
        width: 16px;
    }
    .img-text {
        flex-direction: row;
        gap: 8px;
    }
    .total-time {
        height: unset;
        padding: 8px 0;
    }

    .progressbar-value b {
        display: block;
        padding-bottom: 2px;
    }

    .separators {
        display: none;
    }
}
