/* Enhanced Password Validation Styles */ .password-input-container { position: relative; } .password-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: none; background: transparent; z-index: 10; padding: 0.25rem 0.5rem; cursor: pointer; } .password-toggle:hover { background-color: rgba(0,0,0,0.05); border-radius: 3px; } .password-toggle:focus { outline: none; box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); } /* Password Strength Indicator */ .password-strength-container { margin-top: 0.5rem; } .password-strength-bar { width: 100%; height: 6px; background-color: #e9ecef; border-radius: 3px; overflow: hidden; margin-bottom: 0.25rem; } .strength-indicator { height: 100%; width: 0%; transition: all 0.3s ease; border-radius: 3px; } .strength-indicator[data-strength="0"] { width: 0%; background-color: #dc3545; } .strength-indicator[data-strength="1"] { width: 20%; background-color: #dc3545; } .strength-indicator[data-strength="2"] { width: 40%; background-color: #fd7e14; } .strength-indicator[data-strength="3"] { width: 60%; background-color: #ffc107; } .strength-indicator[data-strength="4"] { width: 80%; background-color: #20c997; } .strength-indicator[data-strength="5"] { width: 100%; background-color: #28a745; } /* Password Requirements Checklist */ .password-requirements { margin-top: 0.75rem; } .password-checklist { list-style: none; padding-left: 0; margin-bottom: 0; font-size: 0.875rem; } .password-checklist li.requirement { margin-bottom: 0.25rem; transition: all 0.3s ease; } .password-checklist .fa-check { color: #28a745; margin-right: 0.5rem; } .password-checklist .fa-times { color: #dc3545; margin-right: 0.5rem; } .password-checklist .requirement.valid { color: #28a745; } .password-checklist .requirement.valid .fa-times { display: none; } .password-checklist .requirement.valid::before { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; color: #28a745; margin-right: 0.5rem; } /* Password Match Indicator */ .password-match-indicator { padding: 0.375rem 0; transition: all 0.3s ease; } .password-match-text.text-success { color: #28a745 !important; } .password-match-text.text-danger { color: #dc3545 !important; } .password-match-text { font-size: 0.875rem; font-weight: 500; } /* Animation for invalid password */ @keyframes shake { 0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); } } .shake { animation: shake 0.6s; } /* Enhanced form field styles */ .form-control.password-field:focus, .form-control.password-confirmation-field:focus { border-color: #007bff; box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); } .form-control.password-field.is-valid, .form-control.password-confirmation-field.is-valid { border-color: #28a745; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.5-.5L4.5 4.5l1.7 1.73.5-.5L4.5 3.5l2.2-2.23-.5-.5L4.5 2.5 2.3.27l-.5.5L3.5 2.5.27 4.73l.5.5L2.5 3.5l1.8 3.23z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .form-control.password-field.is-invalid, .form-control.password-confirmation-field.is-invalid { border-color: #dc3545; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4m0 0 .4.4m-.4-.4L5.8 4.8m0 0 .4.4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } /* Responsive adjustments */ @media (max-width: 768px) { .password-requirements { margin-top: 1rem; } .password-checklist { font-size: 0.8rem; } .password-input-container .password-toggle { right: 3px; padding: 0.2rem 0.4rem; } } /* Dark mode support */ @media (prefers-color-scheme: dark) { .password-strength-bar { background-color: #495057; } .password-toggle:hover { background-color: rgba(255,255,255,0.1); } .password-checklist .requirement { color: #e9ecef; } .password-checklist .requirement.valid { color: #28a745; } } /* High contrast mode support */ @media (prefers-contrast: high) { .password-strength-bar { border: 1px solid; } .strength-indicator { border: 1px solid; } .password-toggle { border: 1px solid; } } /* Focus visible for better accessibility */ .password-toggle:focus-visible { outline: 2px solid #007bff; outline-offset: 2px; } /* Print styles */ @media print { .password-toggle, .password-strength-container, .password-requirements { display: none !important; } }