@import url("../components/modal.css");
@import url("../components/tabs.css");

.profile_nav {
    position: sticky;
    top: calc(var(--nav_height) + 15px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bc {
    background-color: var(--secondary_background);
}

.profile_btn {
    padding: 15px 24px 15px 15px;
    min-width: 220px;
    max-width: 100%;
    font-weight: var(--main_bold_weight);
    border-radius: var(--radius);
    font-size: 17px;
    height: 55px;
    border: 2px solid transparent;
}

.profile_btn:hover {
    background-color: var(--secondary_background);
}

.profile_btn.active {
    color: var(--blue3);
    background-color: var(--lightblue);
    border-color: var(--blue_border);
}

.profile_section:not(.active) {
    display: none;
}

.character {
    border-radius: var(--radius);
    text-align: center;
}

.character img {
    height: 200px;
}

.character:hover {
    background-color: var(--secondary_background);
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 22px;
}


.statistics .stat {
    padding: 16px;
    border-radius: var(--radius);
    border: var(--border);
}

.statistics .stat:hover + .stat_toast {
    display: flex;
}

.statistics .stat_toast {
    top: calc(100% + 10px);
    left: -50%;
    width: 500px;
}

.statistics .streak_toast {
    left: 0;
}

.dis .xp {
    color: var(--secondary);
}

.choose_char_display h4 {
    font-size: 24px;
}

.subject_study_section:first-child {
    margin-top: 0;
}

.content_item {
    display: flex;
    max-width: calc(50% - 12px);
}


.content_item:focus,
.content_item:hover {
    box-shadow: var(--box-shadow);
}

.content_item .row {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.content_item h4 {
    font-family: var(--main_font);
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.subject_study_section .sub_img {
    width: 40px;
    height: 40px;
}

.subject_study_section h3 {
    font-size: 22px;
}

h1 {
    margin: 5px 0;
}

.progress {
    position: relative;
    background-color: var(--lightgray);
    border-radius: 50vh;
    height: 10px;
    margin-top: 10px;
    padding: 0 !important;
    overflow: hidden;
    min-width: 120px;
    max-width: 120px;
}

.progress span {
    display: inline-block;
    background-color: var(--progress);
    height: 10px;
    position: absolute;
    width: 0;
}

#character .modal-content {
    max-width: 900px;
}

.error {
    margin-top: 5px;
    display: none;
    color: var(--red);
    font-size: 14px;
}

.group {
    display: flex;
    justify-content: space-between;
}

.group div {
    width: calc(50% - 5px);
}

#cities_list,
#schools_list {
    position: absolute;
    z-index: 2;
    top: calc(100% + 10px);
    width: 100%;
    border: var(--border);
    background-color: var(--white);
    overflow: hidden;
    border-radius: var(--radius);
}

#cities_list div,
#schools_list div {
    cursor: pointer;
    width: 100%;
    padding: 10px 15px;
}

#cities_list div:hover,
#schools_list div:hover {
    background-color: var(--secondary_background);
}  

.modal form {
    display: flex;
    flex-direction: column;
}

.modal textarea {
    resize: vertical;
}

.modal label {
    color: var(--lighter_main);
    font-weight: var(--main_bold_weight);
    display: block;
    margin: 24px 0 6px 10px;
}

.modal input,
.modal select {
    width: 100%;
}

#reset_password {
    display: none;
}

.mail_alert {
    border-color: var(--red) !important;
}

.parent_invite {
    border-color: var(--green) !important;
}

/* CLASSES */
.class_row,
.task_row {
    font-weight: var(--main_bolder_weight);
    display: block;
    padding: 15px 24px;
    margin-left: -24px;
    margin-right: -24px;
    border-bottom: var(--border);
}

.class_row:hover,
.task_row:hover {
    background-color: var(--secondary_background);
}

.class_row:first-of-type,
.task_row:first-of-type {
    border-top: var(--border);
}

/* TASKS */

#tasks {
    overflow-x: auto;
}

.big_table td,
.big_table th {
    padding: 12px;
}

.mr-7 {
    margin-right: 7px;
}

@media (min-width: 768px) {
    .big_table td,
    .big_table th {
        padding: 24px 15px;
    }
}

.pb0 {
    overflow: hidden;
    padding-bottom: 0;
}


/* CHOOSE */

.all_chars_menu,
.all_chars .current_char {
    display: none;
}

.all_chars .all_chars_menu {
    display: block;
}

.choose_char_display {
    padding: 0 15px 15px;
    margin-bottom: 15px;
    border-radius: var(--radius);
}

.choose_char_display.disabled h4 {
    color: var(--secondary);
}

.choose_char_display:hover {
    background-color: var(--secondary_background);
}

.choose_char_display .desc {
    width: 100%;
    max-width: 440px;
}

.choose_char_display img {
    max-width: 280px;
    width: 100%;
}

img.char_sap_img {
    width: 20px;
}


/* MY CHARACTER */

.styles,
.levels {
    padding: 15px;
    background-color: var(--secondary_background);
    margin: 0 -15px;
    width: calc(100% + 30px);
}

.styles h3,
.levels h3 {
    padding-left: 9px;
    margin-bottom: 5px;
}

.levels {
    margin-top: 15px;
}

.levels .list,
.styles .list {
    margin: 0 -15px;
    width: calc(100% + 30px);
    overflow-x: auto;
    padding: 0 15px;
}

.styles div,
.levels div {
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius);
}

.styles div:hover,
.levels div:hover {
    background-color: #fff;
}

.styles div.disabled img,
.levels div.disabled img,
.choose_char_display.disabled img.display {
    opacity: 0.5;
}

.styles img,
.levels img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.locked img {
    width: 47px;
    height: 47px;
}

.locked {
    margin-left: 5px;
    background-color: var(--lightgray);
    pointer-events: none;
    opacity: 0.5;
}

.current_display {
    padding-bottom: 24px;
    margin: auto;
    width: 100%;
}

.current_display h4 {
    font-family: var(--header_font);
    font-size: 30px;
    margin-top: 24px;
}

.current_display h4+p {
    color: var(--secondary);
    font-size: 17px;
    margin: 12px 0 16px 0;
}

.current_display_img_wrapper {
    margin: auto;
    position: relative;
    width: 100%;
    max-width: 280px;
    min-width: 280px;
}

.current_display_img {
    width: 100%;
}

.current_display .progress {
    flex-grow: 1;
    background-color: var(--gray);
    margin: 10px 15px 0 0;
    text-align: left;
}

.current_display .progress span {
    background-color: var(--green);
}

.btn .dis .coin {
    color: var(--lightgray_2) !important;
}

#perfectAnimWrapper {
    display: none;
    position: absolute;
    pointer-events: none;
    width: 300%;
    left: -100%;
    height: 300%;
    top: -100%;
}

.plus {
    padding: 8px 12px;
    border-radius: 8px;
    color: #fff;
    background-image: var(--plus_grad);
    font-size: 14px;
}

/* CHART */

.primary {
    color: var(--accent);
    font-weight: var(--main_bolder_weight);
}

.secondary_graph {
    margin-top: 10px;
    color: var(--lightgray_2);
    font-weight: var(--main_bolder_weight);
}

#myChart {
    max-width: 100%;
    max-height: 350px;
}

/* badges */

.badge {
    border: var(--border);
    padding: 15px;
    border-radius: var(--radius);
    border-bottom-width: 4px;
    cursor: pointer;
}

.badge_img_wrapper {
    min-width: 25%;
    max-width: 25%;
    margin-right: 24px;
    height: auto;
}

.badge_img_wrapper img {
    width: 100%;
    height: auto;
}

.badge .sec {
    margin-top: 10px;
    font-size: 14px;
}

.badge:not(.unlocked) img {
    opacity: 0.4;
}

.badge_img_wrapper {
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.badge.bronze.unlocked {
    border-color: var(--bronze);
}

.badge.silver.unlocked {
    border-color: #95A7B7;
}

.badge.gold.unlocked {
    border-color: var(--yellow);
}

.badge.cups.unlocked {
    border-color: var(--progress);
}

/* .badge.unlocked:hover img {
    mask-image: linear-gradient(45deg, #000 25%,rgba(0,0,0,.2) 50%,#000 75%);
    mask-position: 120%;
} */


.badge_img_wrapper:hover::before {
    content: '';
    top: 0;
    transform: translateX(-100%);
    width: 70%;
    height: 220px;
    position: absolute;
    z-index: 1;
    animation: slide 6s ease infinite;
    rotate: 45deg;
    opacity: 0.8;
    background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(128, 186, 232, 0) 99%, rgba(125, 185, 232, 0) 100%);
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(128, 186, 232, 0) 99%, rgba(125, 185, 232, 0) 100%);
}

@keyframes slide {
    0% {
        transform: translateX(-200%);
    }
    25% {
        transform: translateX(100%);
    }
    99.9% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-200%);
    }
}

#description {
    font-size: 17px;
}

.city {
    gap: 8px;
}

.error_count {
    background-color: var(--red);
    color: #fff;
    border-radius: var(--radius);
    padding: 5px 12px;
    font-size: 20px;
    margin-left: 10px;
    font-weight: var(--main_bolder_weight);
}


.change_layout_popup {
    position: absolute;
    display: none;
    z-index: 100;
    overflow: hidden;
    top: calc(100% + 10px);
    background-color: var(--white);
    border-radius: var(--radius);
    border: var(--border);
}

.change_layout.active .change_layout_popup {
    display: block;
}

.layout_changer {
    padding: 15px 24px;
}

.layout_changer:hover {
    background-color: var(--secondary_background);
}

.hidden_sections,
div[data-move="show"],
.subject_study_section:first-of-type .layout_changer[data-move="up"],
.subject_study_section:last-of-type .layout_changer[data-move="down"],
.hidden_sections .layout_changer:not([data-move="show"]),
.hidden_subjects .change_layout_train {
    display: none;
}

.hidden_sections_wrap.opened .hidden_sections,
.hidden_sections_wrap.opened div[data-move="show"] {
    display: block;
}

.hidden_sections_wrap {
    padding: 0;
}

.hidden_sections_wrap_header,
.hidden_sections {
    padding: 24px;
}

/* DAILY QUESTS */

.quest_row:not(:last-child) {
    border-bottom: var(--border);
}

.quests {
    max-width: 550px;
    padding: 0;
}

.quest_row {
    flex-grow: 1;
    padding: 24px;
}

.quest_row h3 {
    font-size: 19px;
}

.quest_progress {
    width: 100%;
    position: relative;
    background-color: var(--gray);
    border-radius: 50vh;
    height: 25px;
    padding: 0 !important;
    overflow: hidden;
}

.quest_progress .value {
    z-index: 2;
}

.quest_row.half .value {
    color: var(--white);
}

.quest_progress .filler {
    display: inline-block;
    background-color: var(--progress);
    height: inherit;
    position: absolute;
    width: 0;
    left: 0;
    z-index: 1;
}


@media (min-width: 500px) {
    .badge {
        min-width: calc(50% - 12px);
        max-width: calc(50% - 12px);
    }
    .styles,
    .levels {
        border-radius: var(--radius);
    }
}

@media (min-width: 768px) {
    .styles {
        margin: 0;
        min-width: 160px;
        max-width: 160px;
    }

    .styles .list {
        flex-direction: column;
    }

    .styles h3 {
        text-align: center;
        padding: 0;
    }
    #profile_row {
        margin-top: 48px;
    }
    #info {
        margin-top: 24px;
    }
    .character {
        padding: 10px;
    }
    .character img {
        height: 300px;
    }
}

@media (min-width: 992px) {
    .sections .profile_section {
        margin-top: 0;
    }

    .badge {
        min-width: calc(33% - 18px);
        max-width: calc(33% - 18px);
    }

    .badge .title {
        font-size: 21px;
    }
}

@media (max-width: 992px) {
    .mail_alert,
    .parent_invite {
        border-top-color: var(--lightgray) !important;
    }

    .change_layout_popup {
        right: 0;
    }
}

@media (max-width: 970px) {
    .content_item {
        padding: 15px !important;
    }
    .content_item h4 {
        font-size: 16px;
    }
    .progress {
        min-width: 0;
    }
    .header_progress span {
        font-size: 15px;
        white-space: nowrap;
    }
    .header_progress img {
        height: 22px !important;
    }
    .profile_btn {
        font-size: 16px;
        padding-right: 0;
        min-width: 200px;
    }
    #profile_row {
        padding: 0 15px;
    }
}

@media (max-width: 860px) {
    .study_trainings .content_item {
        max-width: 100%;
    }
}

@media (max-width: 580px) {
    .profile {
        padding-left: 15px;
        padding-right: 15px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
    }
    .hidden_sections {
        padding: 24px 0;
    } 
}

@media (max-width: 510px) {
    .content_item {
        max-width: 100%;
    }
}

/* @media (max-width: ) */

.plus_adv {
    font-size: 18px;
}

.adv_text {
    max-width: 700px;
}

.old_price {
    text-decoration: line-through;
}