#masthead-support-contact {
    display: none;
}

#contact-form-ctn {
    max-width: 50em;
    margin: 0 auto;
    padding: 2em;
}
#contact-form-ctn h1 {
    color: var(--bg-color);
    margin: 0;
    font-size: 1.5em;
}
#contact-form-ctn > p {
    color: #666;
    margin: 0;
    font-style: italic;
}
#contact-form {
    margin-top: 1.5em;
}
#contact-form-element {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}
.form-field {
    display: flex;
    flex-direction: column;
    row-gap: 2px;
}
.form-field .label-text {
    font-weight: bold;
    color: var(--bg-color);
    display: block;
    margin: 0;
}
.form-field input,
.form-field select,
.form-field textarea {
    border: 1px solid var(--cta-color);
    background: #fff;
    padding: 0.5em;
    width: 100%;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-field input,
.form-field select {
    line-height: 2em;
    height: 2.5em;
}
.form-field textarea {
    line-height: 1.4em;
    min-height: 8em;
    resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--bg-color);
    box-shadow: 0 0 0 2px rgba(24, 72, 90, 0.1);
}
.form-field input.error,
.form-field select.error,
.form-field textarea.error {
    border-color: var(--negative);
    box-shadow: 0 0 0 2px rgba(225, 66, 58, 0.1);
}
.error-message {
    color: var(--negative);
    font-size: 0.9em;
    font-weight: bold;
    display: none;
    margin-top: 0.25em;
}
.error-message:not(:empty) {
    display: block;
}
.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #666;
    margin-top: 0.25em;
}
.char-counter.warning {
    color: var(--negative);
    font-weight: bold;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5em;
}
#contact-form .button {
    height: 2.5em;
    line-height: 1em;
    padding: 0 1.5em 0.15em;
    margin: 0;
    border: 1px solid var(--cta-color);
    background: var(--cta-color);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    min-width: 10em;
    transition: background-color 0.3s ease;
}
#contact-form .button:hover:not(:disabled) {
    background: var(--bg-color);
    border-color: var(--bg-color);
}
#contact-form .button:disabled {
    background: #ccc;
    color: #888;
    border-color: #aaa;
    cursor: not-allowed;
}
.submitting #submit-contact {
    position: relative;
    color: transparent;
}
.submitting #submit-contact::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1em;
    height: 1em;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: contact-spin 1s linear infinite;
}
@keyframes contact-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
#website {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
.form-success {
    background-color: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--bg-color);
    padding: 1em;
    margin-bottom: 1.5em;
}
.form-error {
    background-color: #fef2f2;
    border: 1px solid var(--negative);
    color: var(--negative);
    padding: 1em;
    margin-bottom: 1.5em;
}
@media (max-width: 768px) {
    #contact-form-ctn {
        margin: 1em;
        padding: 1.5em;
    }

    #contact-form-ctn h1 {
        font-size: 1.3em;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    #contact-form .button {
        width: 100%;
        padding: 0.5em 1em 0.65em;
        height: 3em;
    }

    .form-actions {
        justify-content: stretch;
    }
}
body.contact-page #struct-sidebar-content-flex-wrap {
    justify-content: center;
}
body.contact-page #struct-sidebar {
    display: none;
}
body.contact-page #struct-content {
    width: 100%;
    max-width: 60em;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
#contact-form .button:focus {
    outline: 2px solid var(--cta-color);
    outline-offset: 2px;
}
@media (prefers-contrast: high) {
    .form-field input,
    .form-field select,
    .form-field textarea {
        border-width: 2px;
    }

    #contact-form .button {
        border-width: 2px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .form-field input,
    .form-field select,
    .form-field textarea,
    #contact-form .button {
        transition: none;
    }

    @keyframes contact-spin {
        0% { transform: translate(-50%, -50%) rotate(0deg); }
        100% { transform: translate(-50%, -50%) rotate(0deg); }
    }
}
@media print {
    #contact-form-ctn {
        box-shadow: none;
        border: 1px solid #000;
    }

    #contact-form .button {
        display: none;
    }

    .error-message {
        display: none;
    }
}