/* ==========================================================
   BASE
========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Albert Sans', sans-serif;
    overflow-x: hidden;
}


/* ==========================================================
   REGISTRATION PAGE
========================================================== */

.registration-page {
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}


/* ==========================================================
   BOOTSTRAP ROW CONTROL
========================================================== */

/*
 * Bootstrap .row uses negative horizontal margins.
 * Reset them for the main registration row so that our
 * mobile width behaves predictably.
 */

.registration-page > .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}


/* ==========================================================
   REGISTRATION CARD
========================================================== */

.registration-card {
    border-radius: 20px;
    overflow: hidden;
}

.registration-card .card-body {
    padding: 1.5rem;
}


/* ==========================================================
   LOGO
========================================================== */

.logo {
    width: 120px;
    max-width: 100%;
    height: auto;
}


/* ==========================================================
   SECTION TITLES
========================================================== */

.section-title {
    border-left: 5px solid #4F39F6;

    padding-left: 10px;

    margin-top: 20px;
    margin-bottom: 20px;

    font-weight: 600;
}


/* ==========================================================
   FORM CONTROLS
========================================================== */

.form-control,
.form-select {
    border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
}


/* ==========================================================
   BUTTONS
========================================================== */

.btn-primary {
    background: #4F39F6;
    border: none;
}

.btn-primary:hover {
    background: #3c28d4;
}


/* ==========================================================
   GENERAL TEXT
========================================================== */

p {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}


/* ==========================================================
   CAMERA
========================================================== */

.camera-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.camera-container video,
.camera-container canvas,
.camera-container img {
    display: block;

    width: 100%;
    max-width: 100%;
    max-height: 500px;

    object-fit: cover;

    background: #000;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767.98px) {

    .registration-page {
        padding: 25px 0;
    }


    /*
     * Make the registration container exactly 90% of the
     * available mobile width.
     */

    .registration-page > .row > .registration-container {
        width: 90%;
        flex: 0 0 90%;

        max-width: 90%;

        margin-left: auto;
        margin-right: auto;

        padding-left: 0;
        padding-right: 0;
    }


    .registration-card {
        width: 100%;
        border-radius: 16px;
    }


    .registration-card .card-body {
        padding: 1.25rem;
    }


    .logo {
        width: 100px;
    }


    .section-title {
        margin-top: 18px;
        margin-bottom: 16px;
    }


    /*
     * Stack camera controls on very narrow screens so
     * the buttons don't become cramped.
     */

    .camera-container {
        max-width: 100%;
    }

}


/* ==========================================================
   VERY SMALL PHONES
========================================================== */

@media (max-width: 480px) {

    .registration-page {
        padding: 20px 0;
    }


    .registration-page > .row > .registration-container {
        width: 90%;
        flex: 0 0 90%;
        max-width: 90%;
    }


    .registration-card {
        border-radius: 14px;
    }


    .registration-card .card-body {
        padding: 1rem;
    }


    .logo {
        width: 90px;
    }


    .section-title {
        font-size: 1rem;
        padding-left: 8px;
    }


    .camera-container video,
    .camera-container canvas,
    .camera-container img {
        max-height: 400px;
    }

}
/* ==========================================================
   PASSWORD STRENGTH METER
========================================================== */

.password-strength {
    width: 100%;
}

.password-strength-bars {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.strength-segment {
    display: block;
    flex: 1;
    min-width: 0;
    height: 6px;
    background-color: #e8e8e8;
    transition: background-color 180ms ease;
}

.strength-segment.is-weak {
    background-color: #ff2538;
}

.strength-segment.is-medium {
    background-color: #ffd52a;
}

.strength-segment.is-strong {
    background-color: #19bd45;
}

.password-strength-label {
    margin-top: 8px;
    min-height: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.password-strength-label.is-weak {
    color: #ff2538;
}

.password-strength-label.is-medium {
    color: #e0b800;
}

.password-strength-label.is-strong {
    color: #19a83d;
}

@media (prefers-reduced-motion: reduce) {
    .strength-segment {
        transition: none;
    }
}


/* Reserve space for contact-number validation messages */
#contactNumberMessage {
    min-height: 2.8em;
    line-height: 1.4;
    overflow-wrap: break-word;
}



/* Required field indicator */
.required-indicator {
    color: #ff0000;
    font-weight: 800;
    font-size: 1.15em;
    margin-left: 3px;
}

/* Password visibility toggle */
.password-field-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.password-field-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 2.5rem;
    height: 2.5rem;
    padding: 0;

    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #6c757d;

    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle i {
    font-size: 1.15rem;
    line-height: 1;
}

.password-toggle:hover {
    color: #315f91;
}

.password-toggle:focus-visible {
    outline: 2px solid #315f91;
    outline-offset: 1px;
}

.password-toggle:active {
    background: rgba(49, 95, 145, 0.08);
}