@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");


/* ========================================= */
/* ENROLLMENT */
/* ========================================= */

.enrollment-page,
.enrollment-page * {
    box-sizing: border-box;
    font-family: "Poppins", Arial, sans-serif;
}


.enrollment-page {
    min-height: 100vh;
    padding: 24px 0 18px;
    background: #f4f6f9;
    color: #333333;
}


/* ========================================= */
/* MAIN CONTAINER */
/* ========================================= */

.enrollment-page .container {
    width: min(
        1450px,
        calc(100% - 40px)
    );

    margin: 0 auto;
    padding: 0;
}


/* ========================================= */
/* HEADER */
/* ========================================= */

.header {
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 20px;

    background:
        linear-gradient(
            rgba(128, 0, 0, 0.88),
            rgba(128, 0, 0, 0.88)
        ),
        url("../images/cnhs-building.jpg");

    background-position: center;
    background-size: cover;

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.15);
}


.header-overlay {
    padding: 28px 40px;
}


.school-info {
    display: flex;
    align-items: center;
    gap: 20px;
}


.school-text h1 {
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
}


.school-text p {
    margin-top: 5px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
}


/* ========================================= */
/* CARDS */
/* ========================================= */

.card {
    width: 100%;
    margin-bottom: 14px;
    padding: 30px;
    background: #ffffff;
    border-radius: 18px;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.08);
}


.card h2 {
    margin-bottom: 18px;
    color: #292929;
    font-size: 1.45rem;
    line-height: 1.25;
}


/* ========================================= */
/* SECTION TITLE */
/* ========================================= */

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #800000;
    font-size: 28px;
    font-weight: 600;
}


.section-title i {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #800000;
    color: #ffffff;
    font-size: 18px;
}


/* ========================================= */
/* FORM GRID */
/* ========================================= */

.grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 24px 20px;
}


/* ========================================= */
/* FORM GROUP */
/* ========================================= */

.form-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
}


.form-group label {
    margin-bottom: 8px;
    color: #444444;
    font-weight: 500;
}


/* ========================================= */
/* REQUIRED STAR */
/* ========================================= */

.required-star {
    color: #d00000;
    font-weight: 700;
    margin-left: 2px;
}


/* ========================================= */
/* NORMAL INPUT / SELECT */
/* ========================================= */

.enrollment-page input,
.enrollment-page select {
    width: 100%;
    max-width: 100%;
    height: 50px;
    padding: 0 15px;

    border:
        1px solid
        #d7dce2;

    border-radius: 10px;
    background: #ffffff;
    color: #333333;
    font-size: 15px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}


/* ========================================= */
/* FOCUS */
/* ========================================= */

.enrollment-page input:focus,
.enrollment-page select:focus {
    border-color: #800000;
    outline: none;

    box-shadow:
        0 0 0 4px
        rgba(128, 0, 0, 0.12);
}


/* ========================================= */
/* DISABLED */
/* ========================================= */

.enrollment-page input:disabled,
.enrollment-page select:disabled {
    background: #eeeeee;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.8;
}


/* ========================================= */
/* READONLY */
/* ========================================= */

.enrollment-page input[readonly] {
    background: #fafafa;
}


/* ========================================= */
/* PLACEHOLDER */
/* ========================================= */

.enrollment-page input::placeholder {
    color: #9a9a9a;
    opacity: 1;
}


/* ========================================= */
/* SELECT PLACEHOLDER */
/* ========================================= */

.enrollment-page select:invalid {
    color: #9a9a9a;
}


.enrollment-page select option {
    color: #333333;
}


/* ========================================= */
/* BIRTHDATE */
/* ========================================= */

.birthdate-wrapper {
    position: relative;
    width: 100%;
}


.birthdate-wrapper #birthdate_display {
    width: 100%;
    padding-right: 52px;
    cursor: pointer;
}


/* ========================================= */
/* HIDDEN NATIVE DATE PICKER */
/* ========================================= */

.birthdate-picker-hidden {
    position: absolute;

    width: 1px !important;
    height: 1px !important;

    right: 10px;
    bottom: 0;

    padding: 0 !important;
    border: none !important;

    opacity: 0;
    pointer-events: none;
}


/* ========================================= */
/* CALENDAR ICON */
/* ========================================= */

.calendar-button {
    position: absolute;

    top: 50%;
    right: 10px;

    transform:
        translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;
    border: none;
    border-radius: 8px;

    background: transparent;
    color: #666666;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


.calendar-button svg {
    display: block;
    width: 20px;
    height: 20px;
}


.calendar-button:hover {
    background:
        rgba(128, 0, 0, 0.08);

    color: #800000;
}


.calendar-button:focus {
    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(128, 0, 0, 0.12);
}


/* ========================================= */
/* AGE */
/* ========================================= */

#age {
    cursor: default;
}


/* ========================================= */
/* PHONE INPUT WITH +63 */
/* ========================================= */

.phone-input-wrapper {
    display: flex;
    align-items: center;

    width: 100%;
    height: 50px;

    overflow: hidden;

    border:
        1px solid
        #d7dce2;

    border-radius: 10px;

    background: #ffffff;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.phone-input-wrapper:focus-within {
    border-color: #800000;

    box-shadow:
        0 0 0 4px
        rgba(128, 0, 0, 0.12);
}


/* ========================================= */
/* +63 PREFIX */
/* ========================================= */

.country-code {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    height: 100%;

    padding: 0 16px;

    border-right:
        1px solid
        #d7dce2;

    background: #fafafa;

    color: #333333;

    font-size: 15px;
    font-weight: 500;

    white-space: nowrap;
}


/* ========================================= */
/* PHONE NUMBER TEXTBOX */
/* ========================================= */

.enrollment-page
.phone-input-wrapper
#parentcontact_display {
    flex: 1;

    width: 100%;
    min-width: 0;
    height: 100%;

    padding: 0 15px;

    border: none;
    border-radius: 0;

    background: transparent;

    color: #333333;

    font-size: 15px;

    outline: none;
    box-shadow: none;
}


.enrollment-page
.phone-input-wrapper
#parentcontact_display:focus {
    border: none;
    outline: none;
    box-shadow: none;
}


.enrollment-page
.phone-input-wrapper
#parentcontact_display::placeholder {
    color: #9a9a9a;
    opacity: 1;
}


/* ========================================= */
/* SUBMIT BUTTON */
/* ========================================= */

.submit {
    margin: 18px 0 8px;
    text-align: center;
}


.submit button {
    padding: 16px 70px;
    border: none;
    border-radius: 10px;

    background:
        linear-gradient(
            to right,
            #800000,
            #b00000
        );

    color: #ffffff;

    font-size: 18px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.submit button:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 12px 25px
        rgba(128, 0, 0, 0.25);
}


.submit button:active {
    transform:
        translateY(0);

    box-shadow: none;
}


/* ========================================= */
/* SUCCESS MODAL */
/* ========================================= */

.success-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 10000;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.55);

    backdrop-filter: blur(2px);

    overscroll-behavior: contain;
}


.success-modal.show {
    display: flex;
}


/* ========================================= */
/* SUCCESS MODAL CONTENT */
/* ========================================= */

.success-modal-content {
    width: 420px;
    max-width: 100%;

    padding:
        36px 30px 30px;

    border-radius: 16px;

    background: #ffffff;

    text-align: center;

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.18);

    animation:
        successModalIn
        0.25s ease;

    font-family:
        Arial,
        sans-serif;
}


/* FORCE ARIAL */
.success-modal-content,
.success-modal-content * {
    font-family:
        Arial,
        sans-serif;
}


/* ========================================= */
/* SUCCESS ICON */
/* ========================================= */

.success-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 78px;
    height: 78px;

    margin:
        0 auto 20px;

    border-radius: 50%;

    background: #e7f6ec;

    color: #198754;
}


.success-icon svg {
    width: 38px;
    height: 38px;
}


/* ========================================= */
/* SUCCESS TITLE */
/* ========================================= */

.success-modal-content h2 {
    margin:
        0 0 10px;

    color: #1f2937;

    font-size: 26px;

    font-weight: 700;

    line-height: 1.25;
}


/* ========================================= */
/* SUCCESS MESSAGE */
/* ========================================= */

.success-modal-content p {
    margin:
        0 0 28px;

    color: #667085;

    font-size: 15px;

    font-weight: 400;

    line-height: 1.6;
}


/* ========================================= */
/* SUCCESS BUTTON */
/* ========================================= */

.success-modal-button {
    width: 100%;

    max-width: 275px;

    height: 48px;

    padding:
        0 25px;

    border: none;

    border-radius: 8px;

    background:
        linear-gradient(
            to right,
            #800000,
            #b00000
        );

    color: #ffffff;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.success-modal-button:hover {
    background: #900000;

    box-shadow:
        0 8px 18px
        rgba(128, 0, 0, 0.22);
}


.success-modal-button:active {
    transform:
        scale(0.97);
}


.success-modal-button:focus {
    outline: none;

    box-shadow:
        0 0 0 4px
        rgba(128, 0, 0, 0.12);
}


/* ========================================= */
/* SUCCESS MODAL ANIMATION */
/* ========================================= */

@keyframes successModalIn {

    from {
        opacity: 0;

        transform:
            translateY(10px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* ========================================= */
/* PAGE SCROLL LOCK */
/* ========================================= */

/*
Kapag may confirmation modal o success modal,
hindi maaaring i-scroll ang page sa likod.
*/

html:has(body.modal-open) {
    overflow: hidden;
}


body.modal-open {
    overflow: hidden;

    height: 100vh;

    overscroll-behavior: none;
}


/* Confirmation and success overlay */
.confirm-modal,
.success-modal {
    overscroll-behavior: contain;
}


/*
Confirmation modal body can still scroll
kapag mahaba ang laman.
*/

.confirm-body {
    overscroll-behavior: contain;
}


/* ========================================= */
/* TABLET */
/* ========================================= */

@media (max-width: 992px) {

    .enrollment-page .container {
        width: min(
            900px,
            calc(100% - 32px)
        );
    }


    .grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .school-text h1 {
        font-size: 36px;
    }


    .school-text p {
        font-size: 20px;
    }
}


/* ========================================= */
/* MOBILE */
/* ========================================= */

@media (max-width: 768px) {

    .enrollment-page {
        padding:
            18px 0 16px;
    }


    .enrollment-page .container {
        width:
            calc(100% - 32px);
    }


    .header-overlay {
        padding: 20px;
    }


    .school-info {
        flex-direction: column;
        text-align: center;
    }


    .school-text h1 {
        font-size: 30px;
    }


    .school-text p {
        font-size: 18px;
    }


    .grid {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 20px;
    }


    .card {
        margin-bottom: 14px;

        padding:
            24px 20px;

        border-radius: 14px;
    }


    .card h2 {
        margin-bottom: 18px;

        font-size: 1.35rem;

        line-height: 1.3;
    }


    .enrollment-page input,
    .enrollment-page select {
        height: 50px;
    }


    .calendar-button {
        width: 36px;
        height: 36px;

        right: 8px;
    }


    .calendar-button svg {
        width: 19px;
        height: 19px;
    }


    .birthdate-wrapper
    #birthdate_display {
        padding-right: 48px;
    }


    .submit {
        width: 100%;

        margin:
            20px 0 6px;
    }


    .submit button {
        width: 100%;

        padding:
            15px 20px;
    }


    .success-modal-content {
        width: 390px;

        padding:
            32px 26px 27px;
    }


    /* LOCK MOBILE PAGE */
    body.modal-open {
        overflow: hidden;

        height: 100vh;

        touch-action: none;
    }


    /* Allow confirmation content itself to scroll */
    .confirm-body {
        touch-action: pan-y;

        overflow-y: auto;

        -webkit-overflow-scrolling: touch;
    }
}


/* ========================================= */
/* SMALL MOBILE */
/* ========================================= */

@media (max-width: 480px) {

    .enrollment-page {
        padding:
            14px 0 12px;
    }


    .enrollment-page .container {
        width:
            calc(100% - 24px);
    }


    .card {
        padding:
            22px 16px;
    }


    .card h2 {
        font-size: 1.25rem;
    }


    .school-info img {
        width: 70px;
        height: 70px;
    }


    .school-text h1 {
        font-size: 24px;
    }


    .school-text p {
        font-size: 16px;
    }


    .section-title {
        font-size: 22px;
    }


    .form-group label {
        font-size: 0.95rem;
    }


    .enrollment-page input,
    .enrollment-page select {
        font-size: 14px;
    }


    .calendar-button {
        width: 34px;
        height: 34px;
    }


    .calendar-button svg {
        width: 18px;
        height: 18px;
    }


    .birthdate-wrapper
    #birthdate_display {
        padding-right: 45px;
    }


    .country-code {
        padding: 0 13px;

        font-size: 14px;
    }


    .enrollment-page
    .phone-input-wrapper
    #parentcontact_display {
        font-size: 14px;
    }


    /* SUCCESS MODAL MOBILE */

    .success-modal {
        padding: 16px;
    }


    .success-modal-content {
        width: 100%;

        max-width: 380px;

        padding:
            30px 22px 24px;

        border-radius: 14px;
    }


    .success-icon {
        width: 68px;
        height: 68px;

        margin-bottom: 18px;
    }


    .success-icon svg {
        width: 34px;
        height: 34px;
    }


    .success-modal-content h2 {
        font-size: 22px;
    }


    .success-modal-content p {
        font-size: 14px;

        margin-bottom: 24px;
    }


    .success-modal-button {
        max-width: 100%;

        height: 46px;

        font-size: 14px;
    }
}
/* Keep the country code and mobile digits aligned as one number. */
.enrollment-page .phone-input-wrapper .country-code {
    padding: 0 8px 0 16px;
    border-right: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
}

.enrollment-page .phone-input-wrapper #parentcontact_display {
    padding: 0 16px 0 0;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
