/*
 *
 */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');

html {
    height: 100%!important;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0;
    height: 100%!important;
    background-color: #e8eaf6;
}

header {
    height: 20px;
}

main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: "Google Sans Code", monospace;
    font-size: small;
    text-align: center;
}
.container {
    display: flex;
    max-width: 768px;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    color: #204a87;
}

.blocks {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto;
    gap: 50px;
    padding: 0;
}
@media (min-width: 768px) {
    .blocks {
        grid-template-columns: auto auto;
        /* grid-template-rows: auto auto; */
        width: 100%;
    }
}

h3 {
    border-bottom: 1px dotted #204a87;
    padding: 5px 0;
}
.block ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.block ul li {
    padding: 4px 7px;
    background-color: #204a87;
    color: #fff;
    border-radius: 5px;
}

.logo {
    max-width: 250px;
    width: 100%;
    height: auto;
}

@media (min-width: 480px) {
    .logo {
        max-width: 350px;
    }
}

#contact-form {
    display: grid;
    grid-template-columns: auto;
    width: 100%;
    gap: 10px;
    margin: 0;
}

@media (min-width: 768px) {
    #contact-form {
        grid-template-columns: auto auto;
    }
}
#contact-form .message-header {
    text-align: center;
    line-height: 22px;
}
@media (min-width: 768px) {
    #contact-form .message-header {
        grid-column: span 2;
    }
}
#contact-form .personal-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#contact-form .message-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}
#contact-form input {
    border: 1px solid #204a87;
    background-color: #ffffff00;
    padding: 6px 6px;
    font-family: 'Google Sans Code', monospace;
    color: #204a87;
}

#contact-form input:-webkit-autofill {
  -webkit-text-fill-color: #204a87 !important; /* force your text color */
  caret-color: #204a87; /* cursor color */
}

#contact-form input:-webkit-autofill::first-line {
  color: #204a87 !important; /* for some browsers */
}


#contact-form input:focus {
    outline: none;
    border: 1px solid #3070cf;
    background-color: #dddddd;
}

.subject-container {
    position: relative;
    display: flex;
    flex-direction: column;
}
.subject-container ul {
    display: none;
    position: absolute;
    list-style: none;
    border: 1px solid #204a87;
    background-color: #dddddd;
    margin: 0;
    padding: 0;
    top: 32px;
    right: 0;
    left: 0;
    text-align: left;
}
.subject-container ul li {
    padding: 8px 5px;
    cursor: pointer;
}
.subject-container ul li:hover {
    background-color: #3070cf;
    color: #fff;
}

#subject-input {
    background-size: 12px;
    padding-right: 30px;
    cursor: pointer;
}

.arrow-up {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="gray" viewBox="0 0 24 24"><path d="M7 14l5-5 5 5z"/></svg>') no-repeat right 10px center;
}
.arrow-down {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="gray" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
}

.subject-container:has(.arrow-up) ul {
    display: block;
}
.subject-container:has(.arrow-down) ul {
    display: none;
}

#contact-form textarea {
    min-height: 100px;
    border: 1px solid #204a87;
    background-color: #ffffff00;
    padding: 6px 6px;
    font-family: 'Google Sans Code', monospace;
    font-size: small;
    color: #204a87;
    resize: vertical;
}
@media (min-width: 768px) {
    #contact-form textarea {
        height: 100%;
        min-height: auto;
        resize: none;
    }
}
#contact-form textarea:focus {
    outline: none;
    border: 1px solid #3070cf;
    background-color: #dddddd;
}
#contact-form input.error,
#contact-form select.error,
#contact-form textarea.error {
    border-color: #d32f2f;
}

button {
    margin: 0 auto;
    border: 0;
    font-family: 'Google Sans Code', monospace;
    background-color: #204a87;
    color: #fff;
    padding: 8px 10px;
    cursor: pointer;
    margin-top: 10px;
}
@media (min-width: 768px) {
    #contact-form button {
        grid-column: span 2;
    }
}
button:hover {
    background-color: #3070cf;
}

footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 20px;
}

footer p {
    font-family: 'Google Sans Code', monospace;
    font-size: small;
    text-align: center;
    color: #204a87;
}

dialog#alert {
    background-color: #e8eaf6;
    font-family: "Google Sans Code", monospace;
    font-size: small;
    color: #204a87;
    text-align: center;
    line-height: 18px;
}

dialog.success {
    border: 3px solid #204a87;
}
dialog.success button {
    background-color: #204a87;
}
dialog.success button:hover {
    background-color: #3070cf;
}

dialog.error {
    border: 3px solid #d32f2f;
}
dialog.error button {
    background-color: #d32f2f;
}
dialog.error button:hover {
    background-color: #f44336;
}

dialog:open::backdrop {
    background-color: #0000008a;
}