form {
    text-align: left;
}

.custom-file-control,
.form-control,
.is-focused .custom-file-control,
.is-focused .form-control,
.form-control:invalid {
    background-image: linear-gradient(0deg, #212632 2px, rgba(0, 150, 136, 0) 0), linear-gradient(0deg, rgba(0, 0, 0, .26) 1px, transparent 0);
}

.btn.btn-raised.btn-primary,
.btn.btn-raised.btn-primary:hover,
.btn-raised.btn-primary:active,
.btn-raised.btn-primary:focus {
    background-color: #212632 !important;
    border-color: #212632 !important;
}

.telegramma-intro {
    max-width: 1000px;
    margin: 1rem auto 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
}

#telegramma {
    padding: 1.5rem 0 2rem;
}

#telegramma > h3,
#telegramma > p {
    text-align: center;
}

#telegramma-preview {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    container-type: inline-size;
}

#telegramma-preview img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.telegramma-field {
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    border: 1px solid rgba(33, 38, 50, .35);
    border-radius: .35rem;
    background: rgba(255, 255, 255, .78);
    color: #212632;
    font: inherit;
    font-size: clamp(.7rem, 2.2cqw, 1rem);
    padding: .35em .55em;
}

.telegramma-field:focus {
    outline: 2px solid #212632;
    outline-offset: 1px;
    background: rgba(255, 255, 255, .94);
}

.telegramma-destinatario {
    top: 17.5%;
    left: 37%;
    width: 46%;
    text-align: right;
}

.telegramma-testo {
    top: 29%;
    left: 18.5%;
    width: 64.5%;
    height: 25%;
    resize: none;
}

.telegramma-mittente {
    top: 58%;
    left: 37%;
    width: 46%;
    text-align: right;
}

.telegramma-details {
    max-width: 800px;
    margin: 2rem auto 0;
}

.telegramma-details label {
    font-size: 1rem;
}

.telegramma-privacy {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.telegramma-privacy .form-check-input {
    margin-top: .3rem;
}

.telegramma-submit {
    min-width: 240px;
}

.telegramma-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.telegramma-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

#success {
    max-width: 800px;
    margin: 0 auto;
}

.navbar {
    box-shadow: none;
}

@media (max-width: 575.98px) {
    #telegramma {
        padding-top: 1rem;
    }

    .telegramma-field {
        padding: .2em .4em;
    }

    .telegramma-details,
    .telegramma-details .form-control,
    .telegramma-details label {
        font-size: 1rem;
    }

    .telegramma-submit {
        width: 100%;
        min-width: 0;
    }
}
