#main{
    background-color: white;
    padding: 30pt;
    padding-bottom: 70pt;
    margin-top: 50pt;
    padding-bottom: 70pt;
    margin-top: 50pt;
}

form{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 30pt;
}

.form-group{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 10pt;
}

.form-group label{
    font-size: 15pt;
    font-weight: 600;
}

.form-group select{
    color: black;
    background-color: white;
    width: 300pt;
    height: 30pt;
    padding: 5pt 10pt;    
    border: solid 2px #a00000;
    border-radius: 10px;
    appearance: none;
    padding-right: 35px; /* spazio per la freccia */
    background-image: url("../img/arrow_down.png");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    cursor: pointer;
    font-size: 12pt;
    transition: all 0.2s ease;
}
.form-group select:focus{
    outline: none;
    border: solid 2px #a00000;
    box-shadow: 0 0 5px #a00000;
}

.form-group input{
    width: 350pt;
    height: 25pt;
    padding: 5pt 10pt;
    border: solid 2px #a00000;
    border-radius: 10px;
    caret-color: #a00000;
    font-size: 12pt;
    transition: all 0.2s ease;
}
.form-group input:focus{
    outline: none;
    border: solid 2px #a00000;
    box-shadow: 0 0 5px #a00000;
}
.form-group input::selection{
    color: white;
    background-color: #a00000;
}

.field-hint {
    max-width: 350pt;
    margin: -4pt 0 0;
    color: rgba(0, 0, 0, 0.65);
    font-size: 10pt;
    line-height: 1.4;
}

.form-group textarea{
    height: 300pt;
    resize: none;
    padding: 15pt;
    border: solid 2px #a00000;
    border-radius: 10px;
    caret-color: #a00000;
    font-size: 12pt;
    transition: all 0.2s ease;
}
.form-group textarea:focus{
    outline: none;
    border: solid 2px #a00000;
    box-shadow: 0 0 8px #a00000;
}
.form-group textarea::selection{
    color: white;
    background-color: #a00000;
}

.textarea-wrapper {
    position: relative;
    width: 600pt;
}

.textarea-wrapper textarea {
    width: 100%;
    min-height: 150pt;
    padding-bottom: 30pt; /* spazio per il contatore */
}

#charCount {
    position: absolute;
    bottom: 8px;
    right: 12px;

    font-size: 12px;
    color: rgba(0, 0, 0, 0.45); /* semi trasparente */
    pointer-events: none; /* non cliccabile */
}

input[type="checkbox"] {
    accent-color: #a00000;
    width: 14pt;
    height: 14pt;
    cursor: pointer;
}

#submit_btn{
    padding: 10pt 20pt;
    color: white;
    background-color: #a00000;
    border: solid 2px rgba(0, 0, 0, 0);
    box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, .5);
    border-radius: 15px;
    font-size: 12pt;
    margin: 20pt 5pt;
    transition: all 0.3s ease;
}

#submit_btn:hover{
    background-color: white;
    border: solid 2px #a00000;
    color: #a00000;
    border-radius: 25px;
    transform: scale(1.1);
    box-shadow: 1px 1px 10px 1px rgba(255, 0, 0, 0.5);
}

a{
    text-decoration: underline;
    color: #a00000;
}

@media screen and (max-width: 768px) {

    #main {
        padding: 15pt;
        margin-top: 16px;
    }

    form {
        align-items: center;
    }

    .form-group {
        width: 100%;
        align-items: center;
    }

    .form-group select,
    .form-group input {
        width: 100%;
        max-width: 300pt;
        font-size: 16px;
    }

    .field-hint {
        width: 100%;
        max-width: 300pt;
        font-size: 9pt;
    }

    .form-group textarea {
        width: 100%;
        max-width: 100%;
        height: 200pt;
        font-size: 16px;
    }
    .textarea-wrapper {
        width: 100%;
    }

    #submit_btn {
        width: min(100%, 300px);
        max-width: 250pt;
        min-height: 46px;
        font-size: 16px;
    }

    #privacy_container {
        width: 100%;
        max-width: 300pt;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    #privacy_container input[type="checkbox"] {
        width: 20px;
        height: 20px;
        vertical-align: middle;
    }

    #submit_btn:hover {
        transform: none;
    }
}
