/**
 * ISC License
 *
 * Copyright (c) 2026 idnovate.com
 * idnovate is a Registered Trademark & Property of idnovate.com, innovación y desarrollo SCP
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 *
 * @author    idnovate
 * @copyright 2026 idnovate.com
 * @license   https://www.isc.org/licenses/ https://opensource.org/licenses/ISC ISC License
 */

/* loginotp — front-office styles */

/* Intro text shown above the email field in OTP-only mode */
.loginotp-intro {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #6c757d;
}

#loginotp-panel {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

/* Prevent flicker before JS transforms the login form */
#login-form .form-group:has(input[type="password"]),
#login-form .mb-3:has(input[type="password"]) {
    display: none !important;
}

#login-form [type="submit"] {
    display: none !important;
}

#login-form .forgot-password,
#login-form .login__forgot-password,
#login-form [href*="password-recovery"],
#login-form [href*="forgot"] {
    display: none !important;
}

/* Digit input grid */
.loginotp-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.loginotp-digits-group {
    display: flex;
    gap: 8px;
}

.loginotp-sep {
    font-size: 22px;
    color: #aaa;
    margin: 0 4px;
    line-height: 1;
    align-self: center;
}

.loginotp-digit {
    width: 48px;
    height: 56px;
    border: 2px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #222;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
    padding: 0;
}

.loginotp-digit::-webkit-inner-spin-button,
.loginotp-digit::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.loginotp-digit:focus {
    border-color: #25b9d7;
    box-shadow: 0 0 0 3px rgba(37, 185, 215, 0.15);
}

.loginotp-digit.is-filled {
    border-color: #25b9d7;
}

/* Responsive: smaller screens */
@media (max-width: 400px) {
    .loginotp-digit {
        width: 38px;
        height: 46px;
        font-size: 20px;
    }

    .loginotp-digits {
        gap: 4px;
    }

    .loginotp-digits-group {
        gap: 4px;
    }
}
