

<?php $__env->startSection('title', 'Register as Buyer - TheMiniPort'); ?>

<?php $__env->startSection('content'); ?>
<style>
    .register-container {
        min-height: 100vh;
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        padding: 60px 0;
    }
    
    .register-card {
        background: white;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        overflow: hidden;
        animation: slideUp 0.6s ease-out;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .register-header {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        padding: 40px;
        text-align: center;
        color: white;
        position: relative;
        overflow: hidden;
    }
    
    .register-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }
    
    @keyframes rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    
    .register-header h2 {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 10px;
        position: relative;
        z-index: 1;
    }
    
    .register-header p {
        font-size: 16px;
        opacity: 0.9;
        position: relative;
        z-index: 1;
        margin-bottom: 0;
    }
    
    .icon-badge {
        width: 80px;
        height: 80px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        position: relative;
        z-index: 1;
    }
    
    .icon-badge i {
        font-size: 36px;
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .register-body {
        padding: 40px;
    }
    
    .form-group {
        margin-bottom: 25px;
        position: relative;
    }
    
    .form-label {
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 8px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .form-label i {
        color: #f97316;
        font-size: 16px;
    }
    
    .form-control-modern {
        height: 50px;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        padding: 12px 20px 12px 45px;
        font-size: 15px;
        transition: all 0.3s ease;
        background: #f8fafc;
    }
    
    .form-control-modern:focus {
        border-color: #f97316;
        box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
        background: white;
        outline: none;
    }
    
    .input-icon {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 18px;
        pointer-events: none;
    }
    
    .input-wrapper {
        position: relative;
    }
    
    .password-toggle {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #94a3b8;
        cursor: pointer;
        font-size: 18px;
        padding: 5px;
        transition: color 0.3s ease;
    }
    
    .password-toggle:hover {
        color: #f97316;
    }
    
    .password-strength {
        height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
        margin-top: 8px;
        overflow: hidden;
        display: none;
    }
    
    .password-strength-bar {
        height: 100%;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .strength-weak { 
        width: 33%; 
        background: #ef4444; 
    }
    
    .strength-medium { 
        width: 66%; 
        background: #f59e0b; 
    }
    
    .strength-strong { 
        width: 100%; 
        background: #10b981; 
    }
    
    .password-hint {
        font-size: 12px;
        color: #64748b;
        margin-top: 6px;
        display: none;
    }
    
    .btn-register {
        width: 100%;
        height: 54px;
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        border: none;
        border-radius: 12px;
        color: white;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        margin-top: 10px;
    }
    
    .btn-register::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;
    }
    
    .btn-register:hover::before {
        left: 100%;
    }
    
    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
    }
    
    .btn-register:active {
        transform: translateY(0);
    }
    
    .divider {
        text-align: center;
        margin: 30px 0;
        position: relative;
    }
    
    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #e2e8f0;
    }
    
    .divider span {
        background: white;
        padding: 0 15px;
        position: relative;
        color: #94a3b8;
        font-size: 14px;
    }
    
    .social-login {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .btn-social {
        height: 48px;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-weight: 600;
        color: #2d3748;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .btn-social:hover {
        border-color: #f97316;
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    
    .btn-social img {
        width: 20px;
        height: 20px;
    }
    
    .features-list {
        background: #f8fafc;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .feature-item {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        font-size: 14px;
        color: #475569;
    }
    
    .feature-item:last-child {
        margin-bottom: 0;
    }
    
    .feature-item i {
        color: #10b981;
        font-size: 16px;
    }
    
    .login-link {
        text-align: center;
        margin-top: 25px;
        padding-top: 25px;
        border-top: 1px solid #e2e8f0;
        font-size: 14px;
    }
    
    .login-link a {
        color: #f97316;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .login-link a:hover {
        color: #ea580c;
        text-decoration: underline;
    }
    
    .error-message {
        background: #fee2e2;
        border: 1px solid #fecaca;
        color: #991b1b;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .success-message {
        background: #d1fae5;
        border: 1px solid #a7f3d0;
        color: #065f46;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    @media (max-width: 768px) {
        .register-container {
            padding: 20px 15px;
        }
        
        .register-body {
            padding: 30px 20px;
        }
        
        .social-login {
            grid-template-columns: 1fr;
        }
    }
</style>

<div class="register-container">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-5 col-md-7">
                <div class="register-card">
                    <!-- Header -->
                    <div class="register-header">
                        <div class="icon-badge">
                            <i class="bi bi-person-plus-fill"></i>
                        </div>
                        <h2>Join as a Buyer</h2>
                        <p>Start sourcing quality products from verified sellers</p>
                    </div>

                    <!-- Body -->
                    <div class="register-body">
                        <!-- Error Messages -->
                        <?php if($errors->any()): ?>
                            <div class="error-message">
                                <i class="bi bi-exclamation-circle-fill"></i>
                                <div>
                                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div><?php echo e($error); ?></div>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </div>
                            </div>
                        <?php endif; ?>

                        <!-- Success Message -->
                        <?php if(session('success')): ?>
                            <div class="success-message">
                                <i class="bi bi-check-circle-fill"></i>
                                <div><?php echo e(session('success')); ?></div>
                            </div>
                        <?php endif; ?>

                        <!-- Features List -->
                        <div class="features-list">
                            <div class="feature-item">
                                <i class="bi bi-check-circle-fill"></i>
                                <span>Access thousands of verified sellers</span>
                            </div>
                            <div class="feature-item">
                                <i class="bi bi-check-circle-fill"></i>
                                <span>Post unlimited buy requirements</span>
                            </div>
                            <div class="feature-item">
                                <i class="bi bi-check-circle-fill"></i>
                                <span>Get competitive quotes instantly</span>
                            </div>
                        </div>

                        <!-- Registration Form -->
                        <form method="POST" action="<?php echo e(route('register.buyer')); ?>" id="registerForm">
                            <?php echo csrf_field(); ?>

                            <!-- Name -->
                            <div class="form-group">
                                <label class="form-label">
                                    <i class="bi bi-person"></i>
                                    Full Name
                                </label>
                                <div class="input-wrapper">
                                    <i class="input-icon bi bi-person-fill"></i>
                                    <input type="text" 
                                           class="form-control form-control-modern" 
                                           id="name" 
                                           name="name" 
                                           value="<?php echo e(old('name')); ?>"
                                           placeholder="Enter your full name"
                                           required 
                                           autofocus>
                                </div>
                            </div>

                            <!-- Email -->
                            <div class="form-group">
                                <label class="form-label">
                                    <i class="bi bi-envelope"></i>
                                    Email Address
                                </label>
                                <div class="input-wrapper">
                                    <i class="input-icon bi bi-envelope-fill"></i>
                                    <input type="email" 
                                           class="form-control form-control-modern" 
                                           id="email" 
                                           name="email" 
                                           value="<?php echo e(old('email')); ?>"
                                           placeholder="your.email@example.com"
                                           required>
                                </div>
                            </div>

                            <!-- Password -->
                            <div class="form-group">
                                <label class="form-label">
                                    <i class="bi bi-lock"></i>
                                    Password
                                </label>
                                <div class="input-wrapper">
                                    <i class="input-icon bi bi-lock-fill"></i>
                                    <input type="password" 
                                           class="form-control form-control-modern" 
                                           id="password" 
                                           name="password" 
                                           placeholder="Create a strong password"
                                           required>
                                    <button type="button" class="password-toggle" onclick="togglePassword('password')">
                                        <i class="bi bi-eye" id="password-icon"></i>
                                    </button>
                                </div>
                                <div class="password-strength" id="password-strength">
                                    <div class="password-strength-bar" id="strength-bar"></div>
                                </div>
                                <div class="password-hint" id="password-hint">
                                    Use at least 8 characters with letters and numbers
                                </div>
                            </div>

                            <!-- Confirm Password -->
                            <div class="form-group">
                                <label class="form-label">
                                    <i class="bi bi-shield-check"></i>
                                    Confirm Password
                                </label>
                                <div class="input-wrapper">
                                    <i class="input-icon bi bi-shield-fill-check"></i>
                                    <input type="password" 
                                           class="form-control form-control-modern" 
                                           id="password_confirmation" 
                                           name="password_confirmation" 
                                           placeholder="Re-enter your password"
                                           required>
                                    <button type="button" class="password-toggle" onclick="togglePassword('password_confirmation')">
                                        <i class="bi bi-eye" id="password_confirmation-icon"></i>
                                    </button>
                                </div>
                            </div>

                            <!-- Submit Button -->
                            <button type="submit" class="btn-register">
                                <i class="bi bi-rocket-takeoff me-2"></i>
                                Create Account
                            </button>
                        </form>

                        

                        <!-- Login Link -->
                        <div class="login-link">
                            Already have an account? <a href="<?php echo e(route('login')); ?>">Sign In</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
// Password visibility toggle
function togglePassword(fieldId) {
    const field = document.getElementById(fieldId);
    const icon = document.getElementById(fieldId + '-icon');
    
    if (field.type === 'password') {
        field.type = 'text';
        icon.classList.remove('bi-eye');
        icon.classList.add('bi-eye-slash');
    } else {
        field.type = 'password';
        icon.classList.remove('bi-eye-slash');
        icon.classList.add('bi-eye');
    }
}

// Password strength checker
const passwordField = document.getElementById('password');
const strengthBar = document.getElementById('strength-bar');
const strengthDiv = document.getElementById('password-strength');
const hintDiv = document.getElementById('password-hint');

passwordField.addEventListener('input', function() {
    const password = this.value;
    
    if (password.length === 0) {
        strengthDiv.style.display = 'none';
        hintDiv.style.display = 'none';
        return;
    }
    
    strengthDiv.style.display = 'block';
    hintDiv.style.display = 'block';
    
    let strength = 0;
    
    // Check length
    if (password.length >= 8) strength++;
    if (password.length >= 12) strength++;
    
    // Check for numbers
    if (/\d/.test(password)) strength++;
    
    // Check for lowercase and uppercase
    if (/[a-z]/.test(password) && /[A-Z]/.test(password)) strength++;
    
    // Check for special characters
    if (/[^A-Za-z0-9]/.test(password)) strength++;
    
    // Update strength bar
    strengthBar.className = 'password-strength-bar';
    
    if (strength <= 2) {
        strengthBar.classList.add('strength-weak');
        hintDiv.textContent = 'Weak password. Add numbers and special characters.';
        hintDiv.style.color = '#ef4444';
    } else if (strength <= 4) {
        strengthBar.classList.add('strength-medium');
        hintDiv.textContent = 'Medium strength. Consider adding more variety.';
        hintDiv.style.color = '#f59e0b';
    } else {
        strengthBar.classList.add('strength-strong');
        hintDiv.textContent = 'Strong password! Good job.';
        hintDiv.style.color = '#10b981';
    }
});

// Form animation on focus
const formControls = document.querySelectorAll('.form-control-modern');
formControls.forEach(control => {
    control.addEventListener('focus', function() {
        this.parentElement.style.transform = 'scale(1.02)';
        this.parentElement.style.transition = 'transform 0.2s ease';
    });
    
    control.addEventListener('blur', function() {
        this.parentElement.style.transform = 'scale(1)';
    });
});
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u281583269/domains/theminiport.com/public_html/resources/views/auth/register-buyer.blade.php ENDPATH**/ ?>