@import url('https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300');

:root{
    --main-bg-color: rgb(255, 255, 255);
    --main-color: black;
    --secondary-bg-color: rgb(255, 255, 255);
    --secondary-color: white;
}

body {
    font-size: 16px;
    margin: 0;
    background: var(--main-bg-color);
    /* background: rgb(255, 255, 255); */
    color: var(--main-color);
    font-family: 'Open Sans Condensed', sans-serif;
}
input, 
button {
    font-family: 'Open Sans Condensed', sans-serif;
}
button {
    cursor: pointer;
}

h3 {
    font-size: 20px;
    text-align: center;
    /* font-style: italic; */
}

.side-menu {
    display: flex;
    grid-area: side;
    flex-direction: column;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background: white;
    border-bottom: 1px solid rgb(255, 255, 255);
    box-shadow: 0px 1px 3px rgb(200, 200, 200);
}

.title {
    font-size: 1.6em;
    margin: 0.4em;
}

button {
    align-self: center; 
}

.night-mode {
    background-color: rgb(40, 40, 40);
    color: white;
    border-color: black;
}

main {
    display: flex;
    justify-content: center;
}

.main-container{
    display: grid;
    grid-template-columns: 1fr minmax(400px,40%) 1fr;
    grid-template-areas: 
    "side main settings";
    width: 95%;
    margin-top: 2em;
}

.dialog-container {
    /* display: none; */
    display: flex;
    position: absolute;
    top: 0;
    left:0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.dialog-header {
    display: grid;
    cursor: default;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    justify-items: center;
    font-size: 22px;
    color: white;
    background-image: linear-gradient(to bottom, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
    padding: 1px 0px;
    margin-bottom: 1.5em;
}

.dialog-header h3 {
    grid-column: 2;
}

.icon-selected {
    grid-column: 1;
    margin-left: 1em;
}
.dialog {
    text-align: center;
    width: 450px;
}

.dialog-main {
    padding: 0 2em;
}

.dialog-icons {
    border: 1px solid rgb(200, 200, 200);
    margin-top: 1em;
    margin-bottom: 1em;
}

.allIcons-header {
    padding: 0.5em;
    margin-top: 0;
    margin-bottom: 0em;
    color: white;
    background-image: linear-gradient(to bottom, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
}

.input-alert {
    background: white;
    padding: 0;
    margin: 5px 10px;
    text-align: right;
}
.input-alert span {
    color: red;
    font-weight: bold;
}
.alert-2 {
    margin: 0 10px;
}
.iconsWrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid rgb(200, 200, 200);
}

.iconsWrapper > i {
    color: rgb(150, 150, 150);
    margin-left: 1.5em;
    margin-right: 0.25em;
}
.dialog input,
.dialog button {
    width: 100%;
    font-size: 16px;
    margin: 0;
}

.dialog input {
    padding: 0.25em 0.25em;
}
.dialog input:focus {
    padding: 0.25em 0.25em;
    outline: none;
}
.night-input::placeholder{
    color: lightgrey;
    opacity: 0.8;
}
.icons-search {
    border:none;
}
#dialog-name:focus {
    outline: auto;
    outline-color:  rgb(255, 0, 0, 0.6);
}
.icons-loadBtn {
    height: 2em;
    border: none;
    outline: none;
    border: 1px solid rgba(0,0,0,0.21);
	border-bottom-color: rgba(0,0,0,0.34);
    background: rgb(235, 235, 235);
}

.icons-loadBtn:active {
    top: 2px;
	border-color: rgba(0,0,0,0.34) rgba(0,0,0,0.21) rgba(0,0,0,0.21);
    position: relative;
}

#dialog-cancel {
    width: 50%;
    height: 3em;
    border: none;
    background: rgb(235, 235, 235);
}
#dialog-save {
    width: 50%;
    color:white;
    background-image: linear-gradient(to top, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
    height: 3em;
    border: none;
}

#cancelBtn {
    width: 25%;
    background: rgb(240, 240, 240);
    height: 3em;
    border: none;
    margin: 3em 1em 1em 1em;
}

#deleteListBtn {
    width: 25%;
    color:white;
    background-image: linear-gradient(to top, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
    height: 3em;
    border: none;
    margin: 3em 1em 1em 1em;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    grid-gap: 1em 0.5em;
    overflow: auto;
    height: 180px;
    list-style: none;
    padding: 0.5em 0.5em;
}

.icons-grid li i{
    font-size: 3em;
    transition-duration: 0.2s;
    transition-property: transform;
}

.icons-grid li i:hover{
    transform: scale(1.2);
    cursor: pointer;
}

.todolistsAdd-container {
    display: grid;   
    grid-template-rows: 1fr;
    grid-template-columns: 50px 1fr;
    align-items: center;
    margin-top: 62px;
    margin-bottom: 2em;
    /* margin-left: 25%; */
    /* margin-right: 10%; */
    align-self: center;
}


.todolistsAdd-container i {
    cursor: pointer;
    justify-self: center;
    font-size: 2.5em;
    color: rgb(205, 0, 0);
    transition-duration: 0.2s;
    transition-property: transform;
}
.todolistsAdd-container i:hover {
    opacity: 0.8;
}

.todolistsAdd-container i:active {
    transform: scale(0.8);
}


.todolistsAdd-container p {
    margin-left: 1em;
}
.todolists {
    display: flex;
    flex-direction: column;
}

.current {
    padding-left: 0.5em;
    border-left: 5px solid rgb(205, 0, 0);
}

.todolist {
    display: grid;   
    cursor: pointer; 
    grid-template-rows: 1fr;
    grid-template-columns: 50px 1fr;
    align-items: center;
    margin: 0.25em 0 0.25em 0;
    transition-duration: 0.2s;
    transition-property: padding border color;
}
.todolist i {
    font-size: 2em;
    justify-self: center;
}

.todolist:hover {
    padding-left: 0.5em;
    border-left: 5px solid rgb(205, 0, 0, 0.6);
}

.todolist p {
    margin-left: 1em;
}

.todolist-container {
    width: 100%;
    grid-area: main;
    justify-self: center;
    border: 1px solid rgb(200, 200, 200);
    margin-left: 1em;
}

.todolist-container input[type="text"]:focus {
    outline: none;
    border: none;
}

.todolist-name-container {
    display: flex;
    align-items: center;
    height: 3em;
    /* border-bottom: 1px solid rgb(200, 200, 200); */
    padding-left: 1em;
    padding-right: 1em;
    font-size: 22px;
    background-image: linear-gradient(to bottom, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
    /* background-image: linear-gradient(to bottom, rgb(0, 120, 185) 0%, rgb(0, 185, 255) 100%); */
    /* background: rgb(185, 0, 0); */
    color: white;
}

.todolist-icon {
    padding: 0 2px;
}

.todolist-name {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    background-color: inherit;
    color: inherit;
    border: none;
}

.todolist-settings-container i:hover {
    cursor: pointer;
}
.todolist-settings-content {
    position: absolute;
    background-color: #f9f9f9;
    color: black;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 0px 16px;
    z-index: 1;
}
.todolist-settings-content p:hover {
    cursor: pointer;
    opacity: 0.8;
}

.input-container{
    display: flex;
    padding: 5px 0px 5px 3px;
    height: 2em;
    align-items: center;
}

.add-todo {
    margin: 0px 25px 0px 20px;
}

.todos-input {
    border: none;
    background: inherit;
    color: inherit;
    width: 100%;
    font-size: 16px;
}

.todos-container {
    height: 70vh;
    overflow: auto;
    border-top: 1px solid rgb(200, 200, 200);
}

.todos-container input[type="text"]:focus {
    font-size: 16px;
    margin-left: 2em;
    height: 2em;
    background: inherit;
}

.todo:first-child {
    margin-top: 1em;
}

.todo {
    display: grid;
    grid-template-columns: 20px minmax(100px,100%) repeat(2, 1fr);
    grid-template-rows: 30px; 
    padding: 3px 0px 3px 10px; 
    margin: 10px 0px;
    align-items: center;
}

.todo:hover {
    padding: 3px 0px 3px 10px; 
    /* border: 1px solid;
    border-left: none;
    border-right: none; */
    background: rgb(240, 240, 240);
}

.todo > input[type="checkbox"] {
    cursor: pointer;
    margin-left: 1em;
}
.todo > label {
    margin: 0px;
    margin-left: 2em;
}
.todos-todo .todo > label {
    cursor: -webkit-grab; 
}

.todo-edit {
    background: rgb(0, 195, 0);
    margin-right: 0px;
    font-size: 16px;
    border: none;
    height: 35px;
    width: 35px;
}
.todo-delete {
    background: rgb(255, 0, 0);
    margin-right: 0px;
    font-size: 16px;
    border: none;
    height: 35px;
    width: 35px;
}
.todo-delete:active,
.todo-edit:active {
    border: none;
    transform: scale(0.8);
}
.todo-edit:hover {
    cursor: pointer;
    font-size: 18px;
    background: rgba(0, 195, 0, 0.9);
    color: rgb(30, 30, 30);
}
.todo-delete:hover {
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    background: rgba(255, 0, 0, 0.9);
    color: rgb(30, 30, 30);
}

.general-settings {
    grid-area: settings;
    justify-self: end;
}

.hide {
    display: none;
}

.done {
    text-decoration-line: line-through;
    /* font-style: italic; */
}

.settings-section {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.settings-section p {
    margin-right: 1em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 1.5em;
  }
  
  .switch input { 
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 1em;
    width: 1em;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-image: linear-gradient(to left, rgb(205, 0, 0) 0%, rgb(255, 0, 0) 100%);
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px rgb(205, 0, 0);
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(16px);
    -ms-transform: translateX(16px);
    transform: translateX(16px);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

@media only screen and (max-width: 768px) {
    .todolistsAdd-container {
        margin-top: 68px;
    }

    .todolist p ,
    .todolistsAdd-container p {
        display: none;
    }
    .main-container{
        display: grid;
        grid-template-columns: 15% minmax(350px,70%) 15%;
        grid-template-rows: 1fr 20%;
        grid-template-areas: 
        ". main ."
        ". settings .";
    }
    .general-settings {
        justify-self: center;
        align-self: center;
    }
    .side-menu {
        display: none;
    }
    .todolist-container {
        margin: 0;
    }
    .todos-container {
        height: 55vh;
    }
} 

@media only screen and (max-width: 500px) {
    body {
        font-size: 14px;
    }
    h3 {
        font-size: 16px;
    }
    .dialog {
        width: 280px;
    }
    .icons-grid {
        height: 180px;
    }
    .icons-grid li i{
        font-size: 2em;
    }
    .current {
        padding-left: 0em;
    }
    .todolist:hover {
        padding-left: 0em;
    }
    .main-container{
        display: grid;
        grid-template-columns: 10% minmax(250px,80%) 10%;
        grid-template-rows: 70vh 20vh;
    }
    .todolist-name-container {
        font-size: 18px;
    }
    .todos-input {
        font-size: 16px;
    }
    .todo-delete,
    .todo-edit {
        font-size: 16px;
        height: 28px;
        width: 28px;
    }
    .todo {
        padding: 0px 0px 0px 10px;
    }
    .todo:hover {
        padding: 0px 0px 0px 10px;
    }
} 

@media only screen and (max-height: 650px) and (max-width: 350px) {
    .todos-container {
        height: 50vh;
    }
}