/* Blue Sky Glassmorphism Theme - Override for TSplus */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Inter:wght@400;500;600&display=swap');

/* Reset & Box Sizing Fix */
* {
    box-sizing: border-box !important;
}

/* Reset & Body */
html,
body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Inter', sans-serif !important;
}

body {
    background: linear-gradient(180deg, #89f7fe 0%, #66a6ff 100%) !important;
    /* Lighter sky blue for clouds */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CLOUD ANIMATIONS */
#clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    /* Bring forward to sit on top of body bg */
    pointer-events: none;
    width: 100%;
    height: 100%;
    /* Ensure full coverage */
}

.cloud {
    width: 200px;
    height: 60px;
    background: #fff;
    border-radius: 200px;
    position: absolute;
    opacity: 0.8;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background: #fff;
    width: 100px;
    height: 80px;
    position: absolute;
    top: -15px;
    left: 10px;
    border-radius: 100px;
    transform: rotate(30deg);
}

.cloud:after {
    width: 120px;
    height: 120px;
    top: -55px;
    left: auto;
    right: 15px;
}

/* Moving Animations */
/* Uses negative animation-delay to ensure clouds are visible on load */

.x1 {
    top: 5vh;
    left: -200px;
    /* Start offscreen */
    transform: scale(0.65);
    opacity: 0.7;
    animation: moveclouds 35s linear infinite;
    animation-delay: -5s;
    /* Already 5s into animation */
}

.x2 {
    top: 20vh;
    left: -200px;
    transform: scale(0.45);
    opacity: 0.5;
    animation: moveclouds 45s linear infinite;
    animation-delay: -25s;
    /* Start in middle of screen */
}

.x3 {
    top: 35vh;
    left: -200px;
    transform: scale(0.7);
    opacity: 0.6;
    animation: moveclouds 30s linear infinite;
    animation-delay: -10s;
}

.x4 {
    top: 55vh;
    left: -200px;
    transform: scale(0.5);
    opacity: 0.4;
    animation: moveclouds 40s linear infinite;
    animation-delay: -32s;
}

.x5 {
    top: 75vh;
    left: -200px;
    transform: scale(0.8);
    opacity: 0.55;
    animation: moveclouds 28s linear infinite;
    animation-delay: -15s;
}

/* NEW CLOUDS for Density */
.x6 {
    top: 10vh;
    left: -200px;
    transform: scale(0.4);
    opacity: 0.3;
    animation: moveclouds 50s linear infinite;
    animation-delay: -40s;
}

.x7 {
    top: 85vh;
    left: -200px;
    transform: scale(0.9);
    opacity: 0.65;
    animation: moveclouds 32s linear infinite;
    animation-delay: -2s;
}

.x8 {
    top: 45vh;
    left: -200px;
    transform: scale(0.35);
    opacity: 0.25;
    animation: moveclouds 55s linear infinite;
    animation-delay: -18s;
}

.x9 {
    top: 65vh;
    left: -200px;
    transform: scale(0.55);
    opacity: 0.45;
    animation: moveclouds 38s linear infinite;
    animation-delay: -8s;
}


.x10 {
    top: 25vh;
    left: -200px;
    transform: scale(0.75);
    opacity: 0.6;
    animation: moveclouds 26s linear infinite;
    animation-delay: -22s;
}

/* EVEN MORE CLOUDS (x11-x20) */
.x11 {
    top: 15vh;
    left: -200px;
    transform: scale(0.5);
    opacity: 0.35;
    animation: moveclouds 30s linear infinite;
    animation-delay: -3s;
}

.x12 {
    top: 92vh;
    left: -200px;
    transform: scale(0.8);
    opacity: 0.6;
    animation: moveclouds 40s linear infinite;
    animation-delay: -28s;
}

.x13 {
    top: 32vh;
    left: -200px;
    transform: scale(0.4);
    opacity: 0.25;
    animation: moveclouds 35s linear infinite;
    animation-delay: -12s;
}

.x14 {
    top: 62vh;
    left: -200px;
    transform: scale(0.6);
    opacity: 0.45;
    animation: moveclouds 25s linear infinite;
    animation-delay: -38s;
}

.x15 {
    top: 8vh;
    left: -200px;
    transform: scale(0.3);
    opacity: 0.2;
    animation: moveclouds 50s linear infinite;
    animation-delay: -8s;
}

.x16 {
    top: 78vh;
    left: -200px;
    transform: scale(0.7);
    opacity: 0.5;
    animation: moveclouds 33s linear infinite;
    animation-delay: -20s;
}

.x17 {
    top: 42vh;
    left: -200px;
    transform: scale(0.55);
    opacity: 0.4;
    animation: moveclouds 28s linear infinite;
    animation-delay: -30s;
}

.x18 {
    top: 68vh;
    left: -200px;
    transform: scale(0.45);
    opacity: 0.3;
    animation: moveclouds 42s linear infinite;
    animation-delay: -5s;
}

.x19 {
    top: 12vh;
    left: -200px;
    transform: scale(0.65);
    opacity: 0.5;
    animation: moveclouds 36s linear infinite;
    animation-delay: -15s;
}

.x20 {
    top: 52vh;
    left: -200px;
    transform: scale(0.85);
    opacity: 0.7;
    animation: moveclouds 29s linear infinite;
    animation-delay: -35s;
}

@keyframes moveclouds {
    0% {
        margin-left: 0;
    }

    100% {
        margin-left: 120%;
    }

    /* Move past the right edge */
}

/* FOOTER BRANDING */
#custom-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 101;
    /* Above clouds, match card level or slightly higher */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#custom-footer svg {
    height: 40px;
    /* Logo size */
    width: 60px;
    fill: #ffffff;
    /* White icon */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

#custom-footer span {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

/* Main Card (.center) */
#divcenter {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.45) !important;
    /* More transparency for clouds */
    backdrop-filter: blur(8px);
    /* Less blur to see clouds moving behind */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    width: 90% !important;
    max-width: 380px !important;
    padding: 40px 30px !important;
    text-align: center;
    color: #333;
    z-index: 100;
    /* Ensure card is firmly above clouds */
}

/* Hide Legacy Elements */
.logo,
#divcenter>p {
    display: none !important;
}

/* FIX: Ensure Password/Domain Wrappers are Full Width Block Elements */
/* Removed #tr-domain to allow JS config to hide it as intended */
#tr-password {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Inputs */
input[type="text"],
input[type="password"] {
    display: block !important;
    width: 100% !important;
    height: 50px !important;
    line-height: normal !important;
    padding: 0 20px !important;
    margin-bottom: 20px !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    /* Slightly transparent input */
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;

    /* Typography */
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    color: #555 !important;
    text-align: left !important;

    transition: transform 0.2s, box-shadow 0.2s;
}

/* FIX: Placeholder Color Visibility */
::-webkit-input-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

:-moz-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

::-moz-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

:-ms-input-placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

input:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
    outline: none;
}

/* Custom Labels Injected via JS */
.custom-label {
    display: block;
    text-align: left;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    margin-top: 15px;
    padding-left: 10px;
}

/* Submit Button */
input[type="button"]#buttonLogOn {
    width: 100% !important;
    height: 50px !important;
    margin-top: 10px !important;
    border-radius: 50px !important;
    background-color: #0d4b75 !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(13, 75, 117, 0.3);
}

input[type="button"]#buttonLogOn:hover {
    background-color: #083655 !important;
    transform: translateY(-2px);
}

/* Radio Buttons Container */
#accesstypeuserpanel {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin-top: 25px !important;
}

#accesstypeuserpanel label {
    align-items: center !important;
    font-size: 12px !important;
    color: #1f2937 !important;
    font-weight: 500;
}

/* Fix 2FA Leakage */
.twofa-popin {
    display: none;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999 !important;
}

.twofa-popin:target {
    display: flex !important;
}

/* Hide TSplus validation icons */
#span-login-ok,
#span-login-ko,
#span-password-ok,
#span-password-ko {
    display: none !important;
}

/* User Icon Class */
.user-icon-circle {
    width: 80px;
    height: 80px;
    background: #0d4b75;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-icon-circle svg {
    fill: white;
    width: 40px;
    height: 40px;
}

.custom-title {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 25px;
    font-weight: 500;
}