*{
    box-sizing: border-box;
}

body{
    font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
    color: hsl(0, 0%, 15%);
    font-size: 1.2em;
}

.pnavbar {
    background-color: #858585;
    overflow: hidden;
    margin-top: -10px;
    margin-left: -10px;
    margin-right: -10px;
}

.pnavbar a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    font-size: .9em;
    padding: 1px 15px;
    text-decoration: none;
}

.pnavbar a:hover {
    background-color: #ddd;
    color: black

}

.container{
    display: block;
    max-width: 90%;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.header{
    text-align: center;
    margin-top: -20px;
    margin-bottom: 10px;
}

.pfield{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

.pfield-input{
    width: 100%;
    height: 2rem;
    margin-left: auto;
    font-size: .8em;
    color: hsla(0, 0%, 0%, 0.87);
    border: 1px solid hsla(210, 6%, 14%, 0.15);
    border-radius: .3rem;
    box-shadow: 1px 1px 2px 0 hsla(210, 6%, 14%, 0.15)
}

.pfield-label{
    width: 90px;
    font-size: .9rem;
    font-weight: 800;
    margin-right: 5px;
}

.select{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.select-category{
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-bottom: 5px;
}

.select-duedate{
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-bottom: 5px;
}

.due-input,
.category-input{
    width: 150px;
    font-size: .9rem;
}

.due-label,
.category-label{
    font-size: .9rem;
    font-weight: 800;
    width: 80px
}

/* Align the button to the right */
.form-button{
    width:80px;
    text-align: center;
    cursor: pointer;
    padding: .3rem .6rem;
    margin: 2px;
    border: none;
    border-radius: 5px;
    font-size: .8rem;
    text-decoration: none;
    background-color: hsl(206, 73%, 47%);
    color: white;
    white-space: nowrap;
}

.segment {
    width: 100%;
    margin: 0 auto;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex; /* Use flexbox to control the layout */
    flex-direction: column; /* Stack items vertically by default */
}

.task-item{
    width: 100%;
    display: flex;
}

.task{
    flex: 1 1 auto; /* Allow task to grow and shrink as needed */
    flex-direction: column;
    justify-content: start;
}

.task_status{
    display: flex;
    margin-right: 10px;
    margin-top: 4px;
}

.task_check{
    height: 25px;
}

.task.title{
    font-size: .9rem;
}

.task.info{
    font-size: .7rem;
}

.buttonblock{
    display: flex;
    flex-direction: row;
    margin-right: 5px;
    align-items: center;
    justify-content: end;
}

.button{
    width:60px;
    text-align: center;
    cursor: pointer;
    padding: .3rem .6rem;
    margin: 2px;
    border: none;
    border-radius: 5px;
    font-size: .8rem;
    text-decoration: none;
}

.blue.button{
    background-color: hsl(206, 73%, 47%);
    color: white;
}


.blue.button:hover{
    background-color: hsl(206, 87%, 56%);
}
.red.button{
    background-color:hsl(348, 71%, 55%);
    color: white;
}

.red.button:hover{
    background-color:hsl(348, 100%, 70%);
}

.label{
    font-size: .7em;
    padding: .2rem .7rem;
    margin: 2px;
    border-radius: 5px;
}

/* Media query for wider screens */
@media screen and (min-width: 600px) {
    .segment {
        flex-direction: row; /* Align items horizontally at wider screen sizes */
        align-items: center; /* Center items vertically */
    }
    .select{
        flex-direction: row;
        justify-content: start;
    }
    .select-category{
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: start;    
    }
    .select-duedate{
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: start;    
    }
}
