/**
 * IntelliRealty User Management Styles
 */

/* User Container */
.ir-user-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ir-user-header {
    text-align: center;
    margin-bottom: 30px;
}

.ir-user-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.ir-user-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Messages */
.ir-user-messages {
    margin-bottom: 20px;
    min-height: 20px;
}

.ir-user-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: none;
}

.ir-user-message.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.ir-user-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ir-user-message.info {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

/* Notice */
.ir-user-notice {
    background: #e3f2fd;
    color: #0277bd;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #bbdefb;
}

.ir-user-notice a {
    color: #0277bd;
    font-weight: 600;
    text-decoration: none;
}

.ir-user-notice a:hover {
    text-decoration: underline;
}

/* Form Styling */
.ir-user-form {
    width: 100%;
}

/* ====================================
   FORM LAYOUTS - Using global ir-components.css
   ==================================== */
/* Base .ir-form-row, .ir-form-group defined in ir-components.css */

/* Module-specific overrides */
.ir-form-group label {
    font-weight: 600;
    color: #555;
}

/* User-specific validation states */
.ir-user-form input.error,
.ir-user-form select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.ir-user-form input.valid,
.ir-user-form select.valid {
    border-color: #28a745;
}

/* ====================================
   CHECKBOX COMPONENTS - Using global ir-components.css
   ==================================== */
/* Base .ir-checkbox-label defined in ir-components.css */

/* Module-specific overrides for links in checkboxes */
.ir-checkbox-label a {
    color: #007cba;
    text-decoration: none;
}

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

/* ====================================
   BUTTONS - Using global ir-components.css
   ==================================== */
/* Module-specific button overrides only if needed */

.ir-btn-full {
    width: 100%;
}

/* Loading State */
.ir-user-form.loading .ir-btn {
    position: relative;
    color: transparent;
}

.ir-user-form.loading .ir-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form Links */
.ir-form-links {
    margin-top: 25px;
    text-align: center;
}

.ir-form-links a {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin: 8px 0;
}

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

/* User Dashboard Placeholder */
.ir-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #666;
    font-size: 16px;
}

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

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .ir-user-container {
        margin: 15px;
        padding: 20px;
    }
    
    /* Form row responsive styles handled by ir-components.css */

    .ir-user-title {
        font-size: 24px;
    }

    .ir-form-group input,
    .ir-form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .ir-user-container {
        margin: 10px;
        padding: 15px;
    }
    
    .ir-user-title {
        font-size: 22px;
    }
}

/* Field Validation Visual Feedback */
.ir-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.ir-field-valid {
    border-color: #28a745 !important;
}

.ir-field-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Required Field Indicator */
.ir-form-group label .required {
    color: #dc3545;
    margin-left: 2px;
}