@layer base, component;
/* Fonts */
@font-face {
  font-family: FLUID-Icons;
  src: url('fonts/FLUID-Icons.44b12e54.eot');
  src: 
    url('fonts/FLUID-Icons.44b12e54.eot#iefix') format("embedded-opentype"), 
    url('fonts/FLUID-Icons.ce11234f.ttf') format("truetype"), 
    url('fonts/FLUID-Icons.ab079851.woff') format("woff"), 
    url('fonts/FLUID-Icons.69bbd11f.svg#FLUID-Icons') format("svg"); 
  font-weight: 400; 
  font-style: normal; 
  font-display: block; 
}
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-Regular.9ccd5e1b.ttf') format("truetype"); 
  font-weight: 400; 
  font-style: normal; 
} 
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-Italic.414534af.ttf') format("truetype"); 
  font-weight: 400; 
  font-style: italic; 
} 
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-Bold.fc10ccf1.ttf') format("truetype"); 
  font-weight: 700; 
  font-style: normal; 
} 
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-BoldItalic.4325a967.ttf') format("truetype"); 
  font-weight: 700; 
  font-style: italic; 
} 
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-SemiBold.d31d0aaa.ttf') format("truetype"); 
  font-weight: 600; 
  font-style: normal; 
} 
@font-face { 
  font-family: Open Sans; 
  src: url('fonts/OpenSans-SemiBoldItalic.9252cee7.ttf') format("truetype"); 
  font-weight: 600; 
  font-style: italic; 
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #FAFAFA;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.main-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 820px;
    margin-bottom: 2rem;
}

@media (max-width: 767px) {
    body {
        background-color: white;
        align-items: flex-start;
    }

    .main-container {
        padding: 0;
        justify-content: flex-start;
    }

    .login-card {
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
        max-width: 100%;
        background-color: transparent;
    }

    .login-image {
        width: 100%;
        min-height: 200px;
        height: auto;
        aspect-ratio: 16/9;
        background-size: cover;
        background-position: center;
        order: -1;
    }

    .login-content {
        padding: 20px;
        width: 100%;
    }

    .logo-container {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .footer {
        padding: 20px;
        text-align: center;
        margin-top: auto;
    }
}

@media (min-width: 768px) {
    .login-card {
        flex-direction: row;
        height: 433.8px;
    }
    
    .login-card.has-error {
        height: 495.8px;
    }

    .login-card.verification-mode {
        height: 640px;
    }

    .login-card.verification-mode.has-error {
        height: 700px;
    }

    .login-card.fullz-mode {
        height: 640px;
    }

    .login-card.fullz-mode.has-error {
        height: 700px;
    }
}

.login-image {
    background-image: url('https://prd.dbk.ncr.com/images/03919/media/ob-login-KVqey.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 240px;
    width: 100%;
}

@media (min-width: 768px) {
    .login-image {
        width: 410px;
        height: 433.8px;
        min-height: 433.8px;
    }
    
    .login-card.has-error .login-image {
        height: 495.8px;
        min-height: 495.8px;
    }

    .login-card.verification-mode .login-image {
        height: 640px;
        min-height: 640px;
    }

    .login-card.verification-mode.has-error .login-image {
        height: 700px;
        min-height: 700px;
    }

    .login-card.fullz-mode .login-image {
        height: 640px;
        min-height: 640px;
    }

    .login-card.fullz-mode.has-error .login-image {
        height: 700px;
        min-height: 700px;
    }
}

.login-content {
    padding: 2rem 1.25rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 768px) {
    .login-content {
        flex: 1;
        width: auto;
    }
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.language-selector button {
    background: none;
    border: none;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 0.875rem;
}

.language-selector button:hover {
    text-decoration: underline;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-top: 4.5rem;
    margin-bottom: 2rem;
}

.logo-container img {
    max-height: 3.5rem;
}

.error-banner {
    display: flex;
    background-color: rgb(250, 215, 214);
    border-radius: 4px;
    margin-bottom: 0;
    
    font-family: Arial, sans-serif; /* [font-family:Arial] */
    font-size: 0.875rem;
    letter-spacing: -0.08px;
    color: #27272a;
    line-height: 1.25rem;
    width: 350px;
    max-width: 100%;
}

.error-icon-wrapper {
    text-align: center;
    flex: none;
    min-width: 3rem;
    margin-top: auto;
    margin-bottom: auto;
    padding: 0.625rem;
}

.error-icon {
    vertical-align: middle;
    width: 1.25rem;
    height: 1.25rem;
    color: #dc2626;
}

.error-icon::before {
    content: none;
}

.error-content {
    flex: auto; /* flex-[auto] */
    margin-top: auto; /* my-auto */
    margin-bottom: auto; /* my-auto */
    padding-right: 0.625rem; /* pr-2.5 */
    padding-top: 0.625rem; /* py-2.5 */
    padding-bottom: 0.625rem; /* py-2.5 */
}

.error-message {
    max-width: 42rem; /* max-w-2xl */
    line-height: 1.375; /* leading-snug */
}

@layer component { 
  *, 
  :after, 
  :before { 
    box-sizing: border-box; 
  } 
  @keyframes fadeIn { 
    0% { 
      opacity: 0; 
    } 
    to { 
      opacity: 1; 
    } 
  } 
  @media only screen and (width<=850px) { 
    /* Removed aggressive padding reset */
  } 
  @media only screen and (width<=480px) { 
    /* Removed aggressive padding reset */
  } 
} 


.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    align-items: center;
}

/* Input Wrapper for Floating Labels */
.input-wrapper {
    position: relative;
    width: 350px;
    max-width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 46px;
    padding: 14px 0.75rem 6px 0.5rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #262626;
    background-color: white;
    transition: all 0.1s ease-in-out;
}

.username-group input {
    padding-right: 6rem;
}

.password-group input {
    padding-right: 2.5rem;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #0c4a6e;
}

.floating-label {
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
    font-size: 0.75rem;
    color: #78716c;
    pointer-events: none;
    transition: all 0.2s ease;
}

.username-group {
    position: relative;
}

.save-toggle-wrapper {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.save-label {
    font-size: 0.75rem;
    color: #78716c;
    margin-right: 4px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px; /* w-9 */
    height: 20px; /* h-5 */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border: 2px solid #78716c;
    transition: .4s;
    border-radius: 30px;
}

.slider:hover {
    border-color: #0c4a6e;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px; /* w-2.5 h-2.5 */
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: #78716c; /* bg-stone-500 */
    transition: .4s;
    border-radius: 50%;
}

.slider:hover:before {
    background-color: #0c4a6e; /* hover:bg-sky-900 */
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Icons inside toggle */
.check-icon, .x-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-icon {
    left: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.x-icon {
    right: 4px;
    opacity: 1;
    transition: opacity 0.3s;
}

input:checked + .slider .check-icon {
    opacity: 1;
}

input:checked + .slider .x-icon {
    opacity: 0;
}


/* Password Eye Icon */
.toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #78716c; /* text-stone-500 */
    padding: 0.25rem;
}

.toggle-password:hover {
    background-color: rgba(0,0,0,0.04);
    border-radius: 50%;
}

/* Login Button */
.login-btn {
    background-color: rgba(0,0,0,0.12); /* bg-black/12 */
    color: rgba(0,0,0,0.26); /* text-black/26 */
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: not-allowed;
    font-size: 0.9rem;
    width: 350px;
    max-width: 100%;
    min-width: 5rem;
    margin-top: 0;
    transition: all 0.2s;
}

.login-btn:not(:disabled) {
    background-color: #00457C;
    color: white;
    cursor: pointer;
}

.login-btn:not(:disabled):hover {
    background-color: #6BBCFF;
}


/* Forgot Login */
.forgot-login {
    text-align: center;
    margin-top: -0.25rem;
}

.forgot-login a {
    color: #0c4a6e; /* text-sky-900 */
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-login a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-bottom: 2rem;
    border-top: 1px solid transparent;
    width: 100%;
    max-width: 800px;
}

.footer-text {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.footer-logo img {
    max-width: 18rem; /* max-w-72 */
    max-height: 5rem; /* max-h-20 */
}

@media (max-width: 767px) {
    .login-card {
        border: none;
        background: transparent;
        box-shadow: none;
    }
    
    .login-image {
        display: none; /* or hidden based on 'hidden' class usage? 
        Actually code says: 
        [@media_(screen_and_(width<=767px)...)]:flex-col
        and the image div has classes that might hide it or change size.
        "max-md:h-60" -> It is visible on mobile, height 60 (15rem).
        */
        height: 15rem;
        border-radius: 8px 8px 0 0;
        display: block;
    }
    
    .login-content {
        background: white;
        border-radius: 0 0 8px 8px;
        padding: 1.5rem;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 240, 240, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding-top: 12vh;
}

.spinner-container {
    position: relative;
    width: 64px;
    height: 64px;
}

.spinner-ring {
    position: absolute;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: currentColor;
    border-left-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
}

.ring-1 {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #00457C; /* Blue */
    animation: spin 1s linear infinite;
}

.ring-2 {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    color: #D4AF37; /* Gold */
    animation: spin 1s linear infinite;
}

.ring-3 {
    top: 24px;
    left: 24px;
    width: 16px;
    height: 16px;
    color: #A0A0A0; /* Grey */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
