/* eTasjil V2.0 - register only (loaded after auth.css), incl. email guideline popup */
/* Wider box for the register form (same theme as /login) */
.login-page .login-box {
    max-width: 560px;
    margin: 0 auto;
}

/* Selects: same look as inputs, custom arrow */
.login-card-body .input-group select.form-control {
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    text-overflow: ellipsis;
}

/* Citizenship select has no icon on the right: full rounded field */
.login-card-body #warga {
    border-right: 1.5px solid var(--lm-line);
    border-radius: 14px !important;
}

.login-card-body .input-group:focus-within #warga {
    border-color: var(--lm-primary);
}

/* Helper texts under fields */
.login-card-body .form-text {
    width: 100%;
    margin-top: .4rem;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--lm-muted) !important;
}

.login-card-body #passwordError,
.login-card-body #passwordConfirmationError {
    width: 100%;
    margin-top: .3rem;
    font-size: .8rem;
    font-weight: 600;
}

/* Email guideline / email error box */
.login-card-body #email-error {
    margin-top: .5rem;
    padding: .75rem .9rem .75rem 1rem;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b !important;
    font-size: .8rem;
    line-height: 1.5;
}

.login-card-body #email-error ol {
    padding-left: 1.1rem;
}

.login-card-body #email-error li + li {
    margin-top: .2rem;
}

.login-card-body #email-error code {
    padding: .05rem .3rem;
    border-radius: 6px;
    background: #fee2e2;
    color: #b91c1c;
}

.login-box .card-footer {
    justify-content: center;
    color: var(--lm-muted);
}

@media (max-width: 480px) {
    .login-card-body #email-error { font-size: .75rem; }
}

/* Email guideline modal */
.email-guideline-modal {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    max-height: 92vh;
}

.email-guideline-modal .modal-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.email-guideline-modal .modal-header {
    background: linear-gradient(135deg, #1b2756, #2f5bd3);
    color: #fff;
    border-bottom: none;
    padding: 1.5rem 1.75rem;
    align-items: center;
    gap: .75rem;
}

.email-guideline-modal .eg-header-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.email-guideline-modal .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

.email-guideline-modal .modal-body {
    padding: 1.75rem;
    background: #f7f9fc;
}

/* English line under each Malay line */
.email-guideline-modal .eg-en {
    display: block;
    margin-top: .15rem;
    font-size: .85em;
    font-weight: 500;
    font-style: italic;
    opacity: .8;
}

/* Big red warning: parents' email */
.eg-danger {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid #ef4444;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
    animation: eg-pulse 2s ease-in-out 2;
}

@keyframes eg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, .2); }
}

.eg-danger-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #dc2626;
    color: #fff;
    font-size: 1.4rem;
}

.eg-danger-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.eg-danger-en {
    margin-top: .15rem;
    font-size: 1rem;
    font-weight: 700;
    font-style: italic;
    color: #b91c1c;
}

.eg-card {
    background: #fff;
    border-radius: 10px;
    padding: .6rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    border-top: 4px solid #2f5bd3;
}

.eg-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eg-list li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2d3d;
    padding: .55rem .25rem;
    border-bottom: 1px dashed #e7ecf3;
}

.eg-list li:last-child {
    border-bottom: none;
}

.eg-icon {
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.eg-note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: 1rem;
    background: #eaf2ff;
    border: 1px solid #cfe0fb;
    border-radius: 10px;
    padding: .9rem 1.1rem;
    color: #1f2d3d;
    font-size: .95rem;
}

.eg-note > .fas {
    margin-top: .2rem;
    color: #2f5bd3;
}

.eg-ack {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: 1rem 0 0;
    padding: .85rem 1rem;
    background: #fff8e1;
    border: 1px solid #f0d98c;
    border-radius: 10px;
    font-weight: 700;
    font-size: .95rem;
    color: #6b4e00;
    cursor: pointer;
}

.eg-ack input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: .15rem;
    flex: 0 0 auto;
    cursor: pointer;
}

.email-guideline-modal .modal-footer {
    border-top: none;
    padding: 1.25rem 1.75rem 1.75rem;
    background: #f7f9fc;
}

.eg-btn-confirm:disabled {
    background: #c3cbd6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Mobile fit */
@media (max-width: 576px) {

    .modal-dialog.modal-lg {
        margin: .35rem;
        max-width: calc(100% - .7rem);
    }

    .email-guideline-modal .modal-header {
        padding: .6rem .75rem;
        gap: .4rem;
    }

    .email-guideline-modal .eg-header-icon {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: .8rem;
    }

    .email-guideline-modal .modal-title {
        font-size: .82rem;
    }

    .email-guideline-modal .modal-body {
        padding: .65rem;
        max-height: 65vh;
    }

    .eg-danger {
        gap: .6rem;
        margin-bottom: .6rem;
        padding: .6rem .7rem;
    }

    .eg-danger-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .eg-danger-title {
        font-size: .9rem;
    }

    .eg-danger-en {
        font-size: .8rem;
    }

    .eg-card {
        padding: .3rem .7rem;
    }

    .eg-list li {
        font-size: .8rem;
        padding: .4rem .15rem;
        gap: .4rem;
    }

    .eg-icon {
        font-size: .85rem;
    }

    .eg-note {
        margin-top: .75rem;
        font-size: .75rem;
        padding: .5rem .6rem;
    }

    .eg-ack {
        margin-top: .75rem;
        align-items: flex-start;
        font-size: .75rem;
        padding: .5rem .6rem;
        gap: .4rem;
    }

    .email-guideline-modal .modal-footer {
        padding: .65rem .75rem .85rem;
    }

    .eg-btn-confirm {
        font-size: .8rem;
        padding: .55rem .8rem;
        white-space: normal;
        text-align: center;
    }
}

.eg-btn-confirm {
    background: linear-gradient(135deg, #1b2756, #2f5bd3);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: .75rem 1.5rem;
    font-weight: 600;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.eg-btn-confirm:hover,
.eg-btn-confirm:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(27, 39, 86, .4);
}
