:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #cccccc;
    --success-color: #28a745;
    --error-color: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Nav Bar Transition */
nav {
    background-color: #ffffff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: top 0.2s ease-in-out;
}
/* Right side container grouping for language switcher and menu button */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

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

.logo-container img {
    width: 35px;
    height: auto;
}

.logo-container span {
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

/* Dropdown Menu shifted to open from the right side corner */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 15px; /* Aligns dropdown menu to the right corner */
    left: auto;
    background: white;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    overflow: hidden;
    z-index: 101;
    min-width: 160px;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Main Container */
.container {
    max-width: 500px;
    width: 100%;
    margin: 20px auto;
    padding: 0 15px;
    flex: 1;
}

h2.page-title {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 15px;
    color: #222;
}

.search-label {
    font-size: 16px;
    margin-bottom: 10px;
    display: block;
    color: #333;
}

.section {
    display: none;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.section.active {
    display: block;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

select, input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

select:focus, input:focus {
    border-color: var(--primary-color);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background 0.2s;
}

.btn:hover {
    background-color: var(--primary-hover);
}

/* Spinner */
.loader-container {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px auto;
}

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

.message-box {
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.message-box.info {
    background-color: #e7f3fe;
    color: #004085;
    border: 1px solid #b8daff;
}

.message-box.error {
    background-color: #f8d7da;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

/* Section 3 Cards / Tables */
.info-card {
    background: #fdfbf7;
    border: 1px solid #e6dfd5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-card-header {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0eee6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
}

.info-value {
    font-weight: 500;
    color: #222;
    text-align: right;
}

.badge-green {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.badge-purple {
    background-color: #e2d9f3;
    color: #5b21b6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

/* Section 4 Card Input with Single Active Brand Icon */
.card-input-wrapper {
    position: relative;
}

.card-icons {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.card-brand-img {
    height: 18px;
}

.card-generic-icon {
    font-size: 20px;
    color: #666;
}

.card-row {
    display: flex;
    gap: 10px;
}

/* Full Screen White OTP Modal */
/* 3DS2 Challenge Page Design */
.otp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 15px;
    overflow-y: auto;
}

.otp-modal.active {
    display: flex;
}

.otp-card {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    padding: 10px 5px;
    font-family: Arial, sans-serif;
}

/* Header Logos */
.otp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cdb-logo {
    height: 68px;
    object-fit: contain;
}

.visa-logo {
    height: 24px;
    object-fit: contain;
}

/* Typography */
.otp-title {
    font-size: 18px;
    font-weight: bold;
    color: #111111;
    margin-bottom: 15px;
}

.otp-desc {
    font-size: 13px;
    color: #333333;
    line-height: 1.4;
    margin-bottom: 12px;
}

.otp-auth {
    font-size: 13px;
    color: #333333;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* Input Styles */
.otp-form-group {
    margin-bottom: 10px;
}

.otp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #111111;
    margin-bottom: 8px;
}

.3ds-input {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 3px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

.3ds-input:focus {
    border-color: #0056b3;
}

/* Red Border for Invalid Inputs */
.3ds-input.input-error,
input.input-error {
    border: 1px solid var(--error-color) !important;
}
/* Checkbox */
.otp-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.otp-checkbox-group input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.otp-checkbox-group label {
    font-size: 12px;
    color: #333333;
    cursor: pointer;
}

/* CONFIRM Button */
.btn-confirm {
    width: 100%;
    background-color: #0052cc;
    color: #ffffff;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-confirm:hover {
    background-color: #0040a8;
}

/* Action Links */
.otp-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.resend-btn {
    background: none;
    border: none;
    color: #0052cc;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.cancel-link {
    color: #0066cc;
    font-size: 13px;
    text-decoration: underline;
}

/* Footer */
.otp-footer {
    font-size: 10px;
    color: #777777;
    text-align: center;
    margin-top: 30px;
    line-height: 1.4;
}

/* Search Error Validation Message Style */
.error-text {
    color: var(--error-color);
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
    display: none;
}


/* Transparent Overlay & Center Popup Card */
.fullscreen-loader-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.fullscreen-loader-card {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.fullscreen-loader-card p {
    margin-top: 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333333;
}

/* --- Dotted Circular Spinner (iOS Style) --- */
.dots-spinner {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 0 auto;
}

.dots-spinner div {
    position: absolute;
    width: 9px;
    height: 9px;
    background: #777777;
    border-radius: 50%;
    animation: dots-fade 0.8s linear infinite;
}

/* Position all 8 dots in a circle */
.dots-spinner div:nth-child(1) { top: 0px; left: 18px; animation-delay: 0s; }
.dots-spinner div:nth-child(2) { top: 5px; left: 31px; animation-delay: -0.1s; }
.dots-spinner div:nth-child(3) { top: 18px; left: 36px; animation-delay: -0.2s; }
.dots-spinner div:nth-child(4) { top: 31px; left: 31px; animation-delay: -0.3s; }
.dots-spinner div:nth-child(5) { top: 36px; left: 18px; animation-delay: -0.4s; }
.dots-spinner div:nth-child(6) { top: 31px; left: 5px; animation-delay: -0.5s; }
.dots-spinner div:nth-child(7) { top: 18px; left: 0px; animation-delay: -0.6s; }
.dots-spinner div:nth-child(8) { top: 5px; left: 5px; animation-delay: -0.7s; }

/* Pulse & Fade Keyframe Animation */
@keyframes dots-fade {
    0% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

/* 3DS Visa Secure Full Screen Loader */
.visa-secure-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff; /* Solid white full-screen background */
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.visa-secure-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 12-Blade Radial Wheel Spinner */
.radial-spinner {
    position: relative;
    width: 50px;
    height: 50px;
    margin-bottom: 25px;
}

.radial-spinner div {
    position: absolute;
    top: 20px;
    left: 23px;
    width: 4px;
    height: 10px;
    background: #555555;
    border-radius: 2px;
    transform-origin: 2px 5px;
    animation: radial-fade 1s linear infinite;
}

/* Positioning and timing for each of the 12 blades */
.radial-spinner div:nth-child(1)  { transform: rotate(0deg) translate(0, -18px); animation-delay: 0s; }
.radial-spinner div:nth-child(2)  { transform: rotate(30deg) translate(0, -18px); animation-delay: -0.916s; }
.radial-spinner div:nth-child(3)  { transform: rotate(60deg) translate(0, -18px); animation-delay: -0.833s; }
.radial-spinner div:nth-child(4)  { transform: rotate(90deg) translate(0, -18px); animation-delay: -0.75s; }
.radial-spinner div:nth-child(5)  { transform: rotate(120deg) translate(0, -18px); animation-delay: -0.666s; }
.radial-spinner div:nth-child(6)  { transform: rotate(150deg) translate(0, -18px); animation-delay: -0.583s; }
.radial-spinner div:nth-child(7)  { transform: rotate(180deg) translate(0, -18px); animation-delay: -0.5s; }
.radial-spinner div:nth-child(8)  { transform: rotate(210deg) translate(0, -18px); animation-delay: -0.416s; }
.radial-spinner div:nth-child(9)  { transform: rotate(240deg) translate(0, -18px); animation-delay: -0.333s; }
.radial-spinner div:nth-child(10) { transform: rotate(270deg) translate(0, -18px); animation-delay: -0.25s; }
.radial-spinner div:nth-child(11) { transform: rotate(300deg) translate(0, -18px); animation-delay: -0.166s; }
.radial-spinner div:nth-child(12) { transform: rotate(330deg) translate(0, -18px); animation-delay: -0.083s; }

@keyframes radial-fade {
    0% { opacity: 1; }
    100% { opacity: 0.15; }
}

/* Logo & SECURE Badge */
.visa-secure-logo {
    height: 32px;
    object-fit: contain;
    margin-bottom: 12px;
}

.visa-secure-badge {
    background-color: #1a3673; /* Official Visa Secure Dark Blue */
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
    padding: 10px 24px;
    border-radius: 2px;
}

/* Red Border for Invalid Input Fields */
input.input-error {
    border-color: var(--error-color) !important;
}

/* Amount to Withdraw Banner in Section 4 */
.withdraw-amount-banner {
    background-color: #e7f3fe;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 20px;
}

.withdraw-amount-banner strong {
    font-size: 16px;
    color: var(--primary-color);
}

/* Save Card Checkbox */
.save-card-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.save-card-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.save-card-group label {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    margin-bottom: 0;
}

/* Security Trust Notice Box */
.security-notice-box {
    border-top: 1px solid #eef2f7;
    padding-bottom: 10px;
}

.security-title {
    font-size: 14px;
    font-weight: bold;
    color: #111111;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.security-title i {
    color: #28a745;
    font-size: 16px;
}

.security-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-list li {
    font-size: 12px;
    color: #555555;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.security-list li i {
    color: #28a745;
    font-size: 12px;
    margin-top: 2px;
}

.safe-us-payment{
    font-size: 13px;
    color: #28a745;
    padding-bottom: 18px;
}

/* OTP Card Loading Overlay Popup */
.otp-loader-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55); /* Semi-transparent white overlay */
    z-index: 10;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.otp-popup-spinner-box {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    text-align: center;
    border: 1px solid #e1e4e8;
}

.otp-popup-spinner-box p {
    margin-top: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #333333;
}

/* Adjust Language Container spacing if needed */
.nav-lang-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cccccc;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.custom-lang-prefix {
    font-weight: bold;
    font-size: 14px;
    color: #333333;
    pointer-events: none;
}

/* Ensure Google Translate element fills the button area */
#google_translate_element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Make Google's select element completely fill the touch area */
#google_translate_element select.goog-te-combo {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    -webkit-appearance: menulist !important;
    display: block !important;
}

/* Hide extra Google widgets and text */
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-gadget img,
.goog-te-gadget span {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
}

/* Hide Google Translate Logos and Extra Text */
.goog-logo-link,
.goog-te-gadget span,
.goog-te-gadget img,
.goog-tooltip {
    display: none !important;
    visibility: hidden !important;
}

.goog-te-gadget {
    color: transparent !important;
    font-size: 0px !important;
}

/* Allow Google Translate iframe frame to position relative to body */
iframe.goog-te-banner-frame,
iframe.skiptranslate {
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}