.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1000;
    visibility: hidden;
    transition-duration: 150ms;
}

.overlay--active {
    background-color: var(--overlay);
    visibility: visible;
    backdrop-filter: blur(3px);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 25%);
    background-color: var(--mainComponentColor);
    width: 500px;
    height: 650px;
    min-height: 650px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    transition-duration: 300ms;
    color: var(--mainTextColor);
    border: 1px solid var(--borderColor);
}

.welcome {
    padding: 50px;
}

.modal--with-subpages {
    display: none;
    flex-direction: row;
    padding: 0;
}

.modal--active {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.modal__content {
    padding: 25px;
}

.modal__header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-column-gap: 5px;
    justify-items: center;
    border-bottom: 1px solid var(--componentBorder);
    border-radius: 10px 10px 0 0;
    padding: 15px 25px;
}

.modal__header .title {
    display: flex;
    align-items: center;
    grid-column-start: 2;
    font-size: 20px;
    color: var(--mainTextColor);
}

.modal__header .close-button {
    border: none;
    cursor: pointer;
    background-color: var(--grayComponent);
    border-radius: 50%;
    padding: 5px;
    color: var(--mainColor);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 20px;
    margin-left: auto;
    height: 34px;
    width: 34px;
}

.modal__header .close-button img {
    height: 18px;
    width: 18px;
}

.modal-subpage {
    height: 100%;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    padding: 50px;
    position: absolute;
    top: 0;
    transition-duration: 300ms;
    left: 100%;
    background-color: var(--mainComponentColor);
    border-radius: 10px;
    overflow: hidden;
    min-width: 100%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.modal-subpage--active {
    visibility: visible;
    transform: translateX(0);
    left: 0;
}

.welcome--active {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.welcome__header h1 {
    color: var(--mainTextColor);
    font-size: 35px;
    font-weight: 400;
    line-height: 48px;
}

.welcome__header h1.main-color {
    color: var(--mainColor);
}

.welcome__header h5 {
    margin-top: 5px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    color: var(--mainColor);
}

.welcome__header p {
    color: var(--mainTextColor);
    margin-top: 15px;
    font-size: 16px;
    line-height: 22px;
}

.welcome__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.welcome-point {
    color: var(--mainTextColor);
    display: flex;
    margin-bottom: 20px;
}

.welcome-point:last-child {
    margin-bottom: 0;
}

.welcome-point__icon {
    margin-right: 25px;
}

.welcome-point__icon img {
    width: 32px;
}

.welcome-point__title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 5px;
}

.welcome-point__description {
    font-size: 14px;
}

.welcome__footer {
    display: flex;
    justify-content: end;
}

.welcome__button {
    background-color: var(--mainColor);
    color: var(--mainComponentColor);
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: 0;
}

.welcome__button--second {
    color: var(--mainColor);
    background-color: transparent;
    padding: 10px 0;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: 0;
}

.initial-location-content {
    padding: 25px 0;
    align-items: flex-start;
    justify-content: flex-start;
}

.day-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    scrollbar-width: none;
    background-color: var(--secondColor);
    position: relative;
}

.day-picker:before {
    content: '';
    position: absolute;
    width: 25px;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to right, var(--secondColor), transparent);
}

.day-picker:after {
    content: '';
    position: absolute;
    width: 25px;
    height: 100%;
    top: 0;
    right: 0;
    background: linear-gradient(to left, var(--secondColor), transparent);
}

.day-picker__scroll {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: auto;
    scrollbar-width: none;
    padding: 25px;
    width: 100%;
    cursor: grab;
}

.day-picker-item {
    margin-right: 15px;
}

.day-picker-item:last-child {
    margin-right: 0;
}

.day-picker-item--active .day-picker-item__day {
    background-color: var(--mainColor);
    color: var(--mainComponentColor);
}

.day-picker-item__day {
    border-radius: 50%;
    background-color: var(--mainComponentColor);
    font-weight: 500;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.day-picker-item__weekday {
    font-size: 13px;
    color: var(--secondTextColor);
    margin-top: 5px;
    text-align: center;
}

.total-precipitation {
    margin-bottom: 25px;
}

.total-precipitation__value {
    font-weight: 500;
    font-size: 25px;
    margin-bottom: 5px;
}

.chart-type-switch {
    display: flex;
    justify-content: flex-end;
}

.modal__chart {
    margin-top: 25px;
    min-height: 300px;
}

.modal__chart canvas {
    width: 100%;
    height: 100%;
}

.modal__content--astronomy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}