

.contact-form {
    width: calc(100% - 32px);
    max-width: 520px;
    box-sizing: border-box;
    margin: 25px auto;
    padding: 24px;
}
.contact-form h2 { margin: 0 0 12px; }
.contact-form .field { display: flex; flex-direction: column; margin: 0 0 14px; }
.contact-form .field label { width: auto; text-align: left; margin: 0 0 5px; }
.contact-form .field input,
.contact-form .field textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 9px;
    border: 1px solid #888;
    border-radius: 5px;
    font: inherit;
}
.contact-form .field textarea { min-height: 150px; resize: vertical; }
.contact-form button { margin: 12px 0 0; }
.contact-form #msg { display: none; padding: 12px; border-radius: 6px; margin: 12px 0; }
.contact-form #msg.success { display: block; color: #155724; background: #d4edda !important; }
.contact-form #msg.error { display: block; color: #721c24; background: #f8d7da !important; }
.contact-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#sendButton:disabled { opacity: .7; cursor: wait; }

/* Dimmed full-page overlay while contact_ajax.php sends the email */
#contactSendingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .55);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
#contactSendingOverlay.active { display: flex; }
.contact-sending-box {
    background: #fff;
    color: #333;
    padding: 30px 45px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}
.contact-overlay-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #ddd;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: contact-spin .8s linear infinite;
}
@keyframes contact-spin { to { transform: rotate(360deg); } }
.contact-sending-text { font-size: 18px; font-weight: 600; }
.contact-sending-subtext { font-size: 13px; color: #666; }
@media (prefers-reduced-motion: reduce) {
    .contact-overlay-spinner { animation: none; }
}
