.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 12, 21, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.contact_box {
    background: var(--body_bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--box_bc_h);
    width: 500px;
    max-width: 100%;
    position: relative;
    /*
    box-shadow: 0px 0px 30px 5px rgba(0, 0, 0, 0.8);
    */
    transform: translateY(-200px);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, background-color 0.5s ease, color 0.5s ease;
}

.contact_box.open {
    transform: translateY(0);
    opacity: 1;
}

.contact_box.closing {
    transform: translateY(-200px);
    opacity: 0;
}

.contact_box label {
    display: block;
    margin: 1rem 0 0.5rem;
    font-weight: bold;
    padding-left: 1rem;
    padding-top: 1rem;
    color: var(--qid_fg);
}

.contact_box :is(input, textarea, select) {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5rem;
    background: var(--select_bg);
    color: var(--select_fg);
    border: 1px solid var(--select_bg);
    border-radius: 5px;
    outline: none;
    font-style: monospace;
    font-size: 1.0rem;
}

.contact_box select {
    justify-content: center;
    text-align: center;
}

.contact_box input::placeholder,
.contact_box textarea::placeholder {
    color: var(--body_fg);
    font-style: monospace;
    font-size: 1.0rem;

}

.contact_box :is(input, textarea, select):is(:active, :focus, :visible) {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5rem;
    background: var(--select_bg);
    color: var(--select_fg);
    border: 1px solid var(--select_bg);
    border-radius: 5px;
    outline: none;
    transition: opacity 0.5s ease-in-out, background-color 0.5s ease, color 0.5s ease;
}

.contact_box textarea {
    height: 100px;
    resize: vertical;
}

.contact_box :is(input, textarea, select):focus-visible {
    background: var(--select_bg);
    color: var(--select_fg);
    border: 1px solid var(--select_bc);
    outline: none;
    transition: opacity 0.5s ease-in-out, background-color 0.5s ease, color 0.5s ease;
}

#custom_type_field {
    padding-top: 0.5rem;
}

.contact_button_row {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.contact_box :is(.cancel_button, .submit_button, .close_button) {
    background: var(--select_bg);
    color: var(--body_fg);
    border: none;
    cursor: pointer;
    transition: opacity 0.5s ease-in-out, background-color 0.5s ease, color 0.5s ease;
    border-radius: 5px;
    border: 1px solid var(--box_bc_h);
    text-transform: uppercase;
}

.contact_box :is(.cancel_button, .submit_button, .close_button):hover {
    background: var(--select_bc);
    color: var(--select_fg);
    transition: opacity 0.5s ease-in-out, background-color 0.5s ease, color 0.5s ease;
}

.contact_box .close_button {
    aspect-ratio: 1 / 1;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-style: monospace;
    font-size: 1rem;
    text-transform: none;
}

.contact_box :is(.cancel_button, .submit_button) {
    font-weight: bold;
    font-style: monospace;
    font-size: 1rem;
    padding: 0.5rem;

}

.hidden {
    display: none;
}

.feedback_message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--body_bg);
    padding: 1rem 2rem;
    border: 1px solid var(--box_bc_h);
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.feedback_message.slide_up {
    opacity: 1;
    pointer-events: all;
}

.feedback_message.hidden {
    display: none;
}

