// Authentication Forms Styles
// Login, Registration, and Comment forms

// Auth preset badge
.form-preset-card {
    &.auth-preset {
        border: 2px solid #4a6cf7;
        
        .preset-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            z-index: 5;
            box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
            animation: badge-pulse 2s infinite;
        }
    }
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

// Comment custom fields display
.comment-custom-fields {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-left: 3px solid #4a6cf7;
    border-radius: 4px;
    
    .comment-custom-field {
        margin-bottom: 5px;
        font-size: 14px;
        
        &:last-child {
            margin-bottom: 0;
        }
        
        strong {
            color: #333;
            font-weight: 600;
        }
    }
}

// Username availability checker
.simpleform-username-field {
    position: relative;
    
    &.checking {
        &::after {
            content: 'Checking...';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 12px;
            color: #999;
        }
    }
    
    &.available {
        border-color: #4caf50 !important;
        
        &::after {
            content: '✓ Available';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 12px;
            color: #4caf50;
            font-weight: 600;
        }
    }
    
    &.taken {
        border-color: #f44336 !important;
        
        &::after {
            content: '✗ Already taken';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 12px;
            color: #f44336;
            font-weight: 600;
        }
    }
}

// Password strength meter
.simpleform-password-strength {
    position: relative;
    
    & + .password-strength-meter {
        margin-top: 5px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        overflow: hidden;
        
        .strength-bar {
            height: 100%;
            transition: width 0.3s ease, background-color 0.3s ease;
            
            &.weak {
                width: 33%;
                background-color: #f44336;
            }
            
            &.medium {
                width: 66%;
                background-color: #ff9800;
            }
            
            &.strong {
                width: 100%;
                background-color: #4caf50;
            }
        }
        
        & + .strength-text {
            display: block;
            margin-top: 3px;
            font-size: 12px;
            
            &.weak {
                color: #f44336;
            }
            
            &.medium {
                color: #ff9800;
            }
            
            &.strong {
                color: #4caf50;
            }
        }
    }
}

// Auth links styling
.simpleform-auth-links {
    text-align: center;
    margin-top: 15px;
    
    a {
        color: #4a6cf7;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.2s ease;
        
        &:hover {
            color: #3c57d0;
            text-decoration: underline;
        }
    }
}

// Remember me toggle
.simpleform-remember-field {
    .switch-label {
        display: flex;
        align-items: center;
        cursor: pointer;
        user-select: none;
        
        .switch-input {
            position: relative;
            width: 44px;
            height: 24px;
            margin-right: 10px;
            
            &::before {
                content: '';
                position: absolute;
                width: 100%;
                height: 100%;
                background: #ccc;
                border-radius: 12px;
                transition: background 0.3s ease;
            }
            
            &::after {
                content: '';
                position: absolute;
                width: 20px;
                height: 20px;
                background: white;
                border-radius: 50%;
                top: 2px;
                left: 2px;
                transition: transform 0.3s ease;
            }
            
            &:checked {
                &::before {
                    background: #4a6cf7;
                }
                
                &::after {
                    transform: translateX(20px);
                }
            }
        }
    }
}

// User profile custom fields
.form-table {
    .simpleform-custom-field {
        th {
            font-weight: 600;
            color: #333;
        }
        
        td {
            input[type="text"],
            input[type="email"],
            input[type="url"],
            input[type="tel"],
            textarea {
                width: 100%;
                max-width: 400px;
            }
        }
    }
}

// Admin comment meta box
#simpleform_comment_fields {
    .form-table {
        th {
            width: 30%;
            font-weight: 600;
        }
        
        td {
            word-break: break-word;
        }
    }
}
