/* Basic Setup */
@font-face {
    font-family: "Montserrat";
    src: url("/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("/fonts/Montserrat-Italic-VariableFont_wght.ttf")
        format("truetype");
    font-weight: 100 900;
    font-style: italic;
}

:root {
    --primary-color: #fff;
    --secondary-color: #20409a;
    --secondary-color-hover: #142e6c;
    --background-color: #e6ecf8;
    --dark-text: #2e2e2e;
    --dark-highlight-text: #142e6c;
    --footer-text: #2b2a2a;
    --accent-red: #c01d1d;
}

body {
    background: url("/images/bg_welcome_ks_poin_again.jpg");
    background-size: cover;
    background-repeat: repeat;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    color: var(--dark-text);
}

body * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body h1 {
    font-size: 36px;
    line-height: 40px;
    font-weight: 700;
}

body h2 {
    font-size: 30px;
    line-height: 34px;
    font-weight: 700;
}

body h3 {
    font-size: 24px;
    line-height: 28px;
    font-weight: 600;
}

body h4 {
    font-size: 20px;
    font-weight: 600;
}

body .cta-text {
    font-size: 18px;
}

body p {
    font-size: 16px;
}

body a {
    text-decoration: none;
}

body footer,
.footer-text,
.footer-text-ojk {
    font-size: 12px;
}

.footer-text {
    font-weight: 600;
}

.btn-primary {
    background-color: var(--secondary-color) !important;
    border: none;
    padding: 12px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 0 !important;
}

.btn-primary:hover {
    background-color: var(--secondary-color-hover) !important;
}

footer {
    text-align: justify;
    font-style: italic;

    color: var(--primary-color);
    position: absolute;
    left: 115px;
    bottom: 25px;
    font-size: 11px;
    margin-right: 50px;
    width: 45%;
}

footer a {
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.footer-text-ojk:first-of-type {
    margin-bottom: 5px;
}

/* Signup-Login Header Styling */
.navbar-logo {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 36px;
    margin-top: 50px;
}

.login-signup-logo {
    width: 160px;
    margin: 0 auto 1rem;
}

.login-signup-title {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Main Content Styling */
.card-container {
    /* border: 1px solid red; */
    position: absolute;
    right: 10vw;
}
.custom-card {
    background: var(--primary-color);
    border-radius: 12px;
    box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    padding: 56px 50px;
    position: relative;
}

.card-body {
    padding: 0 !important;
}

.card-body .card-title {
    color: var(--secondary-color);
    margin-bottom: 36px;
    text-align: center;
}

.card-body p {
    text-align: center;
}

/* Form Styling */
.input-group {
    width: 100%;
    height: 48px;
}

.input-group .input-group-text {
    background-color: var(--primary-color);
}

input.form-control {
    border-radius: 6px;
    padding: 12px;
    border-left: none !important;
}

input.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(11, 79, 159, 0.25);
}

/* Input khusus password */
.input-group-password {
    display: flex;
}

.password-toggle-wrapper {
    position: relative;
    flex: 1;
}

.password-toggle-wrapper input {
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
}

.password-toggle {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0 15px;
    color: #6c757d;
    transition: color 0.3s ease;
    position: absolute;
    right: 10px;
    top: 5%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    z-index: 5;
}

input.password-input {
    padding-right: 40px;
    /* Memberi ruang untuk icon */
}

.input-group-text.no-bg {
    background-color: transparent !important;
    border-left: none;
}

input::placeholder {
    opacity: 0.6 !important;
    font-size: 16px;
}

#passwordInput::placeholder,
#passwordConfirm::placeholder {
    font-size: 14px !important;
}

.error-konfirmasi-password {
    color: var(--accent-red);
    font-size: 12px;
}

.hidden {
    display: none;
}

.lupa-password {
    color: var(--secondary-color);
    display: block;
    text-align: right;
    margin-bottom: 24px;
}

.login-link,
.signup-link,
.resend-link {
    text-align: center;
}

.login-link a,
.signup-link a,
.resend-link,
.resend-link button {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
}

.login-link span,
.signup-link span,
.resend-link button {
    color: var(--dark-highlight-text);
}

.login-link span,
.signup-link span {
    font-weight: 700;
}

/* CSS for OTP */
.otp-inputs input {
    flex: 1;
    outline: none;
    border: none;
}

.otp-inputs {
    display: flex;
    gap: 2px;
    margin-top: 36px;
    margin-bottom: 24px;
}

.otp-form {
    margin-left: -20px;
    margin-right: -20px;
}

.timer-div {
    height: 15px;
    text-align: center;
}

/* CSS set password */
.password-criteria {
    background-color: var(--background-color);
    padding: 12px;
    border-radius: 6px;
}

.password-criteria ul {
    font-weight: normal;
    padding-left: 10px;
}

ul li {
    margin-bottom: 6px;
}

ul li::marker {
    font-size: 0.4em;
    /* increase or decrease bullet size */
}

button {
    margin: 24px 0;
}

.navbar-logo img {
    width: 200px;
}

.alert-danger strong {
    font-size: 14px;
}

/* Hide Edge's native eye icon in password fields */
input::-ms-reveal {
    display: none;
}

input::-ms-clear {
    display: none;
}

input[type="password"]::-ms-reveal {
    display: none;
}

/* For iphone SE */
@media (max-width: 400px) and (max-height: 750px) {
    .card-container {
        margin-top: 0px !important;
    }
}

@media (max-width: 575px) {
    .alert-danger strong {
        font-size: 12px;
    }

    .card-container {
        margin-top: 50px;
    }
}

/* Media Query for background adjustment */
@media (max-width: 1368px) {
    body {
        background-position: -100px center;
    }
}

@media (max-width: 1268px) {
    body {
        background-position: -185px center;
    }
}

@media (max-width: 1154px) {
    body {
        background-position: -210px center;
    }

    .card-container {
        right: 5vw;
    }
}

/* Media query for layouting */
@media (max-width: 1024px) {
    body {
        font-size: 14px;
        background: url("/images/bg_welcome_ks_poin_mobile.jpg");
        background-position-x: center;
        background-repeat: no-repeat;
        background-color: #1375cc;
        justify-content: space-around;
    }

    .card-container {
        position: static;
    }

    .navbar-logo {
        /* margin-top: -35px; */
        margin-bottom: 12px;
    }

    .custom-card {
        padding: 24px 16px;
    }

    .input-group {
        height: 44px;
    }

    input::placeholder {
        font-size: 14px;
    }

    body h1 {
        font-size: 24px;
        line-height: 32px;
    }

    body h2 {
        font-size: 20px;
        line-height: 28px;
    }

    body h3 {
        font-size: 18px;
        line-height: 24px;
    }

    /* ini tuh subtitle di figma nya */
    body h4 {
        font-size: 16px;
        line-height: 22px;
    }

    body p {
        font-size: 14px;
        line-height: 20px;
    }

    body .cta-text {
        font-size: 16px;
        line-height: 22px;
    }

    body footer {
        position: static;
        margin: 0 auto;
        width: 100%;
        text-align: center;
    }

    .otp-form {
        margin: 0;
    }

    .navbar-logo img {
        width: 120px;
    }

    .footer-text-ojk {
        font-size: 11px;
    }
}

@media (max-width: 1024px) and (min-height: 760px) {
    .card-container {
        margin-top: 50px;
    }
}

@media (max-width: 1024px) and (min-height: 600px) and (max-height: 750px) {
    body {
        background-position-y: -40px;
        padding-top: 50px;
    }
}

@media (max-width: 1024px) and (min-height: 940px) and (max-height: 1091px) {
    body {
        background-position-y: 150px;
    }

    .card-container {
        padding-top: 140px;
    }
}

@media (max-width: 1024px) and (min-height: 1092px) and (max-height: 1210px) {
    body {
        background-position-y: 250px;
        background-color: #1375cc;
    }

    .card-container {
        padding-top: 220px;
    }
}

@media (max-width: 1024px) and (min-height: 1211px) and (max-height: 1280px) {
    body {
        background-position-y: 340px;
        background-color: #1375cc;
    }

    .card-container {
        padding-top: 320px;
    }
}

@media (max-width: 1024px) and (min-height: 1281px) and (max-height: 1380px) {
    body {
        background-position-y: 430px;
        background-color: #1375cc;
    }

    .card-container {
        padding-top: 380px;
    }
}
