/* Copyright: Cuckoo Labs 2026 */
/* MCS Annual Governance Forms 2.3.10 */

/* Prevent a flash of the full nomination form before its conditional controller 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],
.mcs-agf-proxy-search-v2310[hidden] {
    display: none !important;
}

/* The independent v2.3.10 field is inserted immediately before the original
 * Elementor lookup field. Hide the legacy field only when the replacement is
 * present, so a failed injection can never remove the only usable control. */
.mcs-agf-proxy-search-v2310 + .elementor-field-group-proxy_member_lookup,
form:has(.mcs-agf-proxy-search-v2310) .elementor-field-group-proxy_member_lookup {
    display: none !important;
}

.mcs-agf-proxy-search-v2310,
.elementor-field-group-nominee_lookup {
    position: relative;
    z-index: 30;
    overflow: visible !important;
}

.mcs-agf-proxy-search-v2310 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-sizing: border-box;
}

.mcs-agf-proxy-search-input-v2310 {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text !important;
}

.mcs-agf-member-results {
    position: relative;
    z-index: 99999;
    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);
}

.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 {
    display: block !important;
    width: 100%;
    min-height: 1.25rem;
    margin-top: 0.3rem;
    font-size: 0.9em;
}

.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%;
    }
}


/* Proxy member search 2.3.10 */
.mcs-agf-proxy-option-v2310.is-disabled,
.mcs-agf-proxy-option-v2310:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    background: #f5f5f5;
}

.mcs-agf-proxy-status-v2310[data-state="error"],
.mcs-agf-proxy-status-v2310[data-state="warning"] {
    font-weight: 600;
}

.mcs-agf-proxy-status-v2310[data-state="selected"] {
    font-weight: 600;
}

.mcs-agf-proxy-search-v2310 script {
    display: none !important;
}
