/* static/css/accounts/register.css */

/* Registration page specific styles */
.register-container {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.register-card {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Form field styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* Checkbox styling */
.form-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-checkbox:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox-label {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.25rem;
}

.form-checkbox-label a {
    color: #3b82f6;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-checkbox-label a:hover {
    color: #2563eb;
}

/* Error states */
.input-error {
    border-color: #ef4444 !important;
}

.input-error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message i {
    font-size: 0.875rem;
}

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

.password-strength-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.password-strength-meter {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength-bar.weak {
    background-color: #ef4444;
    width: 33%;
}

.password-strength-bar.medium {
    background-color: #f59e0b;
    width: 66%;
}

.password-strength-bar.strong {
    background-color: #10b981;
    width: 100%;
}

.password-strength-text {
    font-size: 0.75rem;
    text-align: right;
}

.password-strength-text.weak {
    color: #ef4444;
}

.password-strength-text.medium {
    color: #f59e0b;
}

.password-strength-text.strong {
    color: #10b981;
}

/* Form requirements list */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.password-requirements-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.password-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirement {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.125rem;
}

.password-requirement.valid {
    color: #10b981;
}

.password-requirement.invalid {
    color: #6b7280;
}

.password-requirement i {
    font-size: 0.625rem;
}

/* Optional field indicator */
.optional-badge {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
}

/* Terms and conditions section */
.terms-section {
    padding: 1rem;
    background-color: #f0f9ff;
    border-radius: 0.375rem;
    border: 1px solid #bae6fd;
}

.terms-section h4 {
    color: #0369a1;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.terms-section p {
    color: #0c4a6e;
    font-size: 0.75rem;
    line-height: 1.25;
}

/* Privacy information box */
.privacy-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.privacy-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.privacy-box-header i {
    color: #3b82f6;
    font-size: 1rem;
}

.privacy-box-header h4 {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
}

.privacy-box-content {
    font-size: 0.75rem;
    color: #475569;
}

.privacy-box-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.privacy-box-list li {
    margin-bottom: 0.25rem;
}

/* Button loading state */
.register-button {
    position: relative;
}

.register-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

#button-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Divider styling */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .register-card {
        padding: 1.5rem;
    }
    
    .form-checkbox-wrapper {
        align-items: flex-start;
    }
    
    .privacy-box {
        padding: 0.75rem;
    }
}

/* Field focus animations */
.form-group:focus-within .form-label {
    color: #3b82f6;
}

/* Success state (for form validation) */
.input-success {
    border-color: #10b981 !important;
}

.input-success:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.success-message {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Password toggle visibility */
.password-toggle {
    position: relative;
}

.password-toggle input {
    padding-right: 2.5rem;
}

.password-toggle-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.password-toggle-button:hover {
    color: #374151;
}

.password-toggle-button:focus {
    outline: none;
    color: #3b82f6;
}


/* Input success state */
.input-success {
    border-color: #10b981 !important;
}

.input-success:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Password matching feedback */
.password-match-feedback,
.password-match-success {
    transition: all 0.3s ease;
}

/* Button loading state */
#submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Username availability indicator */
.username-status {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.username-status.available {
    color: #10b981;
}

.username-status.taken {
    color: #ef4444;
}

.username-status.checking {
    color: #6b7280;
}

/* Utility classes for better control */
.hidden {
    display: none !important;
}

/* Ensure button states are properly managed */
#submit-button {
    transition: all 0.2s ease;
}

#submit-button:disabled {
    background-color: #93c5fd;
}

#submit-button:not(:disabled):hover {
    background-color: #2563eb;
}

/* Make sure spinner is centered */
#button-spinner .spinner {
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .register-card {
        padding: 1.5rem;
    }
    
    .form-checkbox-wrapper {
        align-items: flex-start;
    }
    
    .privacy-box {
        padding: 0.75rem;
    }
}