/*
 * NSCBICC forms: the image CAPTCHA that replaced the icckl.com.my reCAPTCHA.
 * Everything else on the forms keeps the original Gravity Forms styling.
 */
.nscbicc-captcha__image {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.nscbicc-captcha__image img {
    display: block;
    width: 345px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 345 / 65;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    background: #f2f2f2;
}

.nscbicc-captcha__refresh {
    padding: 8px 14px;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.nscbicc-captcha__refresh:hover,
.nscbicc-captcha__refresh:focus {
    border-color: #888;
}

.nscbicc-captcha input[name="captcha"] {
    max-width: 345px;
}

form.nscbicc-busy .gform_button {
    opacity: 0.6;
    cursor: wait;
}

/* Acknowledgement popup shown when Submit is clicked. */
html.nscbicc-ack-open,
html.nscbicc-ack-open body {
    overflow: hidden;
}

.nscbicc-ack {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.nscbicc-ack[hidden] {
    display: none;
}

.nscbicc-ack__dialog {
    box-sizing: border-box;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: Inter, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

/* The theme styles h2 and button globally, so these use higher specificity. */
.nscbicc-ack .nscbicc-ack__title {
    margin: 0 0 6px;
    padding: 0;
    font-family: "Work Sans", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #36348e;
}

.nscbicc-ack .nscbicc-ack__hint {
    margin: 0 0 16px;
    text-align: left;
    font-size: 14px;
    color: #666;
}

.nscbicc-ack .nscbicc-ack__text {
    color: #112337;
}

.nscbicc-ack__check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #f7f7fb;
    cursor: pointer;
    font-weight: normal;
}

.nscbicc-ack__check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    cursor: pointer;
}

.nscbicc-ack__error {
    margin: 10px 0 0;
    color: #c02b0a;
    font-size: 14px;
}

.nscbicc-ack__error[hidden] {
    display: none;
}

.nscbicc-ack__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.nscbicc-ack .nscbicc-ack__actions button {
    min-height: 44px;
    margin: 0;
    padding: 10px 20px;
    border-radius: 3px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}

/* Same colours as the forms' own Submit button. */
.nscbicc-ack .nscbicc-ack__confirm {
    border: 1px solid #001ab3;
    background: #204ce5;
    color: #fff;
}

.nscbicc-ack .nscbicc-ack__confirm:not([disabled]):hover,
.nscbicc-ack .nscbicc-ack__confirm:not([disabled]):focus {
    background: #001ab3;
    color: #fff;
}

.nscbicc-ack .nscbicc-ack__confirm[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.nscbicc-ack .nscbicc-ack__cancel {
    border: 1px solid #c8c8c8;
    background: #fff;
    color: #112337;
}

.nscbicc-ack .nscbicc-ack__cancel:hover,
.nscbicc-ack .nscbicc-ack__cancel:focus {
    border-color: #888;
    background: #fff;
    color: #112337;
}

@media (max-width: 480px) {
    .nscbicc-ack__dialog {
        padding: 18px;
    }

    .nscbicc-ack__actions button {
        flex: 1 1 100%;
    }

    .nscbicc-ack__confirm {
        order: -1;
    }
}
