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

:root {
    --clr-header-bg: #94BD5F;
    --clr-text-dark: #314B30;
    --clr-border-dark: #055303;
    --clr-text-light: #87A187;
    --clr-text-bright: #ffffff;
    --clr-list-title-bg: #23530F;
    --clr-category-title-bg: #427C29;
    --clr-item-bg: #F3FFE4;
    --clr-body-bg: #cbdfb4;
    --clr-category-menu: #A9F846;
    --clr-add-new-item: #2d9401;
    --clr-menu-bg-intense: #92dd73;
    --clr-menu-bg-brignt: rgb(211, 255, 154);
    --clr-pop-up-wrapper-bg: rgba(174,174,174,0.65);
}

html,
body{
    background: var(--clr-body-bg);
    color: var(--clr-text-dark);
}

html {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

.nav svg,
.initial svg {
    width:24px;
    height:24px;
    fill: var(--clr-text-dark);
    transition: all 150ms ease-in-out;
}

button,
a {
    cursor: pointer;
}

:focus {
    outline: none;
}

@media(min-width: 1024px) {
    html,
    body{
        height: 100%;
        width: 100%;
    }
}
/*header*/

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 11;
}

header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clr-header-bg);
    padding: 0.9rem 7%;
}

h1 {
    font-size: 1.5rem;
    color: var(--clr-text-dark);
}

.nav{
    display: flex;
    align-items: center;
}

.nav-btn {
    background: transparent;
    border: none;
    height: 24px;
    width: 24px;
    padding: 0;
    margin-left: 2rem;
}

.nav-btn svg:hover {
    fill: #556854;
}

.lang-wrapper {
    position: relative;
    min-width: 80px;
    max-width: 86px;
}

.lang {
    display: flex;
    border: 1px solid var(--clr-border-dark);
    background: none;
    color: var(--clr-text-dark);
    width: 100%;
    padding: 2px 5px;
    align-items: center;
    justify-content: space-between;
}

.lang div {
    text-align: left;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 4px;
}

.lang:hover {
    color: #556854; 
    border: 1px solid #556854;
}

.lang:hover .lang-svg {
    fill: #556854;
}

nav .lang-svg {
    height: 12px;
    width: 12px;
    transform: rotate(180deg);
}

.lang-options {
    position: absolute;
    width: 100%;
    background-color: var(--clr-item-bg);
    display: none;
}

.lang-options a {
    display: block;
    padding: 0.4rem 0 0.4rem 0.75rem;
    text-decoration: none;
    color: var(--clr-text-dark);
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-options a:hover {
    color: #556854;
}

/* main*/

.main {
    position: relative;
    top: 3.5rem;
    height: calc(100% - 3.5rem);
}

/* nav dropdown */
.nav-dropdown-fixed,
.edit-dropdown-fixed {
    position: fixed;
    height: calc(100vh - 3.5rem);
    width: 100%;
    z-index: 10;
    display: none;
}

.nav-dropdown-menu {
    position: relative;
    top: 0;
    height: calc(100vh - 3.5rem);
    background: var(--clr-pop-up-wrapper-bg);
}

.menu-container {
    width: 80%;
    max-width: 300px;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    max-height: calc(100vh - 3.5rem);
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 200ms ease-in-out;
}

.menu-nav-wrapper {
    background: var(--clr-item-bg);
    margin-top: 51px;
    width: 100%;
    height: calc(100% - 51px);
}

.menu-nav {
    max-height: calc(100% - 78.39px); /* minus item form height and position */
    overflow: scroll;
}

.menu-content {
    background: var(--clr-item-bg);
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    height: fit-content;
    padding: 0;
    list-style: none;
}

/* .menu-content div, */
.menu-content li {
    position: relative;
}

.menu-nav-list:last-child {
    margin-bottom: 1rem;
}

.dropdown-menu div.spacer {
    padding: 1rem;
    font-size: 1rem;
    position: fixed;
    width: 100%;
    max-width: 300px;
    background-color: var(--clr-list-title-bg);
    z-index: 50;
    color: var(--clr-text-bright);
}

.menu-nav-list::after {
    content: "";
    position: absolute;
    right: 1rem;
    left: 1rem;
    bottom: -1px;
    height: 1px;
    background: currentColor;
    z-index: 12;
}

.menu-nav-list {
    background-color: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.9rem 2rem;
    font-weight: 500;
    z-index: 13;
    cursor: pointer;
}

.menu-nav-list:focus {
    outline: none;
}

.menu-nav-list:not(.active-list):hover,
.menu-nav-list:focus,
.menu-nav-list::selection {
    color: var(--clr-text-bright);
    background-color: var(--clr-category-title-bg);
}

.active-list {
    padding-left: 3.5rem;
    font-weight: 700;
    color: var(--clr-list-title-bg);
    cursor: unset;
}

.active-list::before {
    content: '>';
    font-size: 1.3rem;
    position: absolute;
    height: 0.5rem;
    width: 0.5rem;
    left: 1.5rem;
    top: 0.75rem;
    color: currentColor;
}

.new-list-dropdown-form {
    position: relative;
    top: 1rem;
    padding-bottom: 1rem;
}

@media (min-width: 1024px) {
    .nav-dropdown-menu {
        display: none;
    }
}

/* edit drop down */

@media (max-width: 768px) {
    .pencil-btn {
        display: none;
    }
    .edit-drop-menu {
        display: none;
    }
}
.edit-dropdown-menu {
    position: relative;
    top: 0;
    height: 100%;
    background: var(--clr-pop-up-wrapper-bg);
}

.edit-dropdown-menu div.spacer {
    background-color: var(--clr-border-dark);
}

.menu-edit {
    position: absolute;
    right: 0;
    top: 2rem;
    background-color: var(--clr-border-dark);
    color: var(--clr-category-menu);
    overflow: scroll;
    height: calc(100% - 2rem);
}

.menu-edit-btn {
    color: var(--clr-category-menu);
    width: 80%;
    background-color: transparent;
    border: 2px solid currentColor;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    font-size: 1rem;
    padding: 0.9rem 1rem;
}

/* main content wrapper (initial UI) */

.main-content-wrapper {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;   
}

.initial {
    padding-top: 10vh;
    padding-bottom: 10vh;
    display: none;
    position: relative;
}

.initial h3 {
    text-align: center;
}

.dash-box {
    margin: 2rem auto;
    width: 75%;
    max-width: 400px;
    padding: 2rem;
    display: grid;
    place-items: center;
    border: 2px dashed var(--clr-text-dark);
    cursor: pointer;
    position: relative;
    z-index: 7;
}

/* current list*/

.list-wrapper {
    position: absolute;
    top: 0;
    width: 100%;
}

.current-list-wrapper {
    height: 100%;
    width: 100%;
    padding: 0 7%;
}

.current-list {
    max-width: 500px;
    margin: 0 auto 46px;
    position: relative;
    top: 0;
    padding-bottom: 56px;
}

.current-list h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-right: 1.5rem;
}

.list-title {
    position: fixed;
    z-index: 8;
    width: 86%;
    max-width: 500px;
    padding: 1rem 1.5rem ;
    background: var(--clr-list-title-bg);
    color: var(--clr-text-bright);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-title span {
    font-size: 1.3rem;
}

span[data-tasks-left],
span[data-spanish-left] {
    font-size: 0.8rem;
}

.list-content {
    position: relative;
}

.my-lists {
    display: none;
}

@media(max-width: 359px) {
    .list-title {
        flex-direction: column;
        align-items: start;
        padding: 0.7rem 1.5rem;
    }
    .list-title > span {
        margin-top: 5px;
    }
}

@media (min-width: 1024px) {
    .menu-btn {
        display: none;
    }

    .main-grid {
        display: grid;
        place-items: center;
    }

    .list-wrapper {   
        position: relative;
        top: 7vh;
        height: calc(93vh - 6.4rem);
        overflow: hidden;
    }

    .list-grid {
        display: grid;
        grid: ". lists gap current ." auto /
              1fr minmax(200px, 300px) 0.5fr minmax(200px, 600px) 1fr;
    }

    .max-width {
        max-width: 350px;
        padding-left: 1.25rem;
    }

    .my-lists {
        display: block;
        grid-area: lists;
        margin-top: 10vh;
        max-height: 70vh;
        padding-left: 1.5rem;
    }

    .my-lists-title {
        font-size: 1.35rem;
        font-weight: 700;
        padding-bottom: 0.5rem;
        position: fixed;
        z-index: 3;
        min-width: 250px;
        max-width: 300px;
        background-color: var(--clr-body-bg);
    }

    .my-lists-content {
        position: relative;
        top: 2.5rem;
        list-style: none;
        padding-left: 3rem;
        padding-right: 0.5rem;
        margin-right: 2.5rem;
        max-height: calc(70vh - 150px);
        overflow-x: visible;
        overflow-y: scroll;
    }

    .new-list-creator::before {
        content: '';
        position: absolute;
        top: 0;
        left: 2.5rem;
        right: 1.5rem;
        height: 1px;
        background-color: var(--clr-border-dark);
        margin-top: 1rem;
    }

    .new-list-creator {
        position: relative;
        top: 2.5rem;
        transform: translateX(-2rem);        
        z-index: 3;
        padding-top: 1.5rem;
    }

    .current-list-wrapper {
        grid-area: current;
        height: 100%;
        overflow: scroll;
        margin-left: -7%;        
    }

    .new-list-creater form {
        width: 90%;
    }

    .desktop-menu-list {
        padding: 0.3rem 0;
        cursor: pointer;
    }

    .desktop-menu-list:not(.desktop-active-list):hover {
        color: var(--clr-list-title-bg);
        font-weight: 700;
    }

    .desktop-active-list{
        font-weight: 700;
        padding-left: 1rem;
        color: var(--clr-list-title-bg);
        cursor: unset;
    }

    .desktop-active-list::before { 
        content: '>';
        position: absolute;
        transform: translateX(-1.5rem);
        color: currentColor;
    }
}

/* list-content */
/* categories */
.category-title {
    padding: 0.7rem 1.5rem;
    background: var(--clr-category-title-bg);
    color: var(--clr-text-bright);  
    border-bottom: 2px solid var(--clr-border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title label {
    font-size: 1.25rem;
    font-weight: 500;  
    cursor: pointer;
}

.category {
    position: relative;   
    background: var(--clr-item-bg);
    padding-bottom: 1px;
}

.category:not(:first-child) {
    margin-top: -1px;
}

[type="radio"] {
    opacity: 0;
    position: absolute;
}

[type="radio"]:checked + label {
    color: var(--clr-category-menu);
}

.menu-category {
    fill: var(--clr-category-menu);
    cursor: pointer;
}


.selected-category {
    margin-left: -4vw;
    margin-right: -4vw;
    background-color: var(--clr-item-bg);
    margin-bottom: 1px;
}

.uncategorized-only {
    margin: 0;
}

@media(min-width: 1024px) {
    .selected-category{
        margin-left: -1.3vw;
        margin-right: -1.3vw;
    }
    .menu-category:hover {
        fill: var(--clr-text-bright);
    }
}

.uncategorized-only {
    margin: 0;
}

.selected-category .category-title {
    background-color: #2C8407;
}

.list-content ul {
    list-style: none;
    margin-left: -2.5rem;   
}

/* itmes */  /* items are tasks  */
li.item {
    font-size: 1.25rem;
    font-weight: 400;
    padding: 0.7rem 1.5rem;
    position: relative;
    z-index: 6;
    overflow-x: scroll;
}

li.item:last-child {
    margin-bottom: 1rem;
}

form {
    display: flex;
}

.item label {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    z-index: 7;
    white-space: nowrap;
}

li.item::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    left: 1.5rem;
    bottom: 0;
    height: 1px;
    background: currentColor;
}

.new-item-creator form {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.new-btn {
    background: transparent;
    border: none;
    height: calc(24px + 1.4rem);
    width: 24px;
    margin-left: 1.2rem;
    padding: 0;
}

.plus-new {
    width: 24px;
    height: 24px;
    fill: var(--clr-add-new-item);
    transform: translateY(-0.2rem);
}

input.add-new {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    padding: 0.4rem 0 0.7rem 1rem;
    outline: none;
    order: 2;
    border-bottom: 2px solid var(--clr-border-dark);
    transition: 150ms ease-in-out;
    width: calc(100% - 4.2rem);
    color: var(--clr-text-dark);
}

input.add-new:focus {
    border-bottom: 3px solid var(--clr-border-dark);
}

input.add-new::placeholder {
    color: var(--clr-text-light);
}

input.add-new:focus::placeholder {
    opacity: 0.3;
}

[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.custom-checkbox {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    border: 2px solid currentColor;
    border-radius: 50%;
    margin-right: 0.8rem;
    transform: scale(1);
    transition: transform 200ms ease-in-out;
}

.item:hover .custom-checkbox,
[type="checkbox"]:focus + label .custom-checkbox {
    transform: scale(1.2);
    color: var(--clr-category-title-bg);
}

[type="checkbox"]:checked + label .custom-checkbox {
    background: var(--clr-category-title-bg);
    border-color: var(--clr-category-title-bg);
    box-shadow: inset 0 0 0 2px var(--clr-body-bg);
}

[type="checkbox"]:checked + label {
    opacity: 0.5;
}

.item label::after {
    content:"";
    position: absolute;
    left: 1.2rem;
    right: -0.5rem;
    height: 2px;
    background: var(--clr-text-dark);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 150ms ease-in-out;
}

[type="checkbox"]:checked + label::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* selected list initial display optioins */
.list-initial-wrapper {
    position: relative;
    width: 100%;
    margin-top: 10vh;
    display: none;
}

.list-initial {
    margin: 0 auto;
    max-width: 500px;
    padding-bottom: 4rem;
}

.list-initial-wrapper button {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--clr-text-bright);
    background-color: var(--clr-category-title-bg);
    border: none;
}

.uncategorized-btn-wrapper {
    border: 2px dashed var(--clr-text-dark);
    padding: 10%;
}

.uncategorized-btn {
    width: 100%;
}

.or {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1rem 0;
}

.initial-category-form {
    display: flex;
    flex-direction: column;
    border: 2px dashed var(--clr-text-dark);
    padding: 10%;
}

.initial-category-input {
    margin-bottom: 1.5rem;
    height: 3rem;
    background-color: var(--clr-item-bg);
    padding: 1rem;
    font-size: 1.15rem;
    color: var(--clr-text-dark);
    border: none;
}
/* create category pop-up & delet confirmation pop-up*/

.create-category-wrapper,
.delete-confirmation-wrapper {
    position: absolute;
    top: -3.5rem;
    z-index: 100;
    width: 100vw;
    background-color: var(--clr-pop-up-wrapper-bg);
    display: grid;
    place-items: center;
    display: none;
    height: 100vh;
}

.delete-confirmation-wrapper {
    z-index: 101;
}

.new-category,
.delete-confirmation {
    padding: 4rem 2.5rem;
    background-color: var(--clr-body-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 90vw;
    max-width: 450px;
    max-height: 100vh;
}


.new-category-input,
.create-category-btn {
    display: block;
    width: 100%;
    border: none;
}

.new-category-input {
    margin-bottom: 1.5rem;
    height: 3rem;
    background-color: var(--clr-item-bg);
    padding: 1rem;
    font-size: 1.2rem;
    color: var(--clr-text-dark);
}

.create-category-btn {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--clr-text-bright);
    background-color: var(--clr-category-title-bg);
}

.new-category svg,
.delete-confirmation svg {
    fill: var(--clr-text-dark);
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.delete-confirmation h2 {
    font-size: 1rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.4;
}

.confirmation-message + span {
    display: block;
    text-align: center; 
    margin-top: 0.5rem;
    font-size: 1.35rem;
}
 
.cancel-btn,
.delete-btn {
    padding: 0.75rem 1.2rem;
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.cancel-btn {
   margin-bottom: 1rem; 
   color: var(--clr-text-dark);
}

.delete-btn {
    background-color: #eb4034;
    color: var(--clr-text-bright)
}

/* mobil bottom tab for edit */

.edit-tab {
    position: fixed;
    bottom: -10px;
    z-index: 8;
    width: 100%;
    background-color: var(--clr-list-title-bg);
    border-radius: 5px;   
    max-height: calc(100vh - 2.875rem); 
}

.arrow-container{
    display: grid;
    place-items: center;
    width: 100%;
    height: 3.5rem;
}

.edit-tab svg {
    transform: rotate(-90deg) translateX(5px);
    fill: var(--clr-category-menu);
    cursor: pointer;
    transition: all 200ms ease-in-out;
}

.edit-btns-wrapper {
    width: 100%;
    padding:0 7% 2rem;
    display: none;
    max-height: calc(100vh - 6.375rem);
    overflow: scroll;
}

.edit-btn {
    padding: 0.7rem 1.5rem;
    color: var(--clr-category-menu);
    background: transparent;
    border: 2px solid var(--clr-category-menu);
    font-size: 1rem;
    margin: 0.5rem auto 0.9rem;
    display: block;
    width: 15rem;
}

button:disabled {
    opacity: 0.5;
    cursor:initial;
}

button:disabled:hover,
button:disabled::selection,
button:disabled:focus {
    color: var(--clr-category-menu);
    background-color: transparent;
}

@media (min-width: 769px) {
    .edit-tab {
        display: none;
    }
}

.menu-edit-btn:hover,
.menu-edit-btn::selection,
.edit-btn:hover,
.edit-btn::selection {
    background-color: var(--clr-category-menu);
    color: var(--clr-border-dark);
}

.menu-edit-btn:focus,
.edit-btn:focus {
    outline: none;
    background-color: var(--clr-category-menu);
    color: var(--clr-border-dark);
}