/* ==========================================================================
   CONTACT MODULE INTERFACE LAYOUT STYLES
   ========================================================================== */
.contact-form-wrapper {
    max-width: 500px;
    margin: 40px auto;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px; /* Matches the metrics cards precisely */
    padding: 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.contact-form-wrapper h2 {
    color: #0f172a; /* Deep slate emphasis text */
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Form-Wide Alert Message Banner Frame */
.contact-error-banner {
    font-size: 0.88rem;
    font-weight: 700;
    color: #dc2626; /* Clinical warning red */
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 20px 0;
    text-align: center;
    box-sizing: border-box;
}

/* Vertical Input Row Stacking Constraints */
.contact-input-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.contact-input-row label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569; /* Charcoal gray label copy */
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Unified Text Inputs and Textarea Outlines */
.contact-input-row input[type="text"],
.contact-input-row input[type="email"],
.contact-input-row textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    background-color: #f8fafc; /* Soft linen fill */
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

.contact-input-row textarea {
    resize: vertical; /* Permits vertical height tracking changes only */
    min-height: 100px;
}

/* High-Contrast Interactive Selection Focus Lines */
.contact-input-row input:focus,
.contact-input-row textarea:focus {
    border-color: #005eb8 !important; /* Premium NHS blue focus boundary */
    background-color: #ffffff !important;
}

/* Individual Field Inline Warning Labels */
.contact-field-error {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #dc2626;
    margin-top: 2px;
}

.contact-field-error:empty {
    display: none !important;
}

/* Google reCAPTCHA Container Row Center Box */
.contact-captcha-box {
    margin: 20px 0 !important;
    display: flex;
    justify-content: center;
    width: 100%;
}

/*  Primary Send Message Action Capsule Button */
.btn-contact-submit {
    width: 100%;
    padding: 12px;
    background-color: #475569 !important; /* Charcoal signature button surface fill */
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.1s ease-in-out, transform 0.05s ease-in-out;
}

.btn-contact-submit:hover {
    background-color: #334155 !important;
}

/* Tactile Click Press Feedback */
.btn-contact-submit:active {
    transform: scale(0.99);
}

/* ==========================================================================
   RESPONSIVE TELEMETRY OVERRIDES FOR SMARTPHONES
   ========================================================================== */
@media (max-width: 560px) {
    .contact-form-wrapper {
        margin: 20px 16px;
        padding: 20px;
        border-radius: 12px;
    }
    
    /* Forces reCAPTCHA widget scales down to fit small viewport widths if tight */
    .contact-captcha-box > div {
        transform: scale(0.92);
        transform-origin: center center;
    }
}

/* Print Overrides: Completely drops forms from data page reports */
@media print {
    .contact-form-wrapper {
        display: none !important;
    }
}
