/* Yleiset tyylit */
body {
    font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #F5F5F7;
    color: #1D1D1F;
}

h1, h2 {
    text-align: center;
    font-weight: normal;
}

h2 {
    color: #1D1D1F;
    font-size: 1.5em;
}

/* Kontaineri ja yleinen asettelu */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.top-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.luo {
    margin-bottom: 30px;
}

/* Nappulat */
.reset-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 13px 18px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
    margin-top: 10px;
}

.reset-button:hover {
    background-color: #d32f2f;
}

.delete-button {
    background: none;
    color: gray;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 10px;
    margin-bottom: 10px;
    margin-left: 14px;
}

.delete-button:hover {
    color: red;
}

.add-button {
    background: #1D1D1F;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    margin-left: 10px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.add-button:hover {
    background-color: #272729;
}

/* Linkit */
.back-link, .clear-link, .logout-link {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
}

.back-link, .logout-link {
    margin: 20px 0;
    color: #1D1D1F;
}

.back-link::before {
    content: '←';
    margin-right: 5px;
}

.back-link:hover, .logout-link:hover {
    color: #272729;
}

.clear-link {
    background: none;
    color: #ff3333;
    text-decoration: underline;
    font-size: 0.8em;
    padding: 0;
    border: none;
    margin-top: 6px;
}

.clear-link:hover {
    color: #cc0000;
}

/* Lomakkeet */
form {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

input[type="text"] {
    padding: 10px;
    border: 0px solid #ccc;
    border-radius: 5px;
    width: 300px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #1976d2;
    outline: none;
}

/* Tehtävälista */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.task-list li {
    background: #fff;
    border-radius: 8px;
    width: 92%;
    margin: 5px 0;
}

.task-list a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #1D1D1F;
    font-size: 1.2em;
/*    text-align: center;*/
    height: 100%;
    width: 100%;
}

/* Tehtäväelementit */
ul {
    list-style: none;
    padding: 0;
}

li {
    background: #FBFBFD;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

li label {
    flex-grow: 1;
    margin-right: 10px;
    align-items: center;
}

/* Checkbox-tyylit */
.checkbox-wrapper-1 {
    display: flex;
    align-items: flex-start; /* Tämä varmistaa, että checkbox ja label ovat tasossa */
    margin-bottom: 7px;
    pointer-events: auto;
}

.checkbox-wrapper-1 input[type="checkbox"] {
    width: 20px !important;  /* Yhtenäinen leveys */
    height: 20px !important; /* Yhtenäinen korkeus */
    margin-right: 10px; /* Väli checkboxin ja labelin välillä */
   /* -webkit-appearance: checkbox;
    -moz-appearance: checkbox;*/
    appearance: checkbox;
    flex-shrink: 0; /* Estää checkboxin kutistumisen */
}

.checkbox-wrapper-1 label {
    font-size: 1em;
    margin: 0;
    line-height: 1.5em; /* Lisää tilaa tekstin ympärille */
    display: flex;
    align-items: center;
}

/* Logit */
.log {
    display: block;
    color: #999;
    font-size: 0.7em;
    padding: 0px;
    margin-top: 2px;
    padding-left: 34px;
}

/* Virheilmoitus */
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

/* Tyhjennä lista */
.clear-container {
    text-align: center;
    margin: 20px 0;
}


/* Kirjautumissivun kontaineri */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.login-container h1 {
    margin-top: 0;
}

/* Lomakekoko ja asettelu */
.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-size: 1em;
    color: #1D1D1F;
    margin-bottom: 5px;
}

.form-group input {
    width: calc(100% - 22px); /* Vähennetään pieni osuus, jotta se ei mene kontainerin reunaan kiinni */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 1em;
}

.form-group input:focus {
    border-color: #1976d2;
    outline: none;
}

/* Kirjaudu-nappula */
.login-button {
    background: #1D1D1F;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 1.2em;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #272729;
}

/* Virheilmoitus */
.error-message {
    color: #1D1D1F;
    font-weight: normal;
    text-align: center;
}

.error-message li {
    background: transparent;
    text-align: center;
    padding: 0;
    display: block;
    margin-top: 23px;
}

/* Footer-tyylit */
footer {
    text-align: center;
    margin-top: 5px;
    padding: 5px;
}

footer p {
    font-size: 14px;
    color: #999;
}
