/**
 * Spartan Auth Forms - Login & Register
 */

/* Container */
.spartan-auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.spartan-auth-card {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Tabs */
.spartan-auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.spartan-auth-tab {
    flex: 1;
    padding: 18px 24px;
    background: #f9fafb;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.spartan-auth-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.spartan-auth-tab.active {
    background: white;
    color: #05307A;
}

.spartan-auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #05307A;
}

/* Content */
.spartan-auth-content {
    display: none;
    padding: 32px;
}

.spartan-auth-content.active {
    display: block;
}

.spartan-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Form Fields */
.spartan-auth-content .form-row {
    margin-bottom: 20px;
}

.spartan-auth-content label,
.spartan-auth-card label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

.spartan-auth-content label .required {
    color: #dc2626;
}

.spartan-auth-content .input-text,
.spartan-auth-content input[type="text"],
.spartan-auth-content input[type="email"],
.spartan-auth-content input[type="password"],
.spartan-auth-content input[type="tel"],
.spartan-auth-card .input-text,
.spartan-auth-card input[type="text"],
.spartan-auth-card input[type="email"],
.spartan-auth-card input[type="password"],
.spartan-auth-card input[type="tel"] {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #111827 !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.spartan-auth-content .input-text:focus,
.spartan-auth-content input:focus,
.spartan-auth-card .input-text:focus,
.spartan-auth-card input:focus {
    outline: none !important;
    border-color: #05307A !important;
    box-shadow: 0 0 0 3px rgba(5, 48, 122, 0.1) !important;
}

.spartan-auth-content .input-text::placeholder,
.spartan-auth-content input::placeholder {
    color: #9ca3af;
}

/* Half width rows */
.spartan-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spartan-form-row-half .form-row {
    margin-bottom: 20px;
}

/* Remember me */
.spartan-remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px !important;
}

.spartan-remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 0;
}

.spartan-remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #05307A;
    cursor: pointer;
}

/* Buttons */
.spartan-btn-primary {
    width: 100%;
    padding: 16px 24px !important;
    background: linear-gradient(135deg, #05307A 0%, #042559 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none !important;
}

.spartan-btn-primary:hover {
    background: linear-gradient(135deg, #042559 0%, #031a3d 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 48, 122, 0.3);
}

.spartan-btn-primary:active {
    transform: translateY(0);
}

/* Lost password */
.lost_password {
    text-align: center;
    margin-top: 20px !important;
}

.lost_password a {
    color: #05307A;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.lost_password a:hover {
    text-decoration: underline;
}

/* Password notice */
.spartan-password-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 20px;
}

/* WooCommerce notices */
.woocommerce-notices-wrapper {
    margin-bottom: 20px;
}

.woocommerce-message,
.woocommerce-info {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 14px 16px;
    color: #065f46;
    font-size: 14px;
    margin-bottom: 16px;
}

.woocommerce-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 14px 16px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
    list-style: none;
}

.woocommerce-error li {
    margin: 0;
}

/* Password strength meter */
.woocommerce-password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.woocommerce-password-strength.short {
    background: #fef2f2;
    color: #991b1b;
}

.woocommerce-password-strength.bad {
    background: #fef2f2;
    color: #991b1b;
}

.woocommerce-password-strength.good {
    background: #fef3c7;
    color: #92400e;
}

.woocommerce-password-strength.strong {
    background: #ecfdf5;
    color: #065f46;
}

.woocommerce-password-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* Mobile */
@media (max-width: 640px) {
    .spartan-auth-container {
        padding: 20px 16px;
        min-height: auto;
    }
    
    .spartan-auth-card {
        border-radius: 12px;
    }
    
    .spartan-auth-content {
        padding: 24px 20px;
    }
    
    .spartan-auth-title {
        font-size: 20px;
    }
    
    .spartan-form-row-half {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .spartan-auth-tab {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Hide default WooCommerce form styling */
.woocommerce-form-login .woocommerce-form-row,
.woocommerce-form-register .woocommerce-form-row {
    padding: 0;
}

/* Override Elementor/Theme styles if any */
.spartan-auth-container .woocommerce form .form-row {
    padding: 0;
    margin-bottom: 20px;
}

.spartan-auth-container .woocommerce form .form-row-first,
.spartan-auth-container .woocommerce form .form-row-last {
    width: 100%;
}

/* ===== FORÇA BRUTA - Garantir estilização ===== */
.spartan-auth-card .woocommerce-form input.input-text,
.spartan-auth-card .woocommerce-form input#username,
.spartan-auth-card .woocommerce-form input#password,
.spartan-auth-card .woocommerce-form input#reg_email,
.spartan-auth-card .woocommerce-form input#reg_password,
.spartan-auth-card .woocommerce-form input#reg_billing_first_name,
.spartan-auth-card .woocommerce-form input#reg_billing_last_name,
.spartan-auth-card .woocommerce-form input#reg_billing_cpf,
.spartan-auth-card .woocommerce-form input#reg_billing_phone {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #111827 !important;
    background: #ffffff !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.spartan-auth-card .woocommerce-form input:focus {
    border-color: #05307A !important;
    box-shadow: 0 0 0 3px rgba(5, 48, 122, 0.15) !important;
    outline: none !important;
}

/* Container do form */
.spartan-auth-card .woocommerce-form {
    margin: 0 !important;
    padding: 0 !important;
}

.spartan-auth-card .woocommerce-form .form-row {
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

/* Esconder elementos extras do WooCommerce */
.spartan-auth-container .woocommerce-privacy-policy-text,
.spartan-auth-container .woocommerce-terms-and-conditions-wrapper {
    display: none;
}

/* Ícone de mostrar senha */
.spartan-auth-card .show-password-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
}

.spartan-auth-card .password-input {
    position: relative;
}

