/*
 * maple_contact.css
 * Styles for the Contact Us button and modal form.
 * Override these rules in your site-specific CSS file to customise the appearance.
 */

/* ── Trigger button ──────────────────────────────────────────────────────── */

.maple-contact-trigger {
    margin-left: 8px;
}

/* Reset button defaults when Contact Us appears as a mobile nav item */
.maple-mobile-menu-item .maple-contact-trigger {
    margin-left: 0;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    text-align: center;
    justify-content: center;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */

.maple-contact-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.maple-contact-field label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.maple-contact-field input,
.maple-contact-field textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    padding: 8px 10px;
    transition: border-color 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
}

.maple-contact-field input:focus,
.maple-contact-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.maple-contact-field input.maple-contact-invalid,
.maple-contact-field textarea.maple-contact-invalid {
    border-color: #c0392b;
}

.maple-contact-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Required / optional markers */

.maple-contact-required {
    color: #c0392b;
    margin-left: 2px;
}

.maple-contact-optional {
    color: #777;
    font-weight: 400;
    font-size: 0.8rem;
}

/* ── Inline error message ─────────────────────────────────────────────────── */

.maple-contact-error {
    color: #c0392b;
    font-size: 0.875rem;
    min-height: 1.2em;
    margin-top: 4px;
}

.maple-contact-error:empty {
    display: none;
}

/* ── Success message (replaces the form after send) ──────────────────────── */

.maple-contact-success {
    text-align: center;
    padding: 24px 16px;
}

.maple-contact-success p {
    font-size: 1rem;
    color: #2c7a2c;
    margin-bottom: 20px;
}

/* ── Footer action buttons ───────────────────────────────────────────────── */

.maple-contact-btn {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 8px 20px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.maple-contact-btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.maple-contact-btn-primary:hover {
    background-color: #005f8d;
}

.maple-contact-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.maple-contact-btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    margin-right: 8px;
}

.maple-contact-btn-secondary:hover {
    background-color: #c8c8c8;
}
