/* Patch Styles to force alignment with Target Design */

/* Force Orange Gradient Button */
.login {
    background-image: linear-gradient(90deg, #ff512f 0%, #f09819 100%) !important;
    background-color: transparent !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(240, 152, 25, 0.3) !important;
}

/* Title Styling - Remove Icon, Center, Resize */
.p3 {
    text-align: center !important;
    padding-top: 99px !important;
    padding-bottom: 30px !important;
}

/* Add margin to the login box container */
.bg-black-99 {
    margin-top: 75px !important;
}

.p3 .title {
    display: inline-block !important;
    position: relative !important;
    padding-left: 0 !important;
    /* Remove any padding reserved for icon */
}

/* Aggressively hide the smiley icon pseudo-elements */
.p3 .title::before,
.p3 .title::after,
.p3 .h3::before,
.p3 .h3::after,
.p3 .title span::before,
.p3 .title span::after {
    display: none !important;
    content: "" !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
}

/* Language Selector - Top Right Button Style (Matching Inputs) */
.lang-switch {
    display: flex !important;
    text-decoration: none !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background-color: #ffffff !important;
    /* White like inputs */
    color: #333 !important;
    /* Dark text */
    height: 36px;
    padding: 0 15px;
    border-radius: 18px !important;
    /* Pill shape or match input radius */
    border: 1px solid #ccc !important;
    /* Subtle border */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483647 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-switch:hover {
    background-color: #f8f8f8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: auto !important;
    /* Prevent width animation from previous style */
    height: 36px !important;
}

.lang-switch span {
    color: #333;
    font-weight: normal;
    font-size: 14px;
    margin: 0;
    font-family: inherit;
}

/* Optional: Add a dropdown arrow indicator */
.lang-switch::after {
    content: '▼';
    font-size: 10px;
    margin-left: 8px;
    color: #999;
}

/* Language Selection Modal */
.lang-modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483648;
    /* Higher than button */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Language Selection Modal - Bottom Sheet Style */
.lang-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483648;
    justify-content: center;
    /* Not needed for bottom sheet but keeps overlay consistent */
    align-items: flex-end;
    /* Align to bottom */
    backdrop-filter: blur(2px);
}

.lang-modal {
    background: #fff;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 0;
    /* Remove padding to handle header/list separately */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    animation: slideUpBottom 0.3s ease-out;
    padding-bottom: 20px;
    /* Safe area */
}

@keyframes slideUpBottom {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Picker Header */
.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.picker-header .cancel-btn {
    color: #999;
    font-size: 14px;
    cursor: pointer;
}

.picker-header .confirm-btn {
    color: #1989fa;
    /* Blue confirm color */
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

/* List Styling */
.lang-modal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 40vh;
    overflow-y: auto;
}

.lang-modal li {
    margin: 0;
    border-bottom: 1px solid #f9f9f9;
}

.lang-modal a {
    display: block;
    padding: 15px;
    background: #fff;
    color: #333;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    transition: background 0.2s;
}

.lang-modal a:hover {
    background: #f5f5f5;
}

/* Hide old elements if any remain */
.lang-modal h4,
.lang-modal .close-modal {
    display: none;
}

.p3 .h3 {
    font-size: 36px !important;
    font-weight: bold !important;
    color: #333 !important;
    /* Dark text for title as per target */
    margin: 0 !important;
    display: block !important;
}

/* Container Box - Dark Semi-Transparent */
/* Note: Target image shows a dark box. */
.box {
    background-color: rgba(60, 60, 60, 0.8) !important;
    /* Dark Gray */
    backdrop-filter: blur(5px);
    border-radius: 12px !important;
    padding: 30px 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Input Fields */
.box ul li {
    background-color: #ffffff !important;
    border-radius: 6px !important;
    margin-right: 10px;
    margin-top: 5px;
    border: 1px solid #eee !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
}

/* Override Background Image */
.main,
.mybg {
    background-image: url('/static_new6/img/login-bg.png') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.box ul li input {
    background: transparent !important;
    height: 100% !important;
    font-size: 14px !important;
}

/* Input Icons */
.box ul li img.lco,
.box ul li img.eye {
    width: 20px !important;
    height: 20px !important;
    opacity: 1 !important;
    filter: invert(56%) sepia(91%) saturate(2250%) hue-rotate(345deg) brightness(100%) contrast(105%);
    /* Try to tint orange if they are SVGs/PNGs allowing filters */
}

/* Utility Classes for New Login Structure */
.bg-black-99 {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

.bg-gray-100 {
    background-color: #f3f4f6 !important;
}

.rounded-10 {
    border-radius: 10px !important;
}

.p-10,
[p-10=""] {
    padding: min(2.667vw, 16px) !important;
}

.h-100vh {
    height: 100vh !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.mr-10 {
    margin-right: 10px !important;
}

.my-10 {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.py-5 {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.flex {
    display: flex !important;
}

.items-center {
    align-items: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.text-orange {
    color: #ff702a !important;
}

.text-20 {
    font-size: 20px !important;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-12 {
    font-size: 12px !important;
    color: #fff !important;
}

.text-center {
    text-align: center !important;
}

.w-full {
    width: 100% !important;
}

/* Icon Image Styling - Force Orange */
.i-carbon-user img,
.i-carbon-ibm-cloud-key-protect img,
.i-carbon-view-off img,
.text-20 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    /* Orange Filter for #ff702a */
    filter: invert(56%) sepia(60%) saturate(3000%) hue-rotate(340deg) brightness(100%) contrast(105%) !important;
}

/* Specific fix for the view-off/eye icon if it needs to be grey or different state */
.i-carbon-view-off img {
    /* If eye should be grey by default, remove filter. If orange, keep it. Target shows orange or grey? Usually toggle. Assuming Orange to match theme for now, or inherit. */
    /* Let's make the eye greyish by default */
    filter: invert(50%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(90%) !important;
}

/* Button Gradient Override */
.van-button--primary {
    background: linear-gradient(to right bottom, rgb(244, 49, 35), rgb(255, 207, 174)) !important;
    border: 0px !important;
    color: white !important;
    height: 44px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    cursor: pointer;
}

/* Input text styling */
.bg-gray-100 input {
    color: #333 !important;
    font-size: 14px !important;
}

/* Fix: text-12 is white by default (for login), but needs to be dark for register (white bg) */
.bg-white .text-12 {
    color: #333 !important;
}

/* Register Page Utilities */
.bg-white {
    background-color: #ffffff !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mr-5 {
    margin-right: 5px !important;
}

/* 顶部间距主要控制在这里 (Adjust top spacing here) */
.mt-44 {
    margin-top: 10px !important;
    /* 原始 44px */
}

.text-16 {
    font-size: 16px !important;
}

.color-black {
    color: #000 !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

/* New Utilities for Home Announcement */
.rounded-30 {
    border-radius: 30px !important;
}

.text-24 {
    font-size: 24px !important;
}

.font-600 {
    font-weight: 600 !important;
}

.pt-20 {
    padding-top: 20px !important;
}

.pb-40 {
    padding-bottom: 40px !important;
}

.leading-25 {
    line-height: 25px !important;
}

.justify-center {
    justify-content: center !important;
}

/* Vant Popup Shim */
.van-popup {
    position: fixed;
    max-height: 100%;
    overflow-y: auto;
    background-color: #fff;
    transition: transform 0.3s;
    -webkit-overflow-scrolling: touch;
    z-index: 2000;
}

.van-popup--center {
    top: 50% !important;
    left: 50% !important;
    transform: translate3d(-50%, -50%, 0) !important;
}

.van-popup--round {
    border-radius: 16px !important;
}

/* Vant Variables */
:root {
    --van-nav-bar-height: 46px;
    --van-padding-md: 16px;
    --van-font-size-md: 16px;
    --van-nav-bar-icon-color: #1989fa;
    --van-padding-base: 4px;
    --van-nav-bar-arrow-size: 20px;
    --van-nav-bar-title-text-color: #323233;
    --van-font-bold: 600;
    --van-nav-bar-title-font-size: 16px;
}

/* Adapted Vant Nav Bar Styles */
.van-nav-bar--fixed {
    position: fixed;
    top: 0;
    left: calc(50% - min(50%, 300px)) !important;
    width: min(100%, 600px) !important;
    z-index: 99;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.van-nav-bar__content {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--van-nav-bar-height);
}

.van-nav-bar__left {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 var(--van-padding-md);
    font-size: var(--van-font-size-md);
    cursor: pointer;
}

.van-nav-bar__title {
    max-width: 60%;
    margin: 0 auto;
    color: var(--van-nav-bar-title-text-color);
    font-weight: var(--van-font-bold);
    font-size: var(--van-nav-bar-title-font-size);
}

.van-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.van-nav-bar .van-icon {
    color: var(--van-nav-bar-icon-color);
}

.van-badge__wrapper {
    position: relative;
    display: inline-block;
}

.van-nav-bar__arrow {
    margin-right: var(--van-padding-base);
    font-size: var(--van-nav-bar-arrow-size);
}

/* Ensure the text arrow I used still displays if font is missing */
.van-nav-bar__left i span {
    font-style: normal;
    font-size: 20px;
}