/**
 * Login Page - PREMIUM STYLES v2.0
 * CSS separado para a página de login do WooCommerce
 */

/* Garantir scroll completo da página */
body.woocommerce-account:not(.logged-in) {
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: linear-gradient(135deg, #0a0a15 0%, #0f0f23 50%, #1a1a2e 100%) !important;
    position: relative;
}

.woocommerce-account:not(.logged-in) .woocommerce {
    min-height: auto !important;
    padding-bottom: 80px !important;
    position: relative;
    z-index: 2;
}

/* Particles.js Background Container */
#wplm-particles-bg {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Container principal da página de login */
.woocommerce-form-login-toggle,
.u-columns.col2-set,
#customer_login.col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    max-width: 1200px !important;
    margin: 80px auto 100px auto !important;
    padding: 0 40px 40px 40px !important;
    box-sizing: border-box !important;
    min-height: auto !important;
}

/* Cards individuais com efeitos premium */
.u-column1,
.u-column2,
.col-1,
.col-2 {
    background: rgba(26, 26, 46, 0.85) !important;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px !important;
    border: 2px solid transparent !important;
    background-clip: padding-box;
    padding: 50px 40px 60px 40px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(0, 173, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: visible !important;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100% !important;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    min-height: fit-content !important;
}

/* Borda animada com gradiente nos cards */
.u-column1::before,
.u-column2::before,
.col-1::before,
.col-2::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #00adff, #0099e6, #00adff);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 3s linear infinite;
    opacity: 0.6;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hover effect nos cards */
.u-column1:hover,
.u-column2:hover,
.col-1:hover,
.col-2:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 15px 40px rgba(0, 173, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.u-column1:hover::before,
.u-column2:hover::before,
.col-1:hover::before,
.col-2:hover::before {
    opacity: 1;
    animation: borderRotate 1.5s linear infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Títulos */
#customer_login h2,
.woocommerce-form-login h2,
.woocommerce-form-register h2 {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    margin: 0 0 35px 0 !important;
    padding-bottom: 25px !important;
    border-bottom: 2px solid rgba(0, 173, 255, 0.3) !important;
    background: linear-gradient(135deg, #00adff 0%, #0099e6 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#customer_login h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 32px;
    background: linear-gradient(135deg, #00adff 0%, #0099e6 100%);
    border-radius: 3px;
}

/* Form Rows */
body.woocommerce-account .woocommerce-form-row,
body.woocommerce-account .form-row {
    margin-bottom: 28px !important;
    position: relative;
}

body.woocommerce-account .woocommerce-form-row label,
body.woocommerce-account .form-row label,
body.woocommerce-account label {
    display: block !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    font-size: 15px !important;
}

.woocommerce-form-row label .required {
    color: #ef4444 !important;
}

/* Campos com ícones - NOVA ESTRUTURA SEM WRAPPER */
.wplm-field-with-icon {
    position: relative;
}

.wplm-field-with-icon .wplm-input-icon {
    position: absolute;
    left: 18px;
    top: 50px; /* Ajuste para ficar abaixo do label */
    font-size: 20px;
    color: rgba(0, 173, 255, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.wplm-field-with-icon:focus-within .wplm-input-icon {
    color: #00adff;
    transform: scale(1.1);
}

/* Inputs com visual limpo e legível - FORÇAR ESTILOS */
body.woocommerce-account .woocommerce-Input,
body.woocommerce-account input.woocommerce-Input,
body.woocommerce-account input[type="text"],
body.woocommerce-account input[type="email"],
body.woocommerce-account input[type="password"],
.woocommerce-form-login input,
.woocommerce-form-register input {
    width: 100% !important;
    padding: 16px 20px 16px 54px !important;
    background: rgba(20, 20, 40, 0.9) !important;
    border: 1px solid rgba(0, 173, 255, 0.3) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: normal !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    height: auto !important;
}

body.woocommerce-account .woocommerce-Input:hover,
body.woocommerce-account input:hover {
    border-color: rgba(0, 173, 255, 0.5) !important;
    background: rgba(25, 25, 45, 0.95) !important;
}

body.woocommerce-account .woocommerce-Input:focus,
body.woocommerce-account input:focus {
    outline: none !important;
    border-color: #00adff !important;
    background: rgba(30, 30, 50, 1) !important;
    box-shadow: 0 0 0 3px rgba(0, 173, 255, 0.15) !important;
}

body.woocommerce-account .woocommerce-Input::placeholder,
body.woocommerce-account input::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

body.woocommerce-account .woocommerce-Input:focus::placeholder,
body.woocommerce-account input:focus::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Campo de senha com toggle - CORRIGIR ESTRUTURA DO WOOCOMMERCE */
.wplm-password-field {
    position: relative;
}

/* Forçar o span.password-input a não quebrar o layout */
.wplm-password-field span.password-input {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}

/* Esconder TODOS os botões nativos do WooCommerce */
.wplm-password-field .show-password-input,
.wplm-password-field button.show-password-input,
span.password-input button,
span.password-input .show-password-input {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Toggle de Senha customizado - POSICIONAMENTO ABSOLUTO CORRETO */
.wplm-password-field .wplm-password-toggle {
    position: absolute !important;
    right: 15px !important;
    top: 48px !important;
    background: transparent !important;
    border: none !important;
    padding: 6px !important;
    font-size: 20px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wplm-password-field .wplm-password-toggle:hover {
    color: #00adff !important;
    transform: scale(1.1) !important;
}

.wplm-password-field .wplm-password-toggle ion-icon {
    font-size: 20px !important;
}

/* Esconder botão nativo de senha do WooCommerce */
.show-password-input,
.password-input .show-password-input,
span.password-input button {
    display: none !important;
}

/* Ajustar input dentro do wrapper de senha nativo */
.password-input {
    width: 100% !important;
    display: block !important;
    position: relative !important;
}

.password-input input {
    width: 100% !important;
}

/* Checkbox Lembre-me */
.woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-bottom: 25px !important;
}

.woocommerce-form__input-checkbox {
    width: 22px !important;
    height: 22px !important;
    cursor: pointer !important;
    accent-color: #00adff !important;
}

/* Botões limpos e legíveis - FORÇAR ESTILOS */
body.woocommerce-account .woocommerce-button,
body.woocommerce-account .woocommerce-Button,
body.woocommerce-account button[type="submit"],
body.woocommerce-account .button,
.woocommerce-form-login button,
.woocommerce-form-register button,
.woocommerce-ResetPassword button {
    width: 100% !important;
    padding: 16px 30px !important;
    background: linear-gradient(135deg, #00adff 0%, #0099e6 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 173, 255, 0.35) !important;
    position: relative;
    overflow: hidden;
    height: auto !important;
    line-height: normal !important;
}

/* Shine effect simples */
body.woocommerce-account .woocommerce-button::before,
body.woocommerce-account .woocommerce-Button::before,
body.woocommerce-account button[type="submit"]::before,
body.woocommerce-account .button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

body.woocommerce-account .woocommerce-button:hover,
body.woocommerce-account .woocommerce-Button:hover,
body.woocommerce-account button[type="submit"]:hover,
body.woocommerce-account .button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 173, 255, 0.5) !important;
}

body.woocommerce-account .woocommerce-button:hover::before,
body.woocommerce-account .woocommerce-Button:hover::before,
body.woocommerce-account button[type="submit"]:hover::before {
    left: 100%;
}

body.woocommerce-account .woocommerce-button:active,
body.woocommerce-account .woocommerce-Button:active,
body.woocommerce-account button[type="submit"]:active,
body.woocommerce-account .button:active {
    transform: translateY(0) !important;
}

/* Ripple effect animation */
.wplm-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Mensagens de Erro/Sucesso */
body.woocommerce-account .woocommerce-error,
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info {
    background: rgba(239, 68, 68, 0.15) !important;
    border-left: 4px solid #ef4444 !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    margin: 0 0 30px 0 !important;
    border-radius: 10px !important;
    list-style: none !important;
}

body.woocommerce-account .woocommerce-error li,
body.woocommerce-account .woocommerce-message li {
    color: #ffffff !important;
    font-size: 15px !important;
    margin: 0 !important;
}

body.woocommerce-account .woocommerce-error strong {
    color: #ff6b6b !important;
}

body.woocommerce-account .woocommerce-message {
    background: rgba(34, 197, 94, 0.15) !important;
    border-left-color: #22c55e !important;
}

/* Checkbox Lembre-me */
body.woocommerce-account .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-bottom: 20px !important;
    font-size: 14px !important;
}

body.woocommerce-account .woocommerce-form__input-checkbox {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #00adff !important;
    margin: 0 !important;
}

/* Link Perdeu Senha */
body.woocommerce-account .woocommerce-LostPassword,
body.woocommerce-account .lost_password {
    text-align: center !important;
    margin-top: 20px !important;
}

body.woocommerce-account .woocommerce-LostPassword a,
body.woocommerce-account .lost_password a {
    color: #00adff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    padding: 4px 0 !important;
    border-bottom: 1px solid transparent !important;
}

body.woocommerce-account .woocommerce-LostPassword a:hover,
body.woocommerce-account .lost_password a:hover {
    color: #0099e6 !important;
    border-bottom-color: #0099e6 !important;
}

/* Garantir que os links sejam clicáveis */
body.woocommerce-account .woocommerce-LostPassword a,
body.woocommerce-account .lost_password a,
.wplm-back-to-login a {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Ajustar form-row que contém checkbox e botão */
body.woocommerce-account .woocommerce-form-login .form-row:not(.wplm-field-with-icon),
body.woocommerce-account .woocommerce-form-register .form-row:not(.wplm-field-with-icon) {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* Limpar estilos conflitantes do wrapper de senha */
body.woocommerce-account span.password-input input {
    width: 100% !important;
    padding-right: 45px !important;
}

.woocommerce-LostPassword a::after,
.lost_password a::after {
    content: '→';
    transition: transform 0.3s ease;
}

.woocommerce-LostPassword a:hover,
.lost_password a:hover {
    color: #0099e6 !important;
}

.woocommerce-LostPassword a:hover::after,
.lost_password a:hover::after {
    transform: translateX(4px);
}

/* Texto do Cadastro */
.u-column2 p,
.col-2 p {
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.7 !important;
    margin-bottom: 25px !important;
    font-size: 15px !important;
}

/* Messages */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    background: rgba(239, 68, 68, 0.1) !important;
    border-left: 4px solid #ef4444 !important;
    color: #ffffff !important;
    padding: 18px 24px !important;
    margin: 0 20px 30px 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2) !important;
    animation: slideInDown 0.4s ease-out;
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-message {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left-color: #10b981 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2) !important;
}

.woocommerce-info {
    background: rgba(0, 173, 255, 0.1) !important;
    border-left-color: #00adff !important;
    box-shadow: 0 4px 15px rgba(0, 173, 255, 0.2) !important;
}

/* Responsive */
@media (max-width: 1000px) {
    .u-columns.col2-set,
    #customer_login.col2-set {
        grid-template-columns: 1fr !important;
        padding: 0 20px !important;
        gap: 40px !important;
    }
}

@media (max-width: 768px) {
    .u-columns.col2-set,
    #customer_login.col2-set {
        margin: 40px auto !important;
        padding: 0 15px !important;
    }
    
    .u-column1,
    .u-column2,
    .col-1,
    .col-2 {
        padding: 40px 30px !important;
    }
    
    #customer_login h2 {
        font-size: 26px !important;
    }
}

@media (max-width: 480px) {
    .u-column1,
    .u-column2,
    .col-1,
    .col-2 {
        padding: 35px 25px !important;
    }
    
    .woocommerce-Input {
        padding: 14px 18px 14px 50px !important;
    }
}

/* Desktop: usar inline-flex apenas em telas largas para melhor centralização */
@media (min-width: 1100px) {
    .woocommerce-form-login-toggle,
    .u-columns.col2-set,
    #customer_login.col2-set {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 48px !important;
        margin: 80px auto 100px auto !important;
        padding: 0 20px !important;
    }

    /* Forçar largura fixa/consistente dos cards para evitar cortes visuais */
    .woocommerce-form-login-toggle > .u-column1,
    .woocommerce-form-login-toggle > .u-column2,
    .u-columns.col2-set > .u-column1,
    .u-columns.col2-set > .u-column2,
    #customer_login.col2-set > .u-column1,
    #customer_login.col2-set > .u-column2 {
        display: block !important;
        width: 520px !important;
        max-width: 48% !important;
    }
}

/* ========================================
   LOST PASSWORD PAGE STYLES
   ======================================== */

.wplm-lost-password-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

.wplm-lost-password-card {
    max-width: 500px;
    width: 100%;
    background: rgba(26, 26, 46, 0.85) !important;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px !important;
    border: 2px solid transparent !important;
    background-clip: padding-box;
    padding: 50px 40px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(0, 173, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    position: relative;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.wplm-lost-password-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #00adff, #0099e6, #00adff);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 3s linear infinite;
    opacity: 0.6;
}

.wplm-lost-password-card:hover::before {
    opacity: 1;
    animation: borderRotate 1.5s linear infinite;
}

.wplm-lost-password-card h2 {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    margin: 0 0 25px 0 !important;
    padding-bottom: 20px !important;
    border-bottom: 2px solid rgba(0, 173, 255, 0.3) !important;
    background: linear-gradient(135deg, #00adff 0%, #0099e6 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text;
    text-align: center;
}

.wplm-lost-password-description {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 30px !important;
    text-align: center;
}

.wplm-back-to-login {
    text-align: center !important;
    margin-top: 25px !important;
}

.wplm-back-to-login a {
    color: #00adff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    background: rgba(0, 173, 255, 0.1) !important;
    border: 1px solid rgba(0, 173, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.wplm-back-to-login a:hover {
    color: #ffffff !important;
    background: rgba(0, 173, 255, 0.2) !important;
    border-color: #00adff !important;
    transform: translateX(-5px) !important;
}

.wplm-back-to-login a ion-icon {
    font-size: 20px !important;
}

/* Reforçar empilhamento limpo para tablets / mobile */
@media (max-width: 1000px) {
    .woocommerce-form-login-toggle,
    .u-columns.col2-set,
    #customer_login.col2-set {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        margin: 40px auto !important;
        padding: 0 16px !important;
    }

    .u-column1,
    .u-column2,
    .col-1,
    .col-2 {
        width: 100% !important;
    }
    
    .wplm-lost-password-card {
        padding: 40px 30px !important;
    }
}
