/* 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) {
    display: none !important;
}

/* Keep the proxy member lookup hidden until another member is selected. */
.mcs-proxy-form form.elementor-form:not(.mcs-agf-proxy-initialised)
    .elementor-field-group-proxy_member_lookup {
    display: none !important;
}

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

.mcs-agf-member-results {
    position: absolute;
    z-index: 9999;
    left: 0;
    right: 0;
    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;
}

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

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