/* 
 * UBA Internet Banking Stylesheet
 * Custom styles using the Poppins font
 */

/* ==========================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================== */
:root {
    --primary-red: #cf2a27;
    --primary-red-hover: #b51f1c;
    --card-red-bg: rgba(192, 44, 38, 0.88);
    --input-dark-red: rgba(130, 20, 16, 0.4);
    --input-focus-bg: #ffffff;
    --input-focus-text: #cf2a27;
    
    --text-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #555555;
    
    --bg-light: #f7f7f7;
    --footer-dark-bg: #4a4a4a;
    --footer-bottom-bg: #333333;
    --border-light: rgba(255, 255, 255, 0.3);
    
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   BASE & RESET STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* ==========================================
   BACKGROUND FADE SYSTEM
   ========================================== */
.app-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: opacity 0.8s var(--transition-curve);
    pointer-events: none;
}

/* State Background Control */
.app-container.state-userid .bg-userid {
    opacity: 1;
}
.app-container.state-userid .bg-password {
    opacity: 0;
}

.app-container.state-password .bg-userid {
    opacity: 0;
}
.app-container.state-password .bg-password {
    opacity: 1;
}

/* Add a bright overlay specifically for the map screen to keep a clean, airy feel */
.bg-layer.bg-userid {
    background-color: #ffffff;
    background-size: contain;
    background-position: center 40%;
}

@media (max-width: 992px) {
    .bg-layer.bg-userid {
        background-size: 130%;
        background-position: center 30%;
    }
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.page-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    padding: 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Header */
.header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px 0 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    width: 100%;
    align-items: center;
}

/* ==========================================
   LEFT COLUMN: GREETINGS
   ========================================== */
.greeting-column {
    position: relative;
    padding-right: 5%;
}

.greeting-state {
    transition: opacity 0.4s var(--transition-curve), transform 0.4s var(--transition-curve);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
}

/* Toggle visibility between states */
.app-container.state-userid .greeting-state-userid {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    position: relative;
    pointer-events: auto;
}
.app-container.state-userid .greeting-state-password {
    opacity: 0;
    transform: translateY(-50%) translateX(-30px);
    position: absolute;
    pointer-events: none;
}

.app-container.state-password .greeting-state-userid {
    opacity: 0;
    transform: translateY(-50%) translateX(-30px);
    position: absolute;
    pointer-events: none;
}
.app-container.state-password .greeting-state-password {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    position: relative;
    pointer-events: auto;
}

.greeting-title {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--primary-red);
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.greeting-title.red-title {
    color: var(--primary-red);
}

.cursor-symbol {
    color: #333333;
    display: inline-block;
    margin-left: 2px;
    font-weight: 300;
    animation: blink 1s infinite alternate;
}

.greeting-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    max-width: 500px;
    font-weight: 400;
}

/* Darker subtitle for cover background to enhance readability */
.app-container.state-password .greeting-subtitle {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 0; }
    51% { opacity: 1; }
    100% { opacity: 1; }
}

/* ==========================================
   RIGHT COLUMN: LOGIN CARD
   ========================================== */
.card-column {
    display: flex;
    justify-content: flex-end;
}

.login-card {
    width: 380px;
    background: var(--card-red-bg);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    color: var(--text-white);
    transition: transform 0.4s var(--transition-curve), box-shadow 0.4s var(--transition-curve);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    padding: 24px 24px 12px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Body state animations */
.card-body {
    padding: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-body-userid {
    display: block;
}

.card-body-password {
    display: none;
}

.app-container.state-password .card-body-userid {
    display: none;
}

.app-container.state-password .card-body-password {
    display: block;
    animation: slideIn 0.4s var(--transition-curve);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dropdowns layout */
.dropdowns-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

/* Custom Dropdown Styling */
.custom-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dropdown-trigger:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.dropdown-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-icon {
    display: inline-flex;
    align-items: center;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.custom-dropdown.open .chevron-icon {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    color: var(--text-dark);
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    padding: 10px 14px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.dropdown-option:hover {
    background-color: #f5f5f5;
}

.dropdown-option.selected {
    background-color: rgba(207, 42, 39, 0.08);
    color: var(--primary-red);
    font-weight: 500;
}

/* Checkboxes Styling */
.checkbox-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    position: relative;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-box {
    height: 18px;
    width: 18px;
    background-color: rgba(0,0,0,0.15);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.custom-checkbox:hover input ~ .checkbox-box {
    border-color: rgba(255, 255, 255, 0.6);
}

.custom-checkbox input:checked ~ .checkbox-box {
    background-color: #ffffff;
    border-color: #ffffff;
}

.checkbox-box:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--primary-red);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkbox-box:after {
    display: block;
}

.checkbox-text {
    font-weight: 400;
}

/* Remember ID Checkbox Layout */
.remember-container {
    justify-content: space-between;
    width: 100%;
}

.info-icon {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s ease;
}

.info-icon:hover {
    color: #ffffff;
}

/* Inputs Styling */
.input-group {
    margin-bottom: 20px;
    width: 100%;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.custom-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    font-family: var(--font-family);
    background-color: rgba(0,0,0,0.15);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-white);
    outline: none;
    transition: all 0.25s var(--transition-curve);
}

.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

/* Focus and Filled state: White background, Red text matching mockup */
.custom-input:focus,
.custom-input.has-value {
    background-color: var(--input-focus-bg);
    border-color: #ffffff;
    color: var(--input-focus-text);
}

.custom-input:focus::placeholder {
    color: rgba(207, 42, 39, 0.5);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color 0.25s;
}

/* Input Icon color shift on active states */
.custom-input:focus ~ .input-icon,
.custom-input.has-value ~ .input-icon {
    color: var(--primary-red);
}

.input-icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.25s;
}

.custom-input:focus ~ .input-icon-right,
.custom-input.has-value ~ .input-icon-right {
    color: var(--primary-red);
}

.input-icon-right:hover {
    color: #ffffff !important;
}

.input-helper {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
    font-weight: 300;
}

/* Buttons Styling */
.btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: 6px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s ease;
    text-transform: uppercase;
}

.btn-login {
    background-color: var(--primary-red);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-login:hover {
    background-color: var(--primary-red-hover);
    border-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-register {
    background-color: #271A1A;
    color: var(--text-white);
    padding: 12px;
    font-weight: 500;
    text-transform: none;
    font-size: 14px;
}

.btn-register:hover {
    background-color: #3b2828;
}

.registration-wrapper {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    width: 100%;
}

/* Login Links */
.card-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    margin-top: 10px;
}

.links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mt-5 {
    margin-top: 6px;
}

.card-link {
    color: var(--text-white);
    opacity: 0.9;
    font-weight: 400;
}

.card-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
}

/* ==========================================
   PASSWORD STATE EXTRAS
   ========================================== */
.welcome-banner {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.banner-image {
    width: 150px;
    height: 150px;
    border: 5px solid #ffffff;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.user-id-display {
    text-align: center;
    font-size: 14px;
    margin-bottom: 18px;
    font-weight: 300;
}

.user-id-display strong {
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* ==========================================
   FOOTER CALLOUTS
   ========================================== */
.footer-callouts {
    background-color: var(--footer-dark-bg);
    padding: 30px 40px;
    margin: 50px -40px 0 -40px;
    z-index: 10;
    border-top: 4px solid var(--primary-red);
}

.callout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    max-width: 1440px;
    margin: 0 auto;
}

.callout-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px 20px;
    transition: transform 0.2s, background-color 0.2s;
}

.callout-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.callout-image-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.callout-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.callout-content {
    color: #e0e0e0;
}

.callout-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.callout-content p {
    font-size: 11.5px;
    line-height: 1.5;
    font-weight: 300;
}

.callout-content a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: underline;
}

.divider-dark {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

/* ==========================================
   FOOTER BOTTOM
   ========================================== */
.footer-bottom {
    background-color: var(--footer-bottom-bg);
    padding: 24px 40px;
    margin: 0 -40px;
    z-index: 10;
    color: #b0b0b0;
    font-size: 11.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bottom-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Social icons */
.social-links {
    display: flex;
    gap: 8px;
}

.social-icon {
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background-color 0.2s, transform 0.2s;
}

.social-icon:hover {
    background-color: var(--primary-red);
    color: #ffffff;
    transform: scale(1.1);
}

/* Compliance and legal */
.compliance-text {
    font-weight: 300;
    text-align: center;
}

.legal-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legal-links {
    font-weight: 300;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.legal-links a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.mini-logo {
    display: flex;
    align-items: center;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1200px) {
    .greeting-title {
        font-size: 42px;
    }
    
    .callout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .page-wrapper {
        padding: 0 20px;
    }
    
    .footer-callouts, .footer-bottom {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: -20px;
        margin-right: -20px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .greeting-column {
        text-align: center;
        padding-right: 0;
        margin-top: 20px;
    }
    
    .greeting-state {
        position: relative;
        top: 0;
        transform: none !important;
        margin-bottom: 20px;
    }
    
    .greeting-subtitle {
        margin: 0 auto;
    }
    
    .card-column {
        justify-content: center;
    }
    
    .app-container.state-userid .greeting-state-password,
    .app-container.state-password .greeting-state-userid {
        display: none;
    }
    
    .bottom-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .legal-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .legal-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .greeting-title {
        font-size: 32px;
    }
    
    .login-card {
        width: 100%;
        max-width: 380px;
    }
    
    .dropdowns-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
