/* Geez Web OTP Login — centered card layout */

.local-geezwebotp-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 0.75rem 1rem 2rem;
    box-sizing: border-box;
}

/*
 * Less space between the theme page header (blue bar) and the card.
 * Adjust these values in this file to taste.
 */
body.path-local-geezwebotp-login #page-header > .inner {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

body.path-local-geezwebotp-login #page-content {
    padding-top: 0.5rem;
    margin-top: 0;
}

body.path-local-geezwebotp-login #region-main {
    padding-top: 0;
}

.local-geezwebotp-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 2rem 1.75rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.local-geezwebotp-card .card-title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.local-geezwebotp-card .card-intro {
    margin: 0 auto 1.25rem;
    max-width: 340px;
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.local-geezwebotp-card .alert {
    margin-bottom: 1rem;
}

/* Narrow centered column for fields, links, and buttons. */
.local-geezwebotp-form-body {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.local-geezwebotp-channel-tabs {
    display: flex;
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto 1.25rem;
    padding: 0.25rem;
    background: #f4f6f8;
    border-radius: 8px;
    box-sizing: border-box;
}

.local-geezwebotp-channel-tabs .btn {
    flex: 1;
    margin: 0;
    border-radius: 6px !important;
    font-weight: 500;
}

.local-geezwebotp-channel-tabs .btn-outline-primary.active,
.local-geezwebotp-channel-tabs .btn-primary {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.local-geezwebotp-form-body .mform,
.local-geezwebotp-card .mform {
    margin-top: 0;
    width: 100%;
}

.local-geezwebotp-form-body .mform .fitem,
.local-geezwebotp-card .mform .fitem {
    margin-bottom: 1rem;
}

/* Stack labels above inputs. */
.local-geezwebotp-form-body .mform .fitem.row,
.local-geezwebotp-form-body .mform .fitem {
    display: block;
}

.local-geezwebotp-form-body .mform .fitem .fitemtitle,
.local-geezwebotp-form-body .mform .fitem .col-form-label,
.local-geezwebotp-form-body .mform .fitem.row > [class*="col-"]:first-child {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    float: none;
    margin: 0 0 0.4rem;
    padding: 0;
    text-align: left;
    white-space: normal;
    word-break: normal;
    font-weight: 500;
}

.local-geezwebotp-form-body .mform .fitem .felement,
.local-geezwebotp-form-body .mform .fitem.row > [class*="col-"]:last-child {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    margin-left: 0;
    padding: 0;
}

.local-geezwebotp-form-body .mform .fitem .fa-exclamation-circle,
.local-geezwebotp-form-body .mform .fitem .fa-circle-exclamation,
.local-geezwebotp-form-body .mform .fitem img.icon.req,
.local-geezwebotp-form-body .mform .fitem abbr.req {
    display: none !important;
}

.local-geezwebotp-form-body .mform .fitem .felement input[type="text"],
.local-geezwebotp-form-body .mform .fitem .felement input[type="password"],
.local-geezwebotp-form-body .mform .fitem .felement input[type="email"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.local-geezwebotp-form-body .mform .fitem .felement.local-geezwebotp-password-wrap {
    position: relative;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap .local-geezwebotp-input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -1.125rem;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
    pointer-events: none;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-identifier-wrap {
    position: relative;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap input[type="password"],
.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap input[type="text"] {
    padding-left: 2.25rem;
    padding-right: 2.5rem;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-identifier-wrap .local-geezwebotp-input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -1.125rem;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
    pointer-events: none;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-identifier-wrap input[type="text"] {
    padding-left: 2.25rem;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap .local-geezwebotp-pass-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: -1rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap .local-geezwebotp-pass-toggle.filled {
    display: flex;
}

.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap .local-geezwebotp-pass-toggle:hover,
.local-geezwebotp-form-body .mform .felement.local-geezwebotp-password-wrap .local-geezwebotp-pass-toggle:focus {
    color: rgba(0, 0, 0, 0.55);
    outline: none;
}

.local-geezwebotp-form-body .mform .fitem .felement input:focus {
    border-color: #0f6cbf;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(15, 108, 191, 0.15);
}

.local-geezwebotp-forgot-wrap {
    margin: 0.5rem 0 1rem;
    text-align: center;
}

.local-geezwebotp-forgot-link {
    font-size: 0.9rem;
    color: #0f6cbf;
    text-decoration: none;
}

.local-geezwebotp-forgot-link:hover {
    text-decoration: underline;
}

/* Compact password policy hint. */
.local-geezwebotp-password-policy {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #666;
}

/* Horizontal action buttons: Cancel (outline) + primary submit. */
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar_0,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar),
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.local-geezwebotp-resend-link {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.9rem;
}

.local-geezwebotp-resend-link a {
    color: #0f6cbf;
    font-weight: 500;
    text-decoration: none;
}

.local-geezwebotp-resend-link a:hover {
    text-decoration: underline;
}

/* Submit row: Moodle uses an empty label column (col-md-3) that pushes the button left. */
.local-geezwebotp-form-body .mform #fitem_id_submitbutton,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(#id_submitbutton),
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(input[type="submit"]) {
    margin-top: 0.75rem;
    margin-bottom: 0;
    justify-content: center;
}

.local-geezwebotp-form-body .mform #fitem_id_submitbutton > .col-md-3,
.local-geezwebotp-form-body .mform #fitem_id_submitbutton > .col-form-label,
.local-geezwebotp-form-body .mform #fitem_id_submitbutton > [class*="col-"]:first-child:not(.felement),
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(#id_submitbutton) > .col-md-3,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(#id_submitbutton) > [class*="col-"]:first-child:not(.felement),
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(input[type="submit"]) > .col-md-3,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(input[type="submit"]) > [class*="col-"]:first-child:not(.felement) {
    display: none !important;
}

.local-geezwebotp-form-body .mform #fitem_id_submitbutton > .felement,
.local-geezwebotp-form-body .mform #fitem_id_submitbutton > .col-md-9,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(#id_submitbutton) > .felement,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(#id_submitbutton) > .col-md-9,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(input[type="submit"]) > .felement,
.local-geezwebotp-form-body .mform .fitem.femptylabel:has(input[type="submit"]) > .col-md-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.local-geezwebotp-form-body .mform .felement[data-fieldtype="submit"] {
    justify-content: center !important;
}

.local-geezwebotp-form-body .mform #id_submitbutton,
.local-geezwebotp-form-body .mform .fitem.femptylabel input[type="submit"].btn-primary,
.local-geezwebotp-form-body .mform .fitem.femptylabel input[type="submit"] {
    display: block !important;
    width: auto !important;
    min-width: 200px;
    margin: 0 auto !important;
    padding: 0.65rem 2rem !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: #0f6cbf !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.35);
    cursor: pointer;
    float: none !important;
}

.local-geezwebotp-form-body .mform #id_submitbutton:hover,
.local-geezwebotp-form-body .mform .fitem.femptylabel input[type="submit"]:hover {
    background: #0d5aa3 !important;
}

/* Side-by-side Cancel + primary (set password + OTP verify). */
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar > .col-md-3,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar > .col-form-label,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) > .col-md-3,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) > .col-md-3,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) > [class*="col-"]:first-child:not(.felement),
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) > [class*="col-"]:first-child:not(.felement) {
    display: none !important;
}

.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar .felement,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar > .col-md-9,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) .felement,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) .felement,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) > .col-md-9,
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) > .col-md-9 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar input[type="submit"],
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) input[type="submit"],
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_submitbutton) input[type="submit"] {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0.6rem 0.75rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    float: none !important;
    box-shadow: none;
}

.local-geezwebotp-form-actions-row .mform #id_submitbutton,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar input[name="submitbutton"],
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) input[name="submitbutton"] {
    order: 2;
    background: #0f6cbf !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.3) !important;
}

.local-geezwebotp-form-actions-row .mform #id_submitbutton:hover,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar input[name="submitbutton"]:hover {
    background: #0d5aa3 !important;
}

.local-geezwebotp-form-actions-row .mform #id_cancel,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar input[name="cancel"],
.local-geezwebotp-form-actions-row .mform .fitem.femptylabel:has(#id_buttonar) input[name="cancel"] {
    order: 1;
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #ced4da !important;
    box-shadow: none !important;
}

.local-geezwebotp-form-actions-row .mform #id_cancel:hover,
.local-geezwebotp-form-actions-row .mform #fitem_id_buttonar input[name="cancel"]:hover {
    background: #f4f6f8 !important;
    border-color: #adb5bd !important;
}

.local-geezwebotp-form-body .mform .fdescription.required,
.local-geezwebotp-form-body .mform fieldset.femptylabel {
    display: none !important;
}

.local-geezwebotp-card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    font-size: 0.95rem;
}

.local-geezwebotp-card-footer a {
    color: #0f6cbf;
    text-decoration: none;
}

.local-geezwebotp-card-footer a:hover {
    text-decoration: underline;
}

.local-geezwebotp-card h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

/* Header / menu login modal — same card look as the password page */
.local-geezwebotp-modal-login.local-geezwebotp-modal-panel,
.local-geezwebotp-modal-login .local-geezwebotp-modal-panel {
    text-align: center;
}

.local-geezwebotp-modal-login .card-title {
    margin-bottom: 0.75rem;
}

/* Continue with Google — modal + password page (matches mb2nl btn-socimage / btn-Google) */
.local-geezwebotp-oauth-block {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 0.25rem;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.local-geezwebotp-oauth-block .potentialidplist {
    margin: 0;
}

.local-geezwebotp-oauth-block .potentialidplist > .potentialidp {
    display: block;
    margin: 0 0 0.85rem;
}

.local-geezwebotp-oauth-block .btn-socimage {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: center;
    width: 100% !important;
    min-height: 41px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px;
    box-sizing: border-box;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.local-geezwebotp-oauth-block .btn-socimage.btn-Google {
    background-color: #4285f4 !important;
}

.local-geezwebotp-oauth-block .btn-socimage.btn-Google:hover,
.local-geezwebotp-oauth-block .btn-socimage.btn-Google:focus {
    background-color: #3367d6 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.local-geezwebotp-oauth-block .btn-socimage .btn-image {
    display: flex !important;
    flex: 0 0 35px;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    margin: 3px;
    padding: 0;
    border-radius: 4px;
    background-color: #fff;
}

.local-geezwebotp-oauth-block .btn-socimage .btn-image img {
    display: block !important;
    width: auto !important;
    height: 25px !important;
    margin: 0 !important;
    padding: 2px;
}

.local-geezwebotp-oauth-block .btn-socimage .btn-text {
    display: block !important;
    flex: 1 1 auto;
    padding: 0 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    color: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.local-geezwebotp-oauth-block .text-separator {
    margin: 0.15rem 0 1.15rem;
    text-align: center;
}

.local-geezwebotp-oauth-block .text-separator > div {
    display: flex;
    flex-flow: row;
    align-items: center;
}

.local-geezwebotp-oauth-block .text-separator > div::before,
.local-geezwebotp-oauth-block .text-separator > div::after {
    content: '';
    display: inline-block;
    border-top: 1px solid #ced4da;
    width: 100%;
}

.local-geezwebotp-oauth-block .text-separator span {
    padding: 0 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
}

.local-geezwebotp-modal-form .local-geezwebotp-form-body {
    max-width: 300px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.local-geezwebotp-modal-form .local-geezwebotp-field {
    margin-bottom: 1rem;
    text-align: left;
}

.local-geezwebotp-modal-form .local-geezwebotp-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.local-geezwebotp-modal-form .local-geezwebotp-field .form-field {
    position: relative;
}

.local-geezwebotp-modal-form .local-geezwebotp-input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -1.125rem;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
    pointer-events: none;
}

.local-geezwebotp-modal-form .local-geezwebotp-field input[type="text"],
.local-geezwebotp-modal-form .local-geezwebotp-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 2.5rem 0.55rem 2.25rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.local-geezwebotp-modal-form .local-geezwebotp-pass-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: -1rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.local-geezwebotp-modal-form .local-geezwebotp-pass-toggle.filled {
    display: flex;
}

.local-geezwebotp-modal-form .local-geezwebotp-pass-toggle:hover,
.local-geezwebotp-modal-form .local-geezwebotp-pass-toggle:focus {
    color: rgba(0, 0, 0, 0.55);
    outline: none;
}

.local-geezwebotp-modal-login .local-geezwebotp-card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
    .local-geezwebotp-card {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 10px;
    }

    .local-geezwebotp-page {
        padding: 0.5rem 0.75rem 1.5rem;
    }

    body.path-local-geezwebotp-login #page-header > .inner {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .local-geezwebotp-form-body {
        max-width: 100%;
        padding: 0;
    }
}
