/* Login Page Specific Styles */

/* Logo */
.logo-main {
    width: 260px;
    height: auto;
    display: block;
}

/* Icon sizes */
.icon-sm {
    font-size: 20px;
}

.icon-lg {
    font-size: 48px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

@keyframes login-card-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    15%,
    45%,
    75% {
        transform: translateX(-10px);
    }

    30%,
    60%,
    90% {
        transform: translateX(10px);
    }
}

.login-card.login-card-shake {
    animation: login-card-shake 0.42s ease-in-out;
}

#password.is-invalid {
    border-color: var(--wb-danger);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.16);
}

#password.is-invalid:focus {
    border-color: var(--wb-danger);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.22);
}

[data-bs-theme="dark"] #password.is-invalid {
    background-color: rgba(220, 53, 69, 0.08);
}

/* OTP Digit Input Styling */
.otp-digits-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
}

.otp-digits-container.d-none {
    display: none !important;
}

.otp-digit {
    flex: 0 0 auto;
    width: 44px;
    height: 52px;
    font-size: 1.25rem;
    line-height: 52px;
    padding: 0;
    min-height: 0;
    text-align: center;
    border-radius: var(--wb-radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-weight: 500;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

.otp-digit:invalid {
    box-shadow: none;
    outline: none;
    color: inherit;
    border-color: var(--bs-border-color);
}

.otp-separator {
    flex: 0 0 auto;
    padding: 0 2px;
    color: var(--bs-secondary);
}

/* OTP error shake animation */
@keyframes otp-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    50%,
    90% {
        transform: translateX(-4px);
    }

    30%,
    70% {
        transform: translateX(4px);
    }
}

.otp-digit.otp-error {
    border-color: var(--wb-danger) !important;
    color: var(--wb-danger) !important;
    animation: otp-shake 0.5s ease-in-out;
}

/* Theme toggle button */
.theme-toggle-btn {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
}

.theme-icon {
    vertical-align: middle;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 400px) {
    .otp-digits-container {
        gap: 0.25rem;
    }

    .otp-digit {
        width: 38px;
        height: 46px;
        font-size: 1.1rem;
        line-height: 46px;
    }

    .otp-separator {
        padding: 0;
    }
}

@media (max-width: 340px) {
    .otp-digit {
        width: 34px;
        height: 42px;
        font-size: 1rem;
        line-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card.login-card-shake {
        animation: none;
    }
}