/* Enhanced Register Styles - Mobile-First Design */
/* assets/css/register-enhanced.css */

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --accent-color: #6f42c1;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-light: #999999;
    --border-color: #e5e7eb;
    --border-focus: #007bff;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

.register-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-light);
    min-height: 100vh;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container - Mobile First */
.register-container {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    background: var(--background-white);
}

/* Left Panel - Hidden on Mobile */
.register-brand {
    display: none;
    background: var(--background-white);
    padding: 2rem;
    border-right: 1px solid var(--border-color);
}

.brand-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.brand-logo {
    text-align: center;
    margin-bottom: 7rem;
}

.logo-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.brand-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-accent {
    color: var(--accent-color);
}

.brand-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

/* Value Highlights */
.value-highlights {
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.value-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--background-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.value-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.value-content p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Right Panel - Form Container */
.register-form-container {
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.register-form-wrapper {
    width: 100%;
    max-width: 500px;
}

/* Header */
.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.register-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Account Type Selector */
.account-type-selector {
    margin-bottom: 2rem;
}

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

.selector-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.selector-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.account-options {
    display: grid;
    gap: 1rem;
}

.account-option {
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    transition: var(--transition);
    background: var(--background-white);
}

.account-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.account-option.selected {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.account-option input[type="radio"] {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.option-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--background-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.account-option.selected .option-icon {
    background: var(--primary-color);
    color: var(--background-white);
}

.option-details {
    flex: 1;
}

.option-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.option-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.option-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.account-option.selected .option-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-white);
}

.option-check i {
    font-size: 0.75rem;
    opacity: 0;
    transition: var(--transition);
}

.account-option.selected .option-check i {
    opacity: 1;
}

/* Form Styles */
.register-form {
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background-white);
    color: var(--text-primary);
}

/* Mobile touch optimization */
@supports (-webkit-touch-callout: none) {
    .form-input {
        font-size: 16px;
        min-height: 48px;
    }
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
    background: #fef2f2;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    z-index: 2;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-secondary);
    background: var(--background-light);
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-fill.weak {
    background: var(--error-color);
}

.strength-fill.fair {
    background: var(--warning-color);
}

.strength-fill.good {
    background: #17a2b8;
}

.strength-fill.strong {
    background: var(--success-color);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Field Errors */
.field-error {
    display: none;
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Checkboxes */
.form-checkboxes {
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-wrapper input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-white);
    position: relative;
    transition: var(--transition);
    margin-top: 2px;
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--background-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    min-height: 48px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--background-white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Footer */
.register-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.register-footer p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.help-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
}

.help-link:hover {
    color: var(--primary-color);
}

/* Responsive Design */

/* Tablet (768px and up) */
@media screen and (min-width: 768px) {
    .register-container {
        grid-template-columns: 1fr 1.2fr;
    }
    
    .register-brand {
        display: block;
    }
    
    .register-form-container {
        padding: 2rem;
    }
    
    .account-options {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop (1024px and up) */
@media screen and (min-width: 1024px) {
    .register-container {
        grid-template-columns: 1fr 1fr;
        max-width: 1400px;
        margin: 0 auto;
        box-shadow: var(--shadow-lg);
    }
    
    .register-brand {
        padding: 3rem;
    }
    
    .register-form-container {
        padding: 3rem;
    }
    
    .register-form-wrapper {
        max-width: 500px;
    }
    
    .brand-logo h1 {
        font-size: 2rem;
    }
    
    .value-item {
        padding: 1.25rem;
    }
}

/* Large Desktop (1200px and up) */
@media screen and (min-width: 1200px) {
    .register-brand {
        padding: 4rem;
    }
    
    .brand-content {
        max-width: 450px;
    }
}

/* Mobile specific adjustments */
@media screen and (max-width: 480px) {
    .register-form-container {
        padding: 1rem;
    }
    
    .register-header h2 {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .account-options {
        gap: 0.75rem;
    }
    
    .option-content {
        padding: 1rem;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-input:focus,
.checkbox-wrapper:focus-within,
.account-option:focus-within,
.auth-link:focus,
.help-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.btn:disabled .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
    .register-container {
        box-shadow: none;
        grid-template-columns: 1fr;
    }
    
    .register-brand {
        display: none;
    }
}