/* New Login Page Styles - Based on Figma design node-id=217-388 */

/* Sandbox Heading - Based on Figma design node-id=248-135 */
.login-sandbox-heading {
    width: 100%;
    font-family: var(--font-family-heading);
    font-size: 32px; /* Heading/Large */
    font-weight: var(--font-weight-light); /* 300 - Light */
    line-height: 40px;
    color: var(--text-color); /* #1f2931 - Typography/Limed Spruce 500 */
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* Sandbox Divider - Based on Figma design node-id=248-113 */
/* Equal 16px spacing above (from Continue button) and below (to API text) */
.login-sandbox-divider {
    width: calc(100% - 48px); /* wider - 24px margins each side */
    border: none;
    border-top: 1px solid #B0B0B0;
    margin: 8px auto 8px;
}

/* Sandbox API URL - Based on Figma design node-id=248-137 */
.login-sandbox-api {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px - Body/Large */
    font-weight: var(--font-weight-normal); /* 400 - Regular */
    line-height: 24px;
    color: var(--text-color); /* #1f2931 */
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

.login-sandbox-api-link {
    color: #a037c5;
    text-decoration: none;
}

.login-sandbox-api-link:hover {
    color: #a037c5;
    text-decoration: underline;
}

.login-new-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl);
    background-color: var(--background-color); /* #FFFFFF - White background */
}

/* Logo */
.login-new-logo {
    margin-bottom: var(--spacing-2xl);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-new-logo a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-new-logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* Form Wrapper */
.login-new-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.login-new-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Field Groups */
.login-new-field-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.login-new-label {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px */
    font-weight: var(--font-weight-normal);
    color: var(--text-color); /* #1f2931 */
    line-height: var(--line-height-normal);
    margin: 0;
    text-align: left;
}

.login-new-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px - Body/Large */
    font-weight: var(--font-weight-normal);
    color: var(--text-color); /* #1f2931 */
    background-color: var(--background-color); /* #FFFFFF */
    border: 1px solid var(--border-color); /* #E0E0E0 */
    border-radius: 8px;
    transition: all var(--transition-base);
    box-sizing: border-box;
}

.login-new-input::placeholder {
    color: var(--text-muted); /* #8C959E */
    opacity: 1;
}

.login-new-input:focus {
    outline: none;
    border-color: var(--primary-color); /* #126CB8 */
    box-shadow: 0 0 0 3px rgba(18, 108, 184, 0.1);
}

.login-new-input:focus::placeholder {
    color: var(--text-muted);
}

/* Hide browser validation tooltips */
.login-new-input:invalid,
.login-new-input:invalid:focus {
    outline: none;
    box-shadow: none;
}

/* Prevent browser validation tooltip from showing */
.login-new-form {
    /* Disable browser validation tooltips - we use custom error messages */
}

.login-new-input::-webkit-validation-bubble-message {
    display: none;
}

.login-new-input::-webkit-validation-bubble-icon {
    display: none;
}

.login-new-input::-webkit-validation-bubble-arrow {
    display: none;
}

.login-new-input::-webkit-validation-bubble {
    display: none;
}

/* Style invalid state without showing browser tooltip */
.login-new-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
}

.login-new-input:invalid:focus:not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(215, 0, 21, 0.1);
}

/* Input Error State */
.login-new-input-error {
    border-color: var(--error-color) !important;
}

.login-new-input-error:focus {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(215, 0, 21, 0.1) !important;
}

/* Error Message Container */
.login-new-error-message {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding-left: 8px;
    width: 100%;
}

/* Error Icon */
.login-new-error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--error-color);
    fill: var(--error-color);
}

.login-new-error-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Error Text */
.login-new-error-text {
    font-family: var(--font-family-primary);
    font-size: 12px; /* Label/Small */
    font-weight: var(--font-weight-semibold); /* 600 - Semibold */
    line-height: 16px; /* Label/Small line-height */
    color: var(--error-color); /* #D70015 - Core/Error */
    margin: 0;
}

/* General Error Message (for form-level errors) */
.login-new-error {
    color: var(--error-color);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    margin-top: var(--spacing-xs);
    text-align: center;
}

/* Button Wrapper */
.login-new-button-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Continue Button */
.login-new-continue-btn {
    width: auto;
    padding: 12px 24px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px */
    font-weight: var(--font-weight-semibold); /* 600 - Semi-bold for CTA */
    background-color: var(--primary-color); /* #126CB8 - Primary/Denim/300 */
    border: none;
    border-radius: var(--border-radius-pill); /* Pill shape - 50px */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
    position: relative;
}

/* Gradient text effect - white to light blue */
.login-new-continue-btn span {
    background: linear-gradient(to right, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 50%, #B0E0FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.login-new-continue-btn:hover {
    background-color: var(--primary-hover); /* #0f5a9a */
}

.login-new-continue-btn:hover span {
    background: linear-gradient(to right, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 50%, #C0E8FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.login-new-continue-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 108, 184, 0.2);
}

.login-new-continue-btn:active {
    transform: translateY(1px);
}

.login-new-arrow {
    font-size: var(--font-size-lg);
    line-height: 1;
    background: linear-gradient(to right, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 50%, #B0E0FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.login-new-continue-btn:hover .login-new-arrow {
    background: linear-gradient(to right, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 50%, #C0E8FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .login-new-container {
        padding: var(--spacing-md);
        max-width: 100%;
    }
}

/* MFA Delivery Styles - Based on Figma design node-id=217-389 */

/* MFA Delivery Form Wrapper */
.mfa-delivery-form-wrapper {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Override logo margin for MFA delivery to match Figma spacing (32px gap) */
.login-new-container:has(.mfa-delivery-form-wrapper) .login-new-logo {
    margin-bottom: 32px; /* 32px gap as per Figma design */
}

/* MFA Delivery Content */
.mfa-delivery-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* 16px gap between heading, instruction, and buttons as per Figma */
}

/* MFA Delivery Heading */
.mfa-delivery-heading {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl); /* 24px - Heading/Medium */
    font-weight: var(--font-weight-light); /* 300 - Light */
    line-height: 1.333; /* 32px (24px * 1.333) - Heading/Medium line-height */
    color: var(--text-color); /* #1f2931 - Typography/Limed Spruce 500 */
    margin: 0;
    text-align: center;
}

/* MFA Delivery Instruction */
.mfa-delivery-instruction {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px - Body/Large */
    font-weight: var(--font-weight-normal); /* 400 - Regular */
    line-height: var(--line-height-normal); /* 24px */
    color: var(--text-color); /* #1f2931 - Typography/Limed Spruce 500 */
    margin: 0;
    text-align: center;
    max-width: 100%;
}

/* MFA Delivery Form */
.mfa-delivery-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* 16px gap as per Figma */
}

/* MFA Delivery Buttons Container */
.mfa-delivery-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* 16px gap between buttons as per Figma */
}

/* MFA Delivery Button Wrapper */
.mfa-delivery-button-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* MFA Delivery Button */
.mfa-delivery-button {
    width: 100%;
    max-width: 100%;
    padding: 12px 24px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm); /* 14px - CTA/Medium */
    font-weight: var(--font-weight-semibold); /* 600 - Semibold */
    line-height: var(--line-height-cta); /* 16px for CTA/Medium */
    color: #FFFFFF; /* White text */
    background-color: var(--primary-color); /* #126CB8 - Primary/Denim/300 */
    border: none;
    border-radius: var(--border-radius-pill); /* Pill shape - 50px */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mfa-delivery-button:hover {
    background-color: var(--primary-hover); /* #0f5a9a */
}

.mfa-delivery-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 108, 184, 0.2);
}

.mfa-delivery-button:active {
    transform: translateY(1px);
}

/* Loading Indicator - Exigo Logo Spinner */
.login-loader {
    width: 24px;
    height: 24px;
    /* GIF is already animated, no CSS animation needed */
}

/* MFA Delivery Loading Indicator */
.mfa-delivery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
}

/* Responsive adjustments for MFA Delivery */
@media (max-width: 575.98px) {
    .mfa-delivery-form-wrapper {
        max-width: 100%;
    }
    
    .mfa-delivery-button {
        width: 100%;
        padding: 12px 16px;
    }
}

/* MFA Token Styles - Based on Figma design node-id=217-484 */

/* MFA Token Form Wrapper */
.mfa-token-form-wrapper {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Override logo margin for MFA token to match Figma spacing (32px gap) */
.login-new-container:has(.mfa-token-form-wrapper) .login-new-logo {
    margin-bottom: 32px; /* 32px gap as per Figma design */
}

/* MFA Token Content */
.mfa-token-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* 16px gap between heading, instruction, input, and button as per Figma */
}

/* MFA Token Heading */
.mfa-token-heading {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl); /* 24px - Heading/Medium */
    font-weight: var(--font-weight-light); /* 300 - Light */
    line-height: 1.333; /* 32px (24px * 1.333) - Heading/Medium line-height */
    color: var(--text-color); /* #1f2931 - Typography/Limed Spruce 500 */
    margin: 0;
    text-align: center;
}

/* MFA Token Instruction */
.mfa-token-instruction {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px - Body/Large */
    font-weight: var(--font-weight-normal); /* 400 - Regular */
    line-height: var(--line-height-normal); /* 24px */
    color: var(--text-color); /* #1f2931 - Typography/Limed Spruce 500 */
    margin: 0;
    text-align: center;
    max-width: 100%;
}

/* MFA Token Form */
.mfa-token-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* 16px gap as per Figma */
}

/* MFA Token Input Group */
.mfa-token-input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px; /* 4px gap between label and input as per Figma */
    align-items: flex-start;
}

/* MFA Token Label */
.mfa-token-label {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm); /* 14px - Body/Medium */
    font-weight: var(--font-weight-normal); /* 400 - Regular */
    line-height: 1.4286; /* 20px (14px * 1.4286) - Body/Medium line-height */
    color: #46565F; /* Type/Limed Spruce/100 */
    margin: 0;
    padding-left: 16px;
}

/* MFA Token Input */
.mfa-token-input {
    width: 100%;
    padding: 6px 16px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base); /* 16px - Body/Large */
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal); /* 24px */
    color: var(--text-color); /* #1f2931 */
    background-color: var(--background-color); /* #FFFFFF */
    border: 1px solid #E0E0E0; /* Neutral/Alto 300 */
    border-radius: 8px;
    transition: all var(--transition-base);
    box-sizing: border-box;
    text-align: center;
    /* Hide number input spinner arrows */
    -moz-appearance: textfield;
}

.mfa-token-input::-webkit-outer-spin-button,
.mfa-token-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mfa-token-input::placeholder {
    color: #8C959E; /* Type/Limed Spruce/Placeholder */
    opacity: 1;
    text-align: center;
}

.mfa-token-input:focus {
    outline: none;
    border-color: var(--primary-color); /* #126CB8 */
    box-shadow: 0 0 0 3px rgba(18, 108, 184, 0.1);
}

.mfa-token-input:focus::placeholder {
    color: #8C959E;
}

/* Hide browser validation tooltips for MFA token input */
.mfa-token-input:invalid,
.mfa-token-input:invalid:focus {
    outline: none;
}

.mfa-token-input::-webkit-validation-bubble-message {
    display: none;
}

.mfa-token-input::-webkit-validation-bubble-icon {
    display: none;
}

.mfa-token-input::-webkit-validation-bubble-arrow {
    display: none;
}

.mfa-token-input::-webkit-validation-bubble {
    display: none;
}

/* Style invalid state without showing browser tooltip */
.mfa-token-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
}

.mfa-token-input:invalid:focus:not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(215, 0, 21, 0.1);
}

/* MFA Token Input Error State */
.mfa-token-input-error {
    border-color: var(--error-color) !important;
}

.mfa-token-input-error:focus {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(215, 0, 21, 0.1) !important;
}

/* MFA Token Button Wrapper */
.mfa-token-button-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
}

/* MFA Token Button */
.mfa-token-button {
    width: auto;
    padding: 8px 24px; /* Match Figma: py-[8px] px-[24px] */
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm); /* 14px - CTA/Medium */
    font-weight: var(--font-weight-semibold); /* 600 - Semibold */
    line-height: var(--line-height-cta); /* 16px for CTA/Medium */
    color: #FFFFFF; /* White text */
    background-color: var(--primary-color); /* #126CB8 - Primary/Denim/300 */
    border: none;
    border-radius: 24px; /* Match Figma: rounded-[24px] */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    text-align: center;
}

.mfa-token-button:hover {
    background-color: var(--primary-hover); /* #0f5a9a */
}

.mfa-token-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 108, 184, 0.2);
}

.mfa-token-button:active {
    transform: translateY(1px);
}

/* Responsive adjustments for MFA Token */
@media (max-width: 575.98px) {
    .mfa-token-form-wrapper {
        max-width: 100%;
    }
    
    .mfa-token-input {
        padding: 6px 12px;
    }
    
    .mfa-token-button {
        width: 100%;
        padding: 8px 16px;
    }
}
