/**
 * User Management Styles for Rental Marketplace
 * Styles for registration, login, dashboard, and profile forms
 */

/* Form Container Styles */
.rm-register-form-container,
.rm-login-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rm-form {
    width: 100%;
}

.rm-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Form Group Styles */
.rm-form-group {
    margin-bottom: 20px;
}

.rm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

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

.rm-form-group input:focus,
.rm-form-group select:focus,
.rm-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.rm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox Styles */
.rm-form-group input[type="checkbox"] {
    margin-right: 8px;
}

.rm-form-group label input[type="checkbox"] {
    display: inline;
    width: auto;
    margin-bottom: 0;
}

/* Button Styles */
.rm-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.rm-btn-primary {
    background-color: #007cba;
    color: white;
}

.rm-btn-primary:hover {
    background-color: #005a87;
    color: white;
}

.rm-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.rm-btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.rm-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.rm-btn-danger {
    background-color: #dc3545;
    color: white;
}

.rm-btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.rm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.rm-form-footer p {
    margin: 5px 0;
    color: #666;
}

.rm-form-footer a {
    color: #007cba;
    text-decoration: none;
}

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

/* Message Styles */
.rm-form-messages {
    margin-top: 20px;
}

.rm-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.rm-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

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

/* Validation Indicators */
.password-strength,
.password-match,
.username-availability,
.email-validation {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    padding: 2px 0;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

.password-match.error,
.username-availability.error,
.email-validation.error {
    color: #dc3545;
}

.password-match.success,
.username-availability.success,
.email-validation.success {
    color: #28a745;
}

/* User Dashboard Styles */
.rm-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rm-dashboard-header {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.rm-dashboard-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.rm-dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Tab Navigation */
.rm-dashboard-tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.rm-tab-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.rm-tab-nav li {
    flex: 1;
}

.rm-tab-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    text-align: center;
    border-right: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.rm-tab-link:last-child {
    border-right: none;
}

.rm-tab-link:hover {
    background: #e9ecef;
    color: #333;
}

.rm-tab-link.active {
    background: white;
    color: #007cba;
    border-bottom: 2px solid #007cba;
}

/* Tab Content */
.rm-tab-content {
    display: none;
    padding: 30px;
}

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

/* Products Section */
.rm-products-section {
    width: 100%;
}

.rm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.rm-section-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.rm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rm-product-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.rm-product-card h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.rm-product-card p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.rm-product-actions {
    display: flex;
    gap: 10px;
}

/* Messages Section */
.rm-messages-section {
    width: 100%;
}

.rm-messages-list {
    margin-top: 20px;
}

.rm-message-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.rm-message-item h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.rm-message-item p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.5;
}

.rm-message-item small {
    color: #999;
    font-size: 12px;
}

/* Reviews Section */
.rm-reviews-section {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rm-register-form-container,
    .rm-login-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .rm-user-dashboard {
        padding: 10px;
    }
    
    .rm-dashboard-header {
        padding: 20px;
    }
    
    .rm-tab-nav {
        flex-direction: column;
    }
    
    .rm-tab-link {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .rm-tab-content {
        padding: 20px;
    }
    
    .rm-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rm-products-grid {
        grid-template-columns: 1fr;
    }
    
    .rm-product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .rm-form h3 {
        font-size: 20px;
    }
    
    .rm-dashboard-header h2 {
        font-size: 24px;
    }
    
    .rm-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .rm-product-actions .rm-btn {
        width: auto;
        margin-bottom: 5px;
    }
}

/* Loading States */
.rm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: rm-spin 1s linear infinite;
}

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

/* Accessibility */
.rm-form input:focus,
.rm-form select:focus,
.rm-form textarea:focus,
.rm-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Combined Authentication Forms */
.rm-auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rm-auth-toggle {
    display: flex;
    margin-bottom: 30px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.rm-auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-right: 1px solid #ddd;
}

.rm-auth-tab:last-child {
    border-right: none;
}

.rm-auth-tab:hover {
    background: #e9ecef;
    color: #333;
}

.rm-auth-tab.active {
    background: #007cba;
    color: #fff;
}

.rm-auth-form {
    display: none;
}

.rm-auth-form.active {
    display: block;
}

.rm-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.rm-form-group.rm-half {
    flex: 1;
    margin-bottom: 0;
}

.rm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.rm-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.rm-auth-logged-in {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
}

.rm-auth-logged-in a {
    color: #0c5460;
    text-decoration: none;
    font-weight: 500;
}

.rm-auth-logged-in a:hover {
    text-decoration: underline;
}

/* Responsive Design for Auth Forms */
@media (max-width: 768px) {
    .rm-auth-container {
        margin: 10px;
        padding: 15px;
    }
    
    .rm-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .rm-form-group.rm-half {
        margin-bottom: 20px;
    }
    
    .rm-auth-tab {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .rm-btn,
    .rm-form-footer,
    .rm-tab-nav,
    .rm-auth-toggle {
        display: none;
    }
    
    .rm-tab-content,
    .rm-auth-form {
        display: block !important;
    }
}