/* Font source: https://github.com/antijingoist/opendyslexic */

* {
    font-family: 'OpenDyslexic', sans-serif;
    src: url('fonts/OpenDyslexic-Regular.otf') format('opentype');
}

body {
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    color: white;
    text-shadow: 1px 1px 2px rgb(0, 0, 0);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-image: url(/weatherform/img/clouds.jpg);
    background-size: cover;
    font-size: 20px;
}


header {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    border-radius: 10px;
    backdrop-filter: blur(20px);
    background-color: rgba(0, 0, 0, 0.548);
    width: 100%;
    max-width: 800px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.266);
}


main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    padding: 30px;
    backdrop-filter: blur(20px);
    background-color: rgba(0, 0, 0, 0.548);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.266);
}


form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    gap: 5px
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;

}

input[type="text"], input[type="datetime-local"], #weather-type, textarea {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

input[type="radio"] {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: left;
    margin-right: 10px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.radio-group legend {
    font-weight: bold;
    text-align: center;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    margin: auto 0;

}

.radio-option label {
    margin: 0;
    flex: 1;
    cursor: pointer;
}

button {
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
}

button:hover {
    background-color: #005a8a;
}

button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* [Tillgänglighet] Förstärkt fokus med färg och skugga för bättre synlighet vid tangentbordsnavigation. */
input:focus, select:focus, button:focus {
    outline: 2px solid #0078D7;
    box-shadow: 0 0 8px #0078D7;
    transition: box-shadow 0.3s;
}

label:not(.radio-option label) {
    font-weight: bold;
    margin-bottom: 5px;
}

.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.648);
}

.popup-content {
    background-color: rgba(255, 255, 255, 0.79);
    backdrop-filter: blur(10px);
    font-weight: bold;
    color: black;
    text-shadow: none;;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.popup-content h3 {
    margin-top: 0;
}

.close-popup {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;

}
.close-popup:hover {
    background-color: #005a8a;
}