/* Authentication Design System Styles */
/* Used by: login.html, mfa_verify.html, mfa_setup.html, mfa_trouble.html, password_reset_confirmation.html */

/* ==================================================================================
   CSS Variables & Global Styles
   ================================================================================== */

:root {
    --color-primary: #195186;
    --color-grey: #5E5E5E;
    font-family: 'Inria Sans' !important;
}

input:-internal-autofill-selected {
    background-color: inherit !important;
}

/* ==================================================================================
   Login Page Layout
   ================================================================================== */

/* Custom styles for full-page background */
body, html {
    height: 100%;
    margin: 0;
    overflow: hidden;
    user-select: none;
}

.login-page {
    background-image: url('../../assets/img/truck6.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.login-box {
    background: white;
    padding: 2rem;
    width: 450px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-radius: 20px;
}

/* ==================================================================================
   Form Input Styles
   ================================================================================== */

/* Custom Input Field Styles */
.custom-input {
    width: 100%;
    height: 45px;
    border-radius: 8px !important;
    border: 1px solid #E5E5E5 !important;
    padding: 12px 16px !important;
}

/* Legacy input styles (for backward compatibility) */
.input, .input:-webkit-autofill {
    background-color: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    border-radius: 1.15rem;
    padding: .5rem 1.5rem;
}

input::placeholder {
    color: #c7c7c7 !important;
    opacity: 1;
    font-weight: 400;
}

/* ==================================================================================
   Button Styles
   ================================================================================== */

/* Button Primary */
.button-primary {
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    padding: 12px 24px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-primary);
    color: white !important;
    transition: opacity 300ms ease-out;
}

.button-primary:hover {
    background-color: #164a73;
}

.button-primary:active {
    animation: dissolve 300ms ease-out;
}

/* Button Secondary */
.button-secondary {
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    padding: 12px 24px;
    border: 1px solid var(--color-grey);
    background-color: white;
    color: var(--color-grey) !important;
    transition: opacity 300ms ease-out;
}

.button-secondary:hover {
    background-color: #f5f5f5;
}

.button-secondary:active {
    animation: dissolve 300ms ease-out;
}

/* ==================================================================================
   Animations
   ================================================================================== */

@keyframes dissolve {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.7;
    }
}

/* ==================================================================================
   Login-Specific Styles
   ================================================================================== */

.screen-title {
    color: var(--color-primary);
    font-size: 32px;
    font-weight: 600;
}

.screen-subtitle {
    color: var(--color-grey);
    font-size: 16px;
    font-weight: 400;
}

.forgot-link {
    color: var(--color-primary) !important;
}

/* Remove hover color change effect for password toggle icon */
#passwordTogglerIcon:hover,
#passwordToggler:hover #passwordTogglerIcon {
    color: #5D6166 !important;
}

#passwordTogglerIcon {
    transition: all 0.3s ease;
}

#passwordTogglerIcon:hover {
    color: #fff;
    transition: all 0.3s ease;
}

/* ==================================================================================
   MFA-Specific Component Styles
   ================================================================================== */

.mfa-main-container {
    width: 450px;
    border-radius: 20px;
    padding: 40px;
    gap: 32px;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.heading-container {
    width: 100%;
    gap: 8px;
    display: flex;
    flex-direction: column;
}

.heading-container h2 {
    font-weight: 600;
    font-size: 24px;
    line-height: 100%;
    text-align: center;
    margin: 0;
}

.heading-container p {
    font-weight: 450;
    font-size: 16px;
    line-height: 100%;
    text-align: center;
    margin: 0;
    color: #5E5E5E;
}

/* MFA Verify Specific */
.mfa-verify {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trouble-link {
    font-weight: 450;
    font-size: 14px;
    letter-spacing: 0%;
    text-align: center;
    color: var(--color-primary);
    text-decoration: none;
}

.trouble-link:hover {
    text-decoration: underline;
}

/* MFA Setup Specific */
.mfa-setup-container {
    width: 100%;
    gap: 24px;
    display: flex;
    flex-direction: column;
}

.qr-code-image {
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.qr-code-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.manual-key-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.manual-key-label {
    font-weight: 400;
    font-size: 16px;
}

.manual-key-secret {
    font-weight: 600;
    font-size: 16px;
}

.secret-key-display {
    width: 100%;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background-color: #f9f9f9;
    position: relative;
    overflow-x: hidden;
    padding: 8px 16px;
}

.secret-key-text {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-icon {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 24px;
    transition: 0.2s ease;
    z-index: 10;
    margin: 0;
    background-color: #f9f9f9;
    border-radius: 0 8px 8px 0;
    border-left: 1px solid #E5E5E5;
}

.copy-icon:hover {
    background-color: #f0f0f0;
}

/* MFA Trouble Specific */
.trouble-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Buttons Container (used across MFA pages) */
.buttons-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Override for trouble page */
.trouble-content .buttons-container {
    flex-direction: column;
    gap: 16px;
}

.trouble-content .button-secondary {
    width: 100%;
}

/* ==================================================================================
   Legacy Styles (for backward compatibility)
   ================================================================================== */

a {
    transition: all .25s ease;
}

a:hover {
    transition: all .25s ease;
}

.has-floating-label label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: .75rem;
    color: grey;
    opacity: 0;
    transition: all 0.3s ease;
    padding-top: 5px;
}

.has-floating-label > input:focus + label,
.control .input:not(:placeholder-shown) + label {
    top: 11px;
    left: 23px;
    font-size: 0.75rem;
    opacity: 1;
    color: #ccc;
}

.has-floating-label .input:not(:placeholder-shown) {
    padding-top: 15px;
    padding-bottom: 3px;
}

.has-floating-label > input:focus::placeholder,
input:-webkit-autofill:focus {
    color: transparent !important;
}
