/**
 * KeyAuth Login Page Styles
 * CSS riêng cho trang đăng nhập
 * @author KeyAuth Team
 * @version 1.1.0
 */

/* ============================================
   1. Google Fonts - IBM Plex Sans
   ============================================ */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    src: url('/cf-fonts/s/ibm-plex-sans/5.0.18/latin/400/normal.woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    src: url('/cf-fonts/s/ibm-plex-sans/5.0.18/vietnamese/400/normal.woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    src: url('/cf-fonts/s/ibm-plex-sans/5.0.18/latin/500/normal.woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    src: url('/cf-fonts/s/ibm-plex-sans/5.0.18/latin/600/normal.woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    src: url('/cf-fonts/s/ibm-plex-sans/5.0.18/latin/700/normal.woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    font-display: swap;
}

/* ============================================
   2. Google Identity Service Button Styles
   ============================================ */
.qJTHM {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    color: #202124;
    direction: ltr;
    -webkit-touch-callout: none;
    font-family: "Roboto-Regular", arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    margin: 0;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

.ynRLnc {
    left: -9999px;
    position: absolute;
    top: -9999px;
}

.L6cTce {
    display: none;
}

.bltWBb {
    overflow-wrap: break-word;
    word-break: break-word;
}

.hSRGPd {
    color: #1a73e8;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
}

.Bz112c-W3lGp {
    height: 16px;
    width: 16px;
}

.Bz112c-E3DyYd {
    height: 20px;
    width: 20px;
}

.Bz112c-r9oPif {
    height: 24px;
    width: 24px;
}

.Bz112c-u2z5K {
    height: 36px;
    width: 36px;
}

.Bz112c-uaxL4e {
    border-radius: 10px;
}

.LgbsSe-Bz112c {
    display: block;
}

.S9gUrf-YoZ4jf {
    border: none;
    margin: 0;
    padding: 0;
}

.S9gUrf-YoZ4jf * {
    border: none;
    margin: 0;
    padding: 0;
}

.nsm7Bb-HzV7m-LgbsSe {
    border-radius: 4px;
    box-sizing: border-box;
    -webkit-transition: background-color .218s, border-color .218s;
    transition: background-color .218s, border-color .218s;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border: 1px solid #dadce0;
    color: #3c4043;
    cursor: pointer;
    font-family: "Google Sans", arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: .25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
}

.nsm7Bb-HzV7m-LgbsSe:hover {
    box-shadow: none;
    border-color: rgb(210, 227, 252);
    outline: none;
}

.nsm7Bb-HzV7m-LgbsSe .nsm7Bb-HzV7m-LgbsSe-Bz112c {
    height: 18px;
    margin-right: 8px;
    min-width: 18px;
    width: 18px;
}

.nsm7Bb-HzV7m-LgbsSe .nsm7Bb-HzV7m-LgbsSe-BPrWId {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    font-family: "Google Sans", arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.nsm7Bb-HzV7m-LgbsSe .nsm7Bb-HzV7m-LgbsSe-MJoBVe {
    -webkit-transition: background-color .218s;
    transition: background-color .218s;
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.nsm7Bb-HzV7m-LgbsSe:hover .nsm7Bb-HzV7m-LgbsSe-MJoBVe {
    background: rgba(66, 133, 244, .08);
}

.L5Fo6c-sM5MNb {
    border: 0;
    display: block;
    left: 0;
    position: relative;
    top: 0;
}

.L5Fo6c-bF1uUb {
    border-radius: 4px;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.L5Fo6c-bF1uUb:focus {
    border: none;
    outline: none;
}

/* ============================================
   3. Chatway Widget Styles
   ============================================ */
.chatway--container.has-loaded {
    /* Styles handled by Chatway SDK */
}

/* ============================================
   4. Browser Extension Compatibility (Savior)
   ============================================ */
.--savior-overlay-transform-reset {
    transform: none !important;
}

.--savior-overlay-z-index-top {
    z-index: 2147483643 !important;
}

.--savior-overlay-position-relative {
    position: relative;
}

.--savior-overlay-position-static {
    position: static !important;
}

.--savior-overlay-overflow-hidden {
    overflow: hidden !important;
}

.--savior-overlay-overflow-x-visible {
    overflow-x: visible !important;
}

.--savior-overlay-overflow-y-visible {
    overflow-y: visible !important;
}

.--savior-overlay-z-index-reset {
    z-index: auto !important;
}

.--savior-overlay-display-none {
    display: none !important;
}

.--savior-overlay-clearfix {
    clear: both;
}

.--savior-overlay-reset-filter {
    filter: none !important;
    backdrop-filter: none !important;
}

.--savior-tooltip-host {
    z-index: 9999;
    position: absolute;
    top: 0;
}

.--savior-backdrop {
    position: fixed !important;
    z-index: 2147483642 !important;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw !important;
    background-color: rgba(0, 0, 0, 0.9);
}

.--savior-overlay-twitter-video-player {
    position: fixed;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.--savior-overlay-z-index-reset [class*="DivSideNavContainer"],
.--savior-overlay-z-index-reset [class*="DivHeaderContainer"],
.--savior-overlay-z-index-reset [class*="DivBottomContainer"],
.--savior-overlay-z-index-reset [class*="DivCategoryListWrapper"],
.--savior-overlay-z-index-reset [data-testid="sidebarColumn"],
.--savior-overlay-z-index-reset header[role="banner"],
.--savior-overlay-z-index-reset [data-testid="cellInnerDiv"]:not(.--savior-overlay-z-index-reset),
.--savior-overlay-z-index-reset [aria-label="Home timeline"]>div:first-child,
.--savior-overlay-z-index-reset [aria-label="Home timeline"]>div:nth-child(3) {
    z-index: -1 !important;
}

.--savior-overlay-z-index-reset [data-testid="cellInnerDiv"] .--savior-backdrop+div {
    z-index: 2147483643 !important;
}

.--savior-overlay-z-index-reset [data-testid="primaryColumn"]>[aria-label="Home timeline"] {
    z-index: 0 !important;
}

.--savior-overlay-z-index-reset#mtLayer,
.--savior-overlay-z-index-reset.media-layer {
    z-index: 3000 !important;
}

.--savior-overlay-position-relative [class*="SecBar_secBar_"],
.--savior-overlay-position-relative .woo-box-flex [class*="Frame_top_"] {
    z-index: 0 !important;
}

.--savior-overlay-position-relative .vue-recycle-scroller__item-view:not(.--savior-overlay-z-index-reset),
.--savior-overlay-position-relative .woo-panel-main[class*="BackTop_main_"],
.--savior-overlay-position-relative [class*="Main_side_"] {
    z-index: -1 !important;
}

.zm-video-modal.--savior-overlay-z-index-reset {
    position: absolute;
}

#page #main.--savior-overlay-z-index-reset {
    z-index: auto !important;
}

#vp_w.--savior-overlay-z-index-reset.media-layer.media-layer__video {
    overflow-y: hidden;
    z-index: 2147483643 !important;
}

.--savior-overlay-z-index-top.rmc_controller,
.--savior-overlay-z-index-top.rmc_setting_intro,
.--savior-overlay-z-index-top.rmc_highlight,
.--savior-overlay-z-index-top.rmc_control_settings {
    z-index: 2147483644 !important;
}

.swiper-wrapper.--savior-overlay-z-index-reset .swiper-slide:not(.swiper-slide-active),
.swiper-wrapper.--savior-overlay-transform-reset .swiper-slide:not(.swiper-slide-active) {
    display: none;
}

.videoWrap + div > div {
    pointer-events: unset;
}

.mfp-wrap.--savior-overlay-z-index-top {
    position: relative;
}

.mfp-wrap.--savior-overlay-z-index-top .mfp-close {
    display: none;
}

.mfp-wrap.--savior-overlay-z-index-top .mfp-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

section.--savior-overlay-z-index-reset>main[role="main"].--savior-overlay-z-index-reset + nav {
    z-index: -1 !important;
}

.watching-movie #video-player.--savior-overlay-z-index-top {
    z-index: 2147483644 !important;
}

div[class^="tiktok"].--savior-overlay-z-index-reset {
    z-index: 2147483644 !important;
}

.--savior-lightoff-fix section:not(:has([class*="--savior-overlay-"])),
.--savior-lightoff-fix section.section_video ~ section {
    z-index: -1;
    position: relative;
}

.--savior-lightoff-fix header,
.--savior-lightoff-fix footer,
.--savior-lightoff-fix .top-header,
.--savior-lightoff-fix .swiper-container,
.--savior-lightoff-fix #to_top,
.--savior-lightoff-fix #button-adblock {
    z-index: -1 !important;
}

@-moz-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   5. Social Button Styles
   ============================================ */
.social-button {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-size: 24px;
}

.social-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ============================================
   6. Form Input Styles
   ============================================ */
.login-form .form-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem;
    background: transparent;
    border: 1px solid rgb(var(--color-custom));
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.login-form .form-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form .form-label {
    position: absolute;
    left: 0.25rem;
    padding: 0 0.5rem;
    background-color: rgb(var(--color-custom-back));
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ============================================
   7. Login Button
   ============================================ */
.btn-login {
    width: 100%;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    transform: scale(1.02);
}

.btn-login:active {
    transform: scale(0.98);
}

/* ============================================
   8. Telegram Popup
   ============================================ */
#telegram-popup {
    background-color: rgba(0, 0, 0, 0.5);
}

#telegram-popup.hidden {
    display: none;
}

/* ============================================
   9. Social Login Buttons
   ============================================ */
.social-login-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgb(var(--color-custom-back-1));
    padding: 1rem;
    border-radius: 0.75rem;
    width: 80px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-login-btn:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* ============================================
   10. Divider
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider hr {
    flex: 1;
    border-color: rgb(55, 65, 81);
}

.divider span {
    margin: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ============================================
   11. Error/Success Messages
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* ============================================
   12. Floating Label Animation
   ============================================ */
.floating-label {
    position: relative;
}

.floating-label .form-input {
    padding-top: 1.25rem;
    padding-bottom: 0.625rem;
}

.floating-label .form-input:focus + .form-label,
.floating-label .form-input:not(:placeholder-shown) + .form-label {
    top: 0;
    transform: translateY(-50%) scale(0.75);
    color: #2563eb;
}

.floating-label .form-label {
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
}

/* ============================================
   13. Forgot Password Link
   ============================================ */
.forgot-password-link {
    font-size: 0.75rem;
    color: #3b82f6;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ============================================
   14. Remember Me Checkbox
   ============================================ */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border-color: rgb(75, 85, 99);
    background-color: rgb(31, 41, 55);
    cursor: pointer;
}

.remember-me input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.remember-me label {
    font-size: 0.875rem;
    color: #9ca3af;
    cursor: pointer;
}
