/* Copyright: Cuckoo Labs 2026 */
/* Prevent a flash of the full form before the conditional script starts. */
.mcs-nomination-form form.elementor-form:not(.mcs-agf-initialised)
    .elementor-field-group:not(.elementor-field-group-nomination_method):not(.elementor-field-type-hidden),
form.elementor-form.mcs-nomination-form:not(.mcs-agf-initialised)
    .elementor-field-group:not(.elementor-field-group-nomination_method):not(.elementor-field-type-hidden) {
    display: none !important;
}

.mcs-agf-member-results[hidden],
.elementor-field-group[hidden] {
    display: none !important;
}

.mcs-agf-member-results {
    position: relative;
    z-index: 9999;
    width: 100%;
    max-height: 16rem;
    overflow-y: auto;
    margin-top: 0.25rem;
    background: #fff;
    border: 1px solid #b7b7b7;
    border-radius: 0.35rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.elementor-field-group-nominee_lookup,
.elementor-field-group-proxy_member_lookup {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}


.mcs-agf-member-option {
    display: block;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mcs-agf-member-option:last-child {
    border-bottom: 0;
}

.mcs-agf-member-option:hover,
.mcs-agf-member-option:focus,
.mcs-agf-member-option.is-active {
    background: #f1f5f8;
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.mcs-agf-member-lookup-status {
    min-height: 1.25rem;
    margin-top: 0.3rem;
    font-size: 0.9em;
}

/* Dedicated AGM proxy lookup controller (v2.3.6).
 * The native Elementor field stays enabled for submission but is never the
 * member-facing control. This isolates typing and AJAX results from Elementor
 * conditional-field scripts and from cached earlier lookup controllers. */
.mcs-agf-proxy-native-group {
    display: none !important;
}

.mcs-agf-proxy-search-group {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}

.mcs-agf-proxy-search-group[hidden] {
    display: none !important;
}

.mcs-agf-proxy-search-input {
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

.mcs-agf-proxy-lookup-status {
    display: block !important;
    width: 100%;
}

.mcs-agf-proxy-member-results {
    position: relative;
    width: 100%;
    margin-top: 0.25rem;
}

.mcs-agf-response-card {
    max-width: 46rem;
    margin: 1rem auto;
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid #d7d7d7;
    border-radius: 0.5rem;
    background: #fff;
}

.mcs-agf-response-card h2 {
    margin-top: 0;
}

.mcs-agf-response-details {
    margin: 1rem 0 1.5rem;
}

.mcs-agf-response-details > div {
    display: grid;
    grid-template-columns: minmax(7rem, 11rem) 1fr;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e8e8e8;
}

.mcs-agf-response-details dt {
    font-weight: 700;
}

.mcs-agf-response-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.mcs-agf-response-form label {
    display: block;
    margin-bottom: 0.35rem;
}

.mcs-agf-response-form input[type="text"],
.mcs-agf-response-form textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    border: 1px solid #9d9d9d;
    border-radius: 0.3rem;
    font: inherit;
}

.mcs-agf-response-form small {
    display: block;
    margin-top: 0.35rem;
}

.mcs-agf-checkbox-row label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem;
    align-items: start;
}

.mcs-agf-checkbox-row input {
    margin-top: 0.25rem;
}

.mcs-agf-button {
    display: inline-block;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 0.3rem;
    background: #1675b8;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.mcs-agf-button:hover,
.mcs-agf-button:focus {
    text-decoration: underline;
}

.mcs-agf-response-notice {
    max-width: 46rem;
    margin: 1rem auto;
    padding: 1rem;
    border: 1px solid #b7b7b7;
    border-left-width: 0.35rem;
    border-radius: 0.3rem;
    background: #fff;
}

.mcs-agf-response-notice--success {
    border-left-color: #2e7d32;
}

.mcs-agf-response-notice--error {
    border-left-color: #b3261e;
}

.mcs-agf-response-notice--warning {
    border-left-color: #9a6700;
}

.mcs-agf-response-notice--info {
    border-left-color: #1675b8;
}

@media (max-width: 600px) {
    .mcs-agf-response-details > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .mcs-agf-button {
        width: 100%;
    }
}
