/* Bridge the theme�s form-scoped rules so they also work with a wrapper div
   when the actual <form runat="server"> is in the master page. */

/* Base wrapper sizing (the theme gives forms a top margin and max width) */
.ugf-content :is(form, .form-shell) {
    margin-top: 40px; /* from hero.css: .ugf-content form { margin-top:40px } */
    max-width:none;
}

    /* Generic groups/labels/inputs */
    .ugf-content :is(form, .form-shell) .form-group {
        margin-bottom: 25px;
        position: relative;
    }

        .ugf-content :is(form, .form-shell) .form-group.mb10 {
            margin-bottom: 10px;
        }

        .ugf-content :is(form, .form-shell) .form-group label {
            display: block;
            font-size: 1.2rem;
            font-weight: 700;
            color: #1c2437;
            font-family: "Roboto", sans-serif;
            text-transform: uppercase;
        }

        /* Controls */
        .ugf-content :is(form, .form-shell) .form-group .form-control {
            height: 60px;
            border-radius: 0;
            outline: none;
            box-shadow: none;
            font-size: 1.4rem;
            padding: 0 20px;
            border: 1px solid rgba(0, 0, 0, 0.12);
        }

            .ugf-content :is(form, .form-shell) .form-group .form-control.has-error {
                border-color: #ff3e58;
            }

            .ugf-content
            :is(form, .form-shell)
            .form-group
            .form-control::-webkit-input-placeholder {
                color: #b2becc;
            }

            .ugf-content
            :is(form, .form-shell)
            .form-group
            .form-control::-moz-placeholder {
                color: #b2becc;
            }

            .ugf-content
            :is(form, .form-shell)
            .form-group
            .form-control:-ms-input-placeholder {
                color: #b2becc;
            }

            .ugf-content :is(form, .form-shell) .form-group .form-control:-moz-placeholder {
                color: #b2becc;
            }

            /* Error message positioned by theme */
            .ugf-content
            :is(form, .form-shell)
            .form-group
            .form-control.has-error ~ .error-msg {
                position: absolute;
                top: -2px;
                right: 0;
                font-size: 1.2rem;
                font-weight: 400;
                color: #ff3e58;
            }

        /* Check-flex rows (remember/forgot row) */
        .ugf-content :is(form, .form-shell) .form-group.check-flex {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
        }

            .ugf-content
            :is(form, .form-shell)
            .form-group.check-flex
            .custom-checkbox
            .custom-control-input {
                height: 18px;
                width: 18px;
                border-radius: 3px;
                border: 3px solid rgba(0, 0, 0, 0.12);
                outline: none;
                box-shadow: none;
            }

                .ugf-content
                :is(form, .form-shell)
                .form-group.check-flex
                .custom-checkbox
                .custom-control-input:checked ~ .custom-control-label::before {
                    background: #1888f5;
                }

            .ugf-content
            :is(form, .form-shell)
            .form-group.check-flex
            .custom-checkbox
            .custom-control-label {
                width: auto;
                position: static;
                padding-left: 30px;
                text-transform: capitalize;
                font-size: 1.4rem;
                font-weight: 400;
                color: #546274;
                transform: translateY(0);
            }

                .ugf-content
                :is(form, .form-shell)
                .form-group.check-flex
                .custom-checkbox
                .custom-control-label:before {
                    top: 2px;
                    left: 0;
                    height: 18px;
                    width: 18px;
                    border-radius: 3px;
                    border: 2px solid rgba(0, 0, 0, 0.12);
                    box-shadow: none;
                }

                .ugf-content
                :is(form, .form-shell)
                .form-group.check-flex
                .custom-checkbox
                .custom-control-label:after {
                    top: 2px;
                    left: 0;
                    height: 18px;
                    width: 18px;
                }

            .ugf-content :is(form, .form-shell) .form-group.check-flex a {
                color: #546274;
                font-family: "Roboto", sans-serif;
                font-weight: 400;
            }

                .ugf-content :is(form, .form-shell) .form-group.check-flex a:hover {
                    color: #005fff;
                }

    /* Buttons inside the form area */
    .ugf-content :is(form, .form-shell) .btn {
        margin-bottom: 20px;
        width: 170px;
        text-align: center;
        font-size: 1.4rem;
        height: 60px;
        padding: 0 28px;
        font-weight: 700;
        text-transform: uppercase;
        border-radius: 0;
        /* don't force colors/borders here */
    }

        /* Primary (keep your brand blue) */
        .ugf-content :is(form, .form-shell) .btn.btn-primary {
            background-color: #005fff;
            border-color: #005fff;
            color: #fff;
        }

            .ugf-content :is(form, .form-shell) .btn.btn-primary:hover,
            .ugf-content :is(form, .form-shell) .btn.btn-primary:focus {
                background-color: #004ee6;
                border-color: #0048d6;
                color: #fff;
            }

        /* Bootstrap variants */
        .ugf-content :is(form, .form-shell) .btn.btn-success {
            background-color: var(--bs-success);
            border-color: var(--bs-success);
            color: #fff;
        }

            .ugf-content :is(form, .form-shell) .btn.btn-success:hover,
            .ugf-content :is(form, .form-shell) .btn.btn-success:focus {
                background-color: #157347; /* BS5 hover */
                border-color: #146c43;
            }

        .ugf-content :is(form, .form-shell) .btn.btn-info {
            background-color: var(--bs-info);
            border-color: var(--bs-info);
            color: #000; /* BS5 info uses dark text */
        }

            .ugf-content :is(form, .form-shell) .btn.btn-info:hover,
            .ugf-content :is(form, .form-shell) .btn.btn-info:focus {
                background-color: #31d2f2;
                border-color: #25cff2;
            }

        .ugf-content :is(form, .form-shell) .btn.btn-warning {
            background-color: var(--bs-warning);
            border-color: var(--bs-warning);
            color: #000;
        }

            .ugf-content :is(form, .form-shell) .btn.btn-warning:hover,
            .ugf-content :is(form, .form-shell) .btn.btn-warning:focus {
                background-color: #ffca2c;
                border-color: #ffc720;
            }

        .ugf-content :is(form, .form-shell) .btn.btn-danger {
            background-color: var(--bs-danger);
            border-color: var(--bs-danger);
            color: #fff;
        }

            .ugf-content :is(form, .form-shell) .btn.btn-danger:hover,
            .ugf-content :is(form, .form-shell) .btn.btn-danger:focus {
                background-color: #bb2d3b;
                border-color: #b02a37;
            }

        .ugf-content :is(form, .form-shell) .btn.btn-secondary {
            background-color: var(--bs-secondary);
            border-color: var(--bs-secondary);
            color: #fff;
        }

        .ugf-content :is(form, .form-shell) .btn.btn-dark {
            background-color: var(--bs-dark);
            border-color: var(--bs-dark);
            color: #fff;
        }

        .ugf-content :is(form, .form-shell) .btn.btn-light {
            background-color: var(--bs-light);
            border-color: var(--bs-light);
            color: #000;
        }

        /* Optional: make outline variants look right (your theme zeroed borders earlier) */
        .ugf-content :is(form, .form-shell) .btn[class*="btn-outline-"] {
            background: #fff;
            border-width: 1px;
        }

    .ugf-content :is(form, .form-shell) .btn-wrap {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

        .ugf-content :is(form, .form-shell) .btn-wrap .btn {
            margin-right: 30px;
        }

        .ugf-content :is(form, .form-shell) .btn-wrap a {
            margin-bottom: 20px;
            font-size: 1.4rem;
            font-family: "Roboto", sans-serif;
            color: #97a2ae;
            font-weight: 700;
            text-transform: uppercase;
            text-decoration: none;
        }

        .ugf-content :is(form, .form-shell) .btn-wrap a:hover {
            color: #005fff;
        }
    /* Login / Register: block footer (not .btn-wrap flex row); copy inherits .ugf-content p (1.5rem) */
        .ugf-content :is(form, .form-shell) .auth-footer-cta a {
            text-transform: none;
            font-weight: 600;
        }

/* Flex form variant  */
.ugf-content :is(form.form-flex, .form-shell.form-flex) {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
}

    .ugf-content :is(form.form-flex, .form-shell.form-flex) .form-group {
        flex: 0 0 calc(100% - 200px);
        margin-bottom: 0;
    }

    .ugf-content :is(form.form-flex, .form-shell.form-flex) .btn {
        flex: 0 0 170px;
        background: #005fff;
        color: #fff;
        font-size: 1.4rem;
        height: 60px;
        padding: 0 28px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        border: 0;
    }

/* Email form variant (full width) */
.ugf-content :is(form.email-form, .form-shell.email-form) {
    max-width: 100%;
}

/* Email verification variant (multi-code inputs) */
.ugf-content
:is(form.email-verification-form, .form-shell.email-verification-form) {
    display: flex;
    justify-content: space-between;
}

    .ugf-content
    :is(form.email-verification-form, .form-shell.email-verification-form)
    .form-group {
        flex: 0 0 80px;
    }

        .ugf-content
        :is(form.email-verification-form, .form-shell.email-verification-form)
        .form-group:nth-child(5) {
            border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
        }

        .ugf-content
        :is(form.email-verification-form, .form-shell.email-verification-form)
        .form-group
        .form-control {
            font-size: 4rem;
            height: 80px;
            text-align: center;
            border-right: 0;
            background-image: none;
        }

    .ugf-content
    :is(form.email-verification-form, .form-shell.email-verification-form)
    .btn {
        margin-bottom: 0;
        margin-left: 30px;
        height: 80px;
        flex: 0 0 120px;
    }

/* Account form variant (selects, password toggles, gender radios) */
.ugf-content :is(form.account-form, .form-shell.account-form) {
    width: 100%;
    max-width: 100%;
    padding-bottom: 80px;
}

    .ugf-content :is(form.account-form, .form-shell.account-form) .select-input {
        position: relative;
    }

        .ugf-content
        :is(form.account-form, .form-shell.account-form)
        .select-input
        span {
            position: absolute;
            top: 27px;
            right: 15px;
            border-top: 6px solid #b2becc;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
        }

        .ugf-content
        :is(form.account-form, .form-shell.account-form)
        .select-input
        .form-control {
            padding-right: 0;
            padding-left: 15px;
            color: #b2becc;
            appearance: none;
        }

            .ugf-content
            :is(form.account-form, .form-shell.account-form)
            .select-input
            .form-control
            option {
                color: #546274;
            }

    .ugf-content :is(form.account-form, .form-shell.account-form) .birth-date {
        display: flex;
        justify-content: space-between;
    }

        .ugf-content
        :is(form.account-form, .form-shell.account-form)
        .birth-date
        .birth-date-input {
            flex: 0 0 calc(33.33% - 8px);
            position: relative;
        }

    .ugf-content :is(form.account-form, .form-shell.account-form) .pass-group {
        position: relative;
    }

        .ugf-content
        :is(form.account-form, .form-shell.account-form)
        .pass-group
        .pass-toggler-btn {
            position: absolute;
            bottom: 12px;
            right: 20px;
        }

            .ugf-content
            :is(form.account-form, .form-shell.account-form)
            .pass-group
            .pass-toggler-btn
            i {
                font-size: 2rem;
                color: #b2becc;
            }

            .ugf-content
            :is(form.account-form, .form-shell.account-form)
            .pass-group
            .pass-toggler-btn
            #eye-slash {
                display: none;
            }

    .ugf-content
    :is(form.account-form, .form-shell.account-form)
    .form-group.check-gender {
        display: flex;
    }

        .ugf-content
        :is(form.account-form, .form-shell.account-form)
        .form-group.check-gender
        .custom-radio {
            flex: 0 0 135px;
            margin-right: 20px;
        }

            .ugf-content
            :is(form.account-form, .form-shell.account-form)
            .form-group.check-gender
            .custom-radio
            .custom-control-input {
                display: none;
                outline: none;
                box-shadow: none;
                appearance: none;
            }

                .ugf-content
                :is(form.account-form, .form-shell.account-form)
                .form-group.check-gender
                .custom-radio
                .custom-control-input:checked ~ .custom-control-label {
                    border-color: #005fff;
                    color: #005fff;
                }

                    .ugf-content
                    :is(form.account-form, .form-shell.account-form)
                    .form-group.check-gender
                    .custom-radio
                    .custom-control-input:checked ~ .custom-control-label::before {
                        background: #005fff;
                    }

                    .ugf-content
                    :is(form.account-form, .form-shell.account-form)
                    .form-group.check-gender
                    .custom-radio
                    .custom-control-input:checked ~ .custom-control-label::after {
                        background-image: none;
                        content: url(../images/check-white.svg);
                    }

            .ugf-content
            :is(form.account-form, .form-shell.account-form)
            .form-group.check-gender
            .custom-radio
            .custom-control-label {
                background: #ffffff;
                height: 60px;
                border: 1px solid rgba(0, 0, 0, 0.12);
                display: flex;
                align-items: center;
                font-size: 1.5rem;
                font-weight: 400;
                color: #b2becc;
                padding-left: 58px;
                text-transform: capitalize;
            }

                .ugf-content
                :is(form.account-form, .form-shell.account-form)
                .form-group.check-gender
                .custom-radio
                .custom-control-label:before {
                    height: 18px;
                    width: 18px;
                    border-radius: 2px;
                    background: #e1e7ee;
                    border: none;
                    top: 19px;
                    left: 20px;
                }

                .ugf-content
                :is(form.account-form, .form-shell.account-form)
                .form-group.check-gender
                .custom-radio
                .custom-control-label:after {
                    height: 18px;
                    width: 18px;
                    top: 20px;
                    left: 20px;
                }

/* Validation plugin helpers from theme (error positioning) */
.form-group {
    position: relative;
}

.pass-group label.error {
    right: 45px !important;
}

.country-select label.error {
    top: 20px !important;
    right: 33px !important;
}

.email-verification-form label.error {
    bottom: 2px !important;
    top: auto !important;
    right: 15px !important;
}

label.error {
    color: #ff0000 !important;
    position: absolute;
    right: 20px !important;
    top: 42px !important;
    left: auto !important;
    text-transform: none !important;
    min-width: max-content;
}

input.error {
    border-color: rgba(255, 0, 0, 0.5) !important;
}

    input.error:focus {
        background: transparent !important;
        border: 1px solid rgba(255, 0, 0, 0.5) !important;
    }

.form-group .progress {
    margin-top: -15px;
    height: 5px;
}

.suggestion {
    font-size: 13px !important;
    margin-top: -20px !important;
    margin-bottom: 15px;
}

/* Responsive tweaks that refer to the form variants */
@media all and (max-width: 539px) {
    .ugf-content :is(form.form-flex, .form-shell.form-flex) {
        display: block;
        max-width: 400px;
    }

        .ugf-content :is(form.form-flex, .form-shell.form-flex) .form-group {
            margin-bottom: 25px;
        }

    .ugf-content
    :is(form.email-verification-form, .form-shell.email-verification-form) {
        flex-wrap: wrap;
        display: flex;
        justify-content: flex-start;
        max-width: 415px;
    }

        .ugf-content
        :is(form.email-verification-form, .form-shell.email-verification-form)
        .btn {
            margin-bottom: 25px;
            margin-left: auto;
        }
}

/* Brand-aligned header */
.sw-nav {
    background: #fff; /* solid white to contrast the dark hero */
    border-bottom: 1px solid #e9edf3;
    min-height: 64px;
    z-index: 1030;
}


/* Theme bridge: apply form-control look to selects */
.ugf-content .form-select {
    height: 60px;
    border-radius: 0;
    font-size: 1.4rem;
    font-family: "Roboto", sans-serif;
    padding: 0 20px;
    border: 1px solid rgba(0,0,0,0.12);
    color: #546274;
    background-color: #fff;
    background-image: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

    .ugf-content .form-select:focus {
        border-color: #005fff;
        box-shadow: 0 0 0 1px #005fff;
    }

    .ugf-content .form-select option {
        color: #546274;
    }

/* Left instruction panel: start at the top (not centered) */
.ugf-wrapper .ugf-sidebar.sidebar-steps {
    justify-content: flex-start; /* instead of center */
    align-items: flex-start; /* instead of center */
}

    /* Keep the steps below the absolute-positioned logo and pin while scrolling */
    .ugf-wrapper .ugf-sidebar.sidebar-steps .steps {
        margin-top: 80px; /* clears the logo; tweak if needed */
        position: sticky; /* optional: stays put as the right form grows */
        top: 80px; /* distance from viewport top */
    }