/* Aquece Zap - Register Page Styles */

/* Force button styles following login pattern */
.btn-primary,
button.btn-primary,
#continueBtn,
#finishBtn,
#goToDashboard {
    background: linear-gradient(to right, #25D366, #34E89E) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.625rem 1rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

/* Hover effects removed for cleaner design */

/* Disabled state */
.btn-primary:disabled,
#continueBtn:disabled {
    background: #9ca3af !important;
    color: white !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Background */
.gradient-bg {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 25%, #d1fae5 50%, #a7f3d0 75%, #6ee7b7 100%);
    min-height: 100vh;
    position: relative;
}

.whatsapp-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(37, 211, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 232, 158, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(18, 140, 126, 0.1) 0%, transparent 50%);
}

/* Floating Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
}

.floating-element:nth-child(4) {
    animation-delay: -1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
    75% { transform: translateY(-15px) rotate(0.5deg); }
}

/* Register Card */
.register-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-green), var(--brand-green-light));
}

/* Progress Steps */
.progress-steps {
    max-width: 500px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active,
.step.completed {
    opacity: 1;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-light));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.step.completed .step-circle {
    background: var(--system-green);
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    position: relative;
    margin: 0 1rem;
    top: -24px;
}

.step.completed + .step-line {
    background: var(--system-green);
}

@keyframes glow {
    from { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3); }
    to { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5); }
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeInSlide 0.5s ease-out;
}

.step-content.active {
    display: block;
}

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

/* Form Fields */
.input-field {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 16px; /* Prevent zoom on iOS */
    position: relative;
    z-index: 0;
}

/* Form field container with fixed spacing */
.form-field {
    margin-bottom: 1.5rem;
}

.form-field:last-child {
    margin-bottom: 0;
}

/* Icon positioning fix */
.relative {
    position: relative;
}

.absolute.inset-y-0.left-0 {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
    pointer-events: none;
    z-index: 10;
    height: auto;
}

.input-field:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1);
}

.input-field.error {
    border-color: var(--system-red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-field.success {
    border-color: var(--system-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.field-error {
    color: var(--system-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.field-error:before {
    content: '⚠';
    margin-right: 0.25rem;
}

.field-error.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    flex: 1;
    transition: all 0.3s ease;
}

.strength-bar.active {
    background: var(--brand-green);
}

.strength-bar.weak {
    background: var(--system-red);
}

.strength-bar.medium {
    background: var(--system-yellow);
}

.strength-bar.strong {
    background: var(--system-green);
}

.strength-text {
    margin-top: 4px;
    transition: color 0.3s ease;
}

.strength-text.weak {
    color: var(--system-red);
}

.strength-text.medium {
    color: var(--system-yellow);
}

.strength-text.strong {
    color: var(--system-green);
}

/* Password Match Validation */
.input-field.password-match {
    border-color: var(--system-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.input-field.password-mismatch {
    border-color: var(--system-red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.password-match-message {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.password-match-message i {
    font-size: 0.625rem;
    margin-right: 0.25rem;
}

/* Password Toggle */
.password-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
    pointer-events: auto !important; /* Override any pointer-events: none */
    z-index: 20 !important; /* Ensure it's above other elements */
}

.password-toggle:hover {
    color: var(--brand-green);
}

/* Hide default browser password reveal icon */
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-inner-spin-button,
input[type="password"]::-webkit-outer-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Additional cross-browser password field styling */
input[type="password"] {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    -ms-appearance: none !important;
    appearance: none !important;
}

/* Specific Edge/IE password field styling */
input[type="password"]::-ms-input-placeholder {
    color: #9ca3af !important;
}

/* Force hide any remaining Edge password reveal */
@supports (-ms-ime-align:auto) {
    input[type="password"] {
        padding-right: 3rem !important;
    }
    
    input[type="password"]::-ms-reveal,
    input[type="password"]::-ms-clear {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* Ensure our custom toggle is visible for password field */
#password {
    padding-right: 3rem !important;
}

/* Ensure confirm password field has consistent styling */
#confirmPassword {
    padding-right: 1rem !important;
}

input[type="text"] + .password-toggle,
input[type="password"] + .password-toggle {
    display: flex !important;
}

/* Plan Cards */
.plans-grid {
    perspective: 1000px;
}

.plan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Subtle hover effect for plan cards */
.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.plan-card.selected {
    border-color: var(--brand-green);
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.plan-card.popular {
    position: relative;
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-light));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle hover animation for plan icons */
.plan-card:hover .plan-icon {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.2);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(52, 232, 158, 0.1));
    color: var(--brand-green);
}

/* Glow effect on icon hover */
.plan-card:hover .plan-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.1) 0%, transparent 70%);
    animation: iconGlow 0.6s ease-out;
}

.plan-card.selected .plan-icon {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-light));
    color: white;
}

@keyframes iconGlow {
    0% { box-shadow: 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 0 20px rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 0 0 rgba(37, 211, 102, 0.4); }
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

/* Hover effect for plan name */
.plan-card:hover .plan-name {
    color: var(--brand-green);
    transform: translateY(-2px);
}

.currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.plan-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.plan-features {
    margin-bottom: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Subtle hover animation for features */
.plan-card:hover .feature {
    transform: translateX(4px);
    background: rgba(37, 211, 102, 0.05);
    color: var(--brand-green-dark);
}

/* Sequential animation delay for features */
.plan-card:hover .feature:nth-child(1) {
    transition-delay: 0.05s;
}

.plan-card:hover .feature:nth-child(2) {
    transition-delay: 0.1s;
}

.plan-card:hover .feature:nth-child(3) {
    transition-delay: 0.15s;
}

.plan-card:hover .feature:nth-child(4) {
    transition-delay: 0.2s;
}

.plan-card:hover .feature:nth-child(5) {
    transition-delay: 0.25s;
}

.feature-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    color: var(--system-green);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Icon animation on feature hover */
.plan-card:hover .feature .feature-icon {
    transform: scale(1.1);
    color: var(--brand-green);
}

.feature.disabled {
    color: var(--text-secondary);
    opacity: 0.6;
}

.feature.disabled .feature-icon {
    color: var(--system-red);
}

.plan-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

/* Removed hover effects as requested */

.plan-btn.selected {
    background: var(--brand-green);
    color: white;
    border-color: var(--brand-green);
    font-weight: 600;
}

/* Removed all shimmer and hover effects as requested */

/* Step Navigation */
.step-navigation {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* Success Icon */
.success-icon {
    animation: successPop 0.6s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Buttons - Clean design without animations */

/* Specific button styles */
#continueBtn,
#finishBtn,
#goToDashboard {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-light)) !important;
    color: white !important;
    border: none !important;
}

#continueBtn:disabled,
#finishBtn:disabled {
    background: #9ca3af !important;
    color: white !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.btn-outline {
    transition: all 0.2s ease;
}

/* Back button specific styling - only animation, no color change */
#backBtn {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

#backBtn:hover {
    background-color: transparent !important;
    color: #2F3349 !important; /* Mantém a cor original do texto */
    transform: translateX(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .register-container {
        padding: 1rem;
    }
    
    .register-card {
        padding: 1.5rem;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-line {
        margin: 0 0.5rem;
        top: -20px;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .plan-card {
        padding: 1rem;
    }
    
    /* Removed mobile hover as requested */
    
    .plan-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .amount {
        font-size: 2rem;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-field {
        font-size: 16px; /* Prevent zoom on mobile */
    }
}

@media (max-width: 480px) {
    .register-header h1 {
        font-size: 2rem;
    }
    
    .register-header p {
        font-size: 1rem;
    }
    
    .progress-steps {
        max-width: 100%;
    }
    
    .step-label {
        display: none;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .register-card {
        padding: 1rem;
    }
}

/* Loading States - Updated to match login style */
.btn-loading {
    cursor: not-allowed !important;
    opacity: 0.9 !important;
}

.btn-loading .btn-icon {
    display: none !important;
}

.btn-loader {
    transition: opacity 0.3s ease;
}

.btn-loader.hidden {
    display: none;
}

.btn-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
    
    .plan-badge {
        animation: none;
    }
}

/* Form field positioning - exclude toggle buttons */
.form-field .relative .absolute.inset-y-0.right-0:not(.password-toggle) {
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    padding-right: 0.75rem;
}

/* Character counter warning colors */
.text-yellow-500 {
    color: #f59e0b !important;
}

.text-red-500 {
    color: #ef4444 !important;
}

/* Field validation states for character limits */
.input-field.field-too-long {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

.input-field.fullname-too-long {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* Field error message styles */
.field-error-message {
    display: flex;
    align-items: center;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    animation: fadeInError 0.3s ease-out;
}

.field-error-message i {
    margin-right: 0.25rem;
    font-size: 0.625rem;
}

/* Full name warning styles */
.fullname-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    animation: fadeInWarning 0.3s ease-out;
}

.fullname-warning .text-red-700 {
    color: #b91c1c;
    line-height: 1.4;
}

.fullname-warning .fas.fa-exclamation-triangle {
    color: #ef4444;
    margin-right: 0.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Animation keyframes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

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

@keyframes fadeInWarning {
    from {
        opacity: 0;
        transform: translateY(-8px);
        scale: 0.95;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        scale: 1;
    }
}

/* Password field specific adjustments for toggle button */
#password {
    padding-right: 3rem !important; /* Space for toggle button */
}

#confirmPassword {
    padding-right: 1rem !important; /* Normal padding */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fullname-warning {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .fullname-warning .text-red-700 {
        font-size: 0.75rem;
    }
    
    /* Adjust password field padding on mobile */
    #password {
        padding-right: 3rem !important;
    }
    
    #confirmPassword {
        padding-right: 1rem !important;
    }
}

/* Registration error message styles */
.registration-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    animation: fadeInError 0.4s ease-out;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.registration-error-message .text-red-700 {
    color: #b91c1c;
    line-height: 1.5;
    font-size: 0.875rem;
}

.registration-error-message .fas.fa-exclamation-circle {
    color: #ef4444;
    margin-right: 0.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .plan-card {
        border-width: 3px;
    }
    
    .input-field {
        border-width: 3px;
    }
    
    .btn-primary,
    .btn-outline {
        border-width: 3px;
    }
    
    .field-error-message {
        font-weight: 700;
    }
    
    .fullname-warning {
        border-width: 2px;
    }
    
    .registration-error-message {
        border-width: 2px;
        font-weight: 700;
    }
}
