/**
 * NEXProperty User Account Management Styles
 * Stage 202 - Custom Login, Registration, Password Reset, and Account Pages
 */

/* Container Styles */
.nexproperty-login-container,
.nexproperty-register-container,
.nexproperty-forgot-password-container,
.nexproperty-reset-password-container,
.nexproperty-account-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
}

/* Form Wrapper */
.nexproperty-login-form-wrapper,
.nexproperty-register-form-wrapper,
.nexproperty-forgot-password-form-wrapper,
.nexproperty-reset-password-form-wrapper {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header */
.nexproperty-login-header,
.nexproperty-register-header,
.nexproperty-forgot-password-header,
.nexproperty-reset-password-header {
    text-align: center;
    margin-bottom: 30px;
}

.nexproperty-login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.nexproperty-login-header h2,
.nexproperty-register-header h2,
.nexproperty-forgot-password-header h2,
.nexproperty-reset-password-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Auth Form Styles */
.nexproperty-auth-form .form-group {
    margin-bottom: 20px;
}

.nexproperty-auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.nexproperty-auth-form input[type="text"],
.nexproperty-auth-form input[type="email"],
.nexproperty-auth-form input[type="password"],
.nexproperty-auth-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.nexproperty-auth-form input:focus {
    outline: none;
    border-color: #96E051;
    box-shadow: 0 0 0 2px rgba(150, 224, 81, 0.1);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.toggle-password:hover {
    color: #333;
}

.toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Checkbox Styles */
.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
}

.form-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Form Actions */
.nexproperty-auth-form .form-actions {
    margin-top: 25px;
}

.nexproperty-auth-form .button-large {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nexproperty-auth-form .button-primary {
    background-color: #96E051;
    color: #333;
    font-weight: 600;
}

.nexproperty-auth-form .button-primary:hover {
    background-color: #82c944;
}

.nexproperty-auth-form .button-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.form-footer a {
    color: #96E051;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Messages */
.nexproperty-messages {
    margin-bottom: 20px;
}

.nexproperty-messages p {
    padding: 12px;
    border-radius: 4px;
    margin: 0 0 10px 0;
}

.nexproperty-messages .error,
.nexproperty-messages.error p {
    background-color: #fee;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.nexproperty-messages .success,
.nexproperty-messages.success p {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.nexproperty-messages .warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.nexproperty-messages .info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 5px;
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s, background-color 0.3s;
    width: 0%;
}

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

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

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

.password-strength-text {
    font-size: 12px;
    margin-top: 3px;
    color: #666;
}

/* Account Dashboard */
.nexproperty-account-dashboard {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
}

.nexproperty-account-dashboard h2 {
    margin-bottom: 10px;
    color: #333;
}

/* Tabs Navigation */
.nexproperty-tabs {
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.nexproperty-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.nexproperty-tabs li {
    margin: 0;
}

.nexproperty-tabs button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.3s, border-color 0.3s;
}

.nexproperty-tabs button:hover {
    color: #333;
}

.nexproperty-tabs button.active {
    color: #96E051;
    border-bottom-color: #96E051;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nexproperty-login-container,
    .nexproperty-register-container,
    .nexproperty-forgot-password-container,
    .nexproperty-reset-password-container {
        margin: 20px auto;
        padding: 10px;
    }
    
    .nexproperty-login-form-wrapper,
    .nexproperty-register-form-wrapper,
    .nexproperty-forgot-password-form-wrapper,
    .nexproperty-reset-password-form-wrapper {
        padding: 20px;
    }
    
    .nexproperty-tabs ul {
        flex-direction: column;
    }
    
    .nexproperty-tabs button {
        width: 100%;
        text-align: left;
    }
}

/* Loading Spinner */
.nexproperty-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #96E051;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Avatar Upload */
.avatar-upload-container {
    text-align: center;
    padding: 20px;
}

.current-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
}

.avatar-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.avatar-drop-zone:hover,
.avatar-drop-zone.dragover {
    border-color: #96E051;
    background-color: rgba(150, 224, 81, 0.05);
}

.avatar-drop-zone p {
    margin: 0;
    color: #666;
}

/* Validation Messages */
.validation-message {
    font-size: 12px;
    margin-top: 3px;
}

.validation-message.error {
    color: #dc3545;
}

.validation-message.success {
    color: #28a745;
}

/* Notice Styles */
.nexproperty-notice {
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.nexproperty-notice.info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States for Accessibility */
.nexproperty-auth-form input:focus,
.nexproperty-auth-form button:focus,
.nexproperty-tabs button:focus {
    outline: 2px solid #96E051;
    outline-offset: 2px;
}

