/* ------------------------------------------ */
/* -------------------MAIN------------------- */
/* ------------------------------------------ */

html {
    font-family: sans-serif;
    font-size: 240%;
}

/* This kind of CSS reset is common in web development.
It provides a consistent starting point across different browsers,
which may have varying default styles for elements.
By resetting these styles, you can ensure that your webpage looks
more consistent across different browsers. */
*, *::before, *::after{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body{
    background-color:rgb(20, 20, 20);
    align-items: center;
    justify-content: center;
}

footer{
    /* width: 90vw; */
    font-size: 16px;
    color: white;
    background-color: black;
    position: fixed;
    bottom: 1vh;
    left: 50vw;
    transform: translate(-50%);
    text-align: center;
    padding: 6px;
    border-radius: 10px;
    z-index: 2000;
}

.c-preload-hide * {
    visibility: hidden;
}

#id-header{
    color: white;
    text-align: center;
}

#id-div-spacerTop{
    margin-bottom: 2vh;
}

#id-img-blackFader {
	opacity:0%;
	position:fixed;
    top: -50%;
    left: -50%;
	min-width:400%;
	min-height:400%;
	transition:0.4s ease;
	z-index:-1;
}

#id-img-blackFader.show {
	opacity:85%;
	z-index:1000;
}

#id-img-loading{
    opacity: 0%;
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: 2rem;
    transition: opacity 500ms ease-in-out;
    z-index: 4000;
}

@keyframes spin {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

#id-img-loading.spin{
    animation: spin 1500ms linear infinite;
}

#id-img-loading.show{
    opacity: 100%;
}

#id-img-mainButtonFilters{
    position: fixed;
    right: 1rem;
    top: 1rem;
    width: 2rem;
    cursor: pointer;
    z-index: 999;
}

/* ------------------------------------------ */
/* ------------MAIN IMG BUTTONS-------------- */
/* ------------------------------------------ */

.c-img-mainButton{
    position:fixed;
    width: 5.5rem;
    bottom: 10vh;
    transform: translate(-50%);
    z-index: 1;
    cursor: pointer;
    transition: 200ms ease;
}

.c-img-mainButton:hover{
    transform: translate(-50%) scale(110%);
}

#id-img-mainButtonSettings{
    left: 20vw;
}

#id-img-mainButtonPlus{
    left: 50vw;
    width: 7rem;
}

#id-img-mainButtonSharing{
    left: 80vw;
}

/* ------------------------------------------ */
/* ----------------TASK LIST----------------- */
/* ------------------------------------------ */

#id-div-taskList{
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 86vw;
    margin: 0 auto;  
}

.c-taskBox{
    color: white;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin: 0.25rem auto;
    padding: 0.5rem 0.5rem;
    border-radius: 6px;
    border-width: 2px;
    border-style: solid;
    transition: 400ms ease;
    background-color: rgb(50, 50, 50);
    border-color: rgb(100, 100, 100);
    height: 2.5rem;
    cursor: pointer;
}

/* animation for tasks due today */
@keyframes border-pulsate {
    0%  {border-color: rgb(150, 150, 150);}
    10% {border-color: white;}
    90% {border-color: white;}
    100%  {border-color: rgb(150, 150, 150);}
}

.c-taskBox.dueToday{
    animation: border-pulsate 4s infinite;
    border-width: 6px;
    /* height: 1.5rem; */
}

.c-taskBox:hover{
    filter: brightness(120%);
    /* padding: 2rem 1rem; */
    /* width: 100%; */
    transform: scale(106%);
}

.c-taskBox:active{
    filter: brightness(200%);
    transition: 50ms;
}

.c-taskBoxCountdown{
    flex: none;
    width: 2rem;
    margin-right: 0.1rem;
}

.c-taskBoxName{
    flex: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.1rem;
}

.c-img-task-type-icon{
    flex: none;
    width: 1.4rem;
    margin-left: 0.5rem;
}

/* ------------------------------------------ */
/* ---------------GENERAL INPUT-------------- */
/* ------------------------------------------ */

input:placeholder-shown {
    font-style: italic;
}

input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
    display: none;
}

input:checked ~ label{
    color: rgb(0, 180, 255);
    /* transition: 400ms ease; */
}

/* style the text of a checked checklist item */
input[type="checkbox"]:checked + .c-div-input-container-field-checklist input[type="text"] {
    color: rgb(0, 180, 255);
    text-decoration: line-through;
}

input[type]:disabled, input:disabled ~ label{
    color: rgb(100, 100, 100);
    border-color: rgb(100, 100, 100);
}

.c-div-input-container-field, .c-div-input-container-field-checklist{
    width: 100%;
    position: relative;
    margin-top: 0.3rem;
}

.c-div-input-container-selection{
    display: flex;
    flex-direction: row;
    align-items: center;
}

input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="password"], .c-sharing-container{
    font-size: 100%;
    border: 2px solid white;
    padding: 0.5rem;
    border-radius: 4px;
    outline: none;
    background-color: rgb(50, 50, 50);
    color: white;
}

input[type="number"]{
    width: 7.5rem;
    appearance: none;
}

input[type="text"]{
    width: 100%;
}

input[type="text"]:valid, input[type="number"]:valid, input[type="date"]:valid, input[type="password"]:valid{
    border-color: rgb(0, 180, 255);
}

/* input[type="text"]:invalid, input[type="number"]:invalid{
    border-color: rgb(180, 20, 20);
} */

input[type="text"]:valid ~ label, input[type="number"]:valid ~ label, input[type="date"]:valid ~ label, input[type="password"]:valid ~ label{
    color: rgb(0, 180, 255);
}

input[type="date"]{
    width: 7.5rem;
}

input[type="checkbox"], input[type="radio"]{
    accent-color: rgb(0, 180, 255);
    background: none;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

#id-inp-check-dia-uni-delete{
    accent-color: rgb(180, 20, 20);
    margin-left: 0.5rem;
}

#id-inp-check-dia-uni-delete:checked ~ label{
    color: rgb(240, 80, 80);
}

.c-label-field{
    position: absolute;
    left: 0.4rem;
    top: -0.6rem;
    padding: 0 0.2rem;
    background-color: rgb(50, 50, 50);
    font-size: 70%;
}

/* ------------------------------------------ */
/* -----------------BUTTONS------------------ */
/* ------------------------------------------ */

button, input[type="submit"]{
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
    background-color: rgb(0, 140, 255);
    text-align: center;
    width: 8rem;
    border-radius: 4px;
    outline: none;
    border: none;
    transition: 200ms ease;
    margin: 0.5rem;
    cursor: pointer;
    min-height: 3rem;
}

button:active, input[type="submit"]:active{
    filter: brightness(180%);
}

button:hover, input[type="submit"]:hover{
    filter: brightness(130%);
}

#id-form-wC input[type="submit"]{background-color: rgb(20, 180, 20);}

@keyframes blinkingBorder {
    0% { border-color: transparent; }
    50% { border-color: rgb(255, 255, 255); }
    100% { border-color: transparent; }
}

.c-btn-green{background-color: rgb(20, 180, 20);}
.c-btn-blue{background-color: rgb(0, 140, 255);}
.c-btn-orange{background-color: rgb(220, 100, 20);}
.c-btn-red{background-color: rgb(180, 20, 20);}

.c-btn-red.blink{
    border: 8px solid transparent;
    animation: blinkingBorder 1s linear infinite;
}

.c-btn-dia-hidden{display: none;}
.c-btn-dia-hidden.show{display: inline-block;}

.c-img-dia-add-task{
    margin-top: 0.5rem;
    width: 16vh;
    max-width: 8rem;
    transition: 400ms ease;
}

.c-img-dia-add-task:hover{
    transform: scale(110%);
}

/* ------------------------------------------ */
/* ----------------HELP/INFO----------------- */
/* ------------------------------------------ */

#id-div-helpContainer{
    display: flex;
    /* flex: none; */
    flex-direction: column;
    align-items: center;
}

/* hidden for now */
#id-div-helpContainer{
    display: none;
}

.c-div-help{
    font-size: 0.8rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    /* justify-content: center; */
    border-style: solid;
    border-width: 2px;
    border-color: white;
    border-radius: 4px;
    background-color: black;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    transition: 400ms ease;
}

.c-div-help:hover{
    transform: scale(120%);
}

.c-img-infoIcon{
    width: 1rem;
    margin: 0.2rem;
    /* transform: translateY(0.1em); */
}

/* ------------------------------------------ */
/* ----------------DIALOGUES----------------- */
/* ------------------------------------------ */

.c-dialogue{
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    border-width: 4px;
    background-color: rgb(50, 50, 50);
    border-color: rgb(100, 100, 100);

    position: fixed;
    bottom: 3.5rem;
    left: 50%;
    transform: translate(-50%);
    width: 90vw;
    max-width: 26rem;
    max-height: calc(90vh - 1rem);
    /* padding: 1rem; */
    /* margin: 1rem; */
    
    opacity: 0%;
    z-index: -1;
    transition: 400ms ease;

    overflow: hidden;
}

.c-dialogue.show{
    opacity: 100%;
    z-index: 1001;
}

/* allows scrolling inside a dialogue that is taller than the viewport */
.c-dialogue-content-wrapper {
    max-height: calc(90vh - 1rem); /* Adjust the maximum height as needed */
    margin: 0;
    /* margin-bottom: 2rem; */
    padding: 1rem;
    /* padding-bottom: 1.5rem; */
    overflow-y: auto; /* Enable vertical scrolling within the content */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hide the scrollbar GPT*/
.c-dialogue-content-wrapper::-webkit-scrollbar {width: 0;}
.c-dialogue-content-wrapper::-webkit-scrollbar-track {background-color: transparent;}
.c-dialogue-content-wrapper::-webkit-scrollbar-thumb {background-color: transparent;}

.c-div-dia-row.hide, .c-div-dia-row-hidden, .c-div-dia-column-hidden{display: none;}

.c-div-dia-row, .c-div-dia-row-hidden.show{
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin: 0.5rem auto;
    /* outline: 2px solid teal; */
}

.c-div-dia-column, .c-div-dia-column-hidden.show{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0.5rem auto;
    /* outline: 2px solid teal; */
}

.c-dia-automated-text{
    font-style: italic;
    text-shadow: rgb(0, 180, 255) 0px 0px 20px;
    /* color: rgb(100, 180, 80); */
}

.c-dia-add-task{
    max-width: 20rem;
    padding: 0.5rem;
}

#id-div-dia-fil{
    width: 50%;
    min-width: 12rem;
}

/* ------------------------------------------ */
/* ----------------ADD TASK------------------ */
/* ------------------------------------------ */

.c-div-dia-add-taskContainer{
    font-size: 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2vh;
}

.c-div-flex-column{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.c-div-dia-add-taskContainer img{
    cursor: pointer;
}

#id-div-dia-addTask-flex-row{
    display: flex;
    flex-direction: row;
    justify-content: space-around; 
    align-items: center;
}

/* ------------------------------------------ */
/* ----------------DEV STUFF----------------- */
/* ------------------------------------------ */

#id-dev-test-tasks{
    display: none;
}

label[for="id-inp-check-generateTasks"]{
    font-size: 0.4rem;
}

#id-inp-check-generateTasks{
    width: 0.6rem;
    transform: translateY(0.3rem);
}

/* ------------------------------------------ */
/* -------------SHARING SELECTION------------ */
/* ------------------------------------------ */

.c-sharing-container{
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide the scrollbar GPT*/
.c-sharing-container::-webkit-scrollbar {width: 0;}
.c-sharing-container::-webkit-scrollbar-track {background-color: transparent;}
.c-sharing-container::-webkit-scrollbar-thumb {background-color: transparent;}

.c-sharing-item{
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.c-sharing-item.selected, .c-sharing-item.selected:hover{
    background-color: rgb(0, 140, 255);
}

@media (hover: hover) and (pointer: fine){
    .c-sharing-item:hover{
        background-color: rgb(0, 140, 255, 0.2);
    }
}

/* ------------------------------------------ */
/* ----------------TOAST--------------------- */
/* ------------------------------------------ */

.c-toast{
    color: rgb(255, 255, 255);
    border: solid;
    border-radius: 0.6rem;
    border-width: 4px;
    background-color: rgb(120, 120, 120);
    border-color: rgb(80, 80, 80);

    justify-content: flex-end;
    display: flex;
    position: fixed;
    flex-direction: column;
    align-items:end;
    top: 0;
    left: 50%;
    transform: translate(-50%, -101%);
    
    width: 16rem;
    /* max-width: 26rem; */
    height: 8rem;
    /* max-height: calc(90vh - 1rem); */
    padding: 0.5rem;
    
    /* opacity: 0%; */
    z-index: 3000;
    transition: 800ms ease;

    overflow: hidden;
    
    /* text-align: center; */
    text-shadow: rgb(20, 20, 20) 0px 0px 8px;
}

.c-toast-text{
    text-align: center;
    margin: 0 auto;
}

.c-toast.show{
    transform: translate(-50%, -55%);
}

.c-toast.show-half{
    transform: translate(-50%, -70%);
}