/* Sign-up page — full-width form, no left panel (GS English / Moove). */

.gs-signup-page #page-footer {
    display: none !important;
}

.gs-signup-page .btn-footer-popover,
.gs-signup-page [data-region="footer-container-popover"] {
    display: none !important;
}

/* Hide left collage / testimonial panel. */
.gs-signup-page .login-layout-left {
    display: none !important;
}

.gs-signup-page #page,
.gs-signup-page #page-content {
    min-height: 100vh;
    overflow: visible;
}

.gs-signup-page #region-main.login-layout-right,
.gs-signup-page #page-content > #region-main.col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

.gs-signup-page #region-main.login-layout-right {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 2.75rem 1.25rem 3rem;
    background-color: #ffffff !important;
}

.gs-signup-page .login-layout-right-content,
.gs-signup-page #region-main-box,
.gs-signup-page .login-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto !important;
    padding: 0;
    background: #ffffff;
}

.gs-signup-page .login-container [role="main"] {
    width: 100%;
}

/* Shell header */
.gs-signup-shell {
    width: 100%;
}

.gs-signup-logo {
    max-height: 64px;
    width: auto;
}

.gs-signup-lead {
    font-size: 0.92rem;
    line-height: 1.55;
    padding: 0 0.25rem;
}

.gs-signup-back {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.gs-signup-back:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---- Moodle form: force vertical label + input stacks ---- */
.gs-signup-page .gs-signup-shell .mform.full-width-labels {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .fitem.row,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar.row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 0.9rem !important;
    padding: 0 !important;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .fitem.row > .col-md-3,
.gs-signup-page .gs-signup-shell .mform.full-width-labels .fitem.row > .col-md-9,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar > .col-md-3,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar > .col-md-9 {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar.femptylabel > .col-md-3 {
    display: none !important;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .col-form-label {
    width: 100% !important;
    padding: 0 0 0.35rem !important;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .felement,
.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-control,
.gs-signup-page .gs-signup-shell .mform.full-width-labels select.form-control {
    width: 100% !important;
    max-width: 100% !important;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-control,
.gs-signup-page .gs-signup-shell .mform.full-width-labels select.form-control {
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-control:focus,
.gs-signup-page .gs-signup-shell .mform.full-width-labels select.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #ffffff;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-label-addon .text-danger {
    display: inline-flex;
    margin-left: 0.15rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-label-addon .text-danger .icon {
    font-size: 0.65rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .form-control-feedback.invalid-feedback {
    font-size: 0.82rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .fdescription,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_passwordpolicyinfo .form-control-static {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.35rem;
}

/* Section headings */
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_username {
    margin-top: 0.15rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_username::before,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_email::before,
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_firstname::before {
    display: block;
    margin: 0 0 0.6rem;
    color: #0f766e;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_username::before {
    content: "Account";
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_email::before {
    content: "Email";
    margin-top: 0.35rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_firstname::before {
    content: "Your details";
    margin-top: 0.35rem;
}

/* First / last name side by side */
@media (min-width: 480px) {
    .gs-signup-page .gs-signup-shell .gs-signup-form-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
    }

    .gs-signup-page .gs-signup-shell .gs-signup-form-body .mform.full-width-labels {
        display: contents !important;
    }

    .gs-signup-page .gs-signup-shell .mform.full-width-labels > div[style],
    .gs-signup-page .gs-signup-shell .mform.full-width-labels > .fitem,
    .gs-signup-page .gs-signup-shell .mform.full-width-labels > #fgroup_id_buttonar,
    .gs-signup-page .gs-signup-shell .mform.full-width-labels > .fdescription.required {
        grid-column: 1 / -1;
    }

    .gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_firstname,
    .gs-signup-page .gs-signup-shell .mform.full-width-labels #fitem_id_lastname {
        grid-column: span 1;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Buttons */
.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #fgroup_id_buttonar .d-flex.flex-wrap.align-items-center {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 0.5rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #id_submitbutton {
    width: 100%;
    min-height: 48px;
    font-weight: 700;
    border-radius: 0.5rem;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels #id_cancel {
    width: 100%;
    min-height: 44px;
    border-radius: 0.5rem;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.gs-signup-page .gs-signup-shell .mform.full-width-labels .fdescription.required {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
}

/* Neutralise legacy Moove signup rules (expects .signupform wrapper). */
#page-login-signup.gs-signup-page .signupform .full-width-labels,
#page-login-signup.gs-signup-page .login-container .mform.full-width-labels {
    display: block !important;
    flex-wrap: nowrap !important;
}

#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_username,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_password,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_email,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_email2,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_firstname,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_lastname,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_city,
#page-login-signup.gs-signup-page .signupform .full-width-labels #fitem_id_country,
#page-login-signup.gs-signup-page .login-container .mform.full-width-labels .fitem {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (min-width: 768px) {
    #page-login-signup.gs-signup-page .login-container {
        width: 100% !important;
        max-width: 480px !important;
    }
}

.gs-signup-page .alert {
    border-radius: 0.75rem;
}

@media (max-width: 479.98px) {
    .gs-signup-page #region-main.login-layout-right {
        padding: 2rem 1rem 2.5rem;
    }
}
