/* Propertix Registration & Login Forms Styles */

:root {
    --propertix-primary: #0073aa;
    --propertix-primary-dark: #005177;
    --propertix-primary-light: #e7f3ff;
    --propertix-secondary: #6c757d;
    --propertix-success: #28a745;
    --propertix-warning: #ffc107;
    --propertix-error: #dc3545;
    --propertix-text: #333333;
    --propertix-border: #e5e5e5;
    --propertix-shadow: rgba(0,0,0,0.1);
}

/* Container */
.propertix-registration-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Form Wrapper */
.propertix-form-wrapper {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Form Header */
.propertix-form-header {
    background: linear-gradient(135deg, var(--propertix-primary), var(--propertix-primary-dark));
    color: #fff;
    padding: 30px;
    text-align: center;
}

.propertix-form-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.propertix-form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Form */
.propertix-form {
    padding: 30px;
}

/* Form Groups */
.propertix-form-group {
    margin-bottom: 20px;
}

.propertix-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--propertix-text);
    font-size: 14px;
}

.propertix-form-group input[type="text"],
.propertix-form-group input[type="email"],
.propertix-form-group input[type="password"],
.propertix-form-group input[type="number"],
.propertix-form-group select,
.propertix-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--propertix-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.propertix-form-group input:focus,
.propertix-form-group select:focus,
.propertix-form-group textarea:focus {
    outline: none;
    border-color: var(--propertix-primary);
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.propertix-form-group input.error {
    border-color: var(--propertix-error);
}

.propertix-form-group input.success {
    border-color: var(--propertix-success);
}

.propertix-field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--propertix-secondary);
}

/* Form Row */
.propertix-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.propertix-form-row .propertix-form-group {
    flex: 1;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .propertix-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Password Field */
.propertix-password-field {
    position: relative;
}

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

.propertix-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--propertix-secondary);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.propertix-toggle-password:hover {
    color: var(--propertix-primary);
}

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

/* Password Strength */
.propertix-password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

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

.strength-fill.weak { width: 25%; background: #dc3545; }
.strength-fill.fair { width: 50%; background: #ffc107; }
.strength-fill.good { width: 75%; background: #28a745; }
.strength-fill.strong { width: 100%; background: #155724; }

.strength-text {
    font-size: 12px;
    color: var(--propertix-secondary);
}

.strength-text.weak { color: #dc3545; }
.strength-text.fair { color: #856404; }
.strength-text.good { color: #28a745; }
.strength-text.strong { color: #155724; }

/* Captcha */
.propertix-captcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.propertix-captcha-question {
    background: #f9f9f9;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--propertix-text);
    border-left: 3px solid var(--propertix-primary);
}

.propertix-captcha-wrapper input {
    width: 100%;
}

/* Checkbox Group */
.propertix-checkbox-group {
    margin-bottom: 25px;
}

.propertix-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--propertix-text);
}

.propertix-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.propertix-checkbox-label a {
    color: var(--propertix-primary);
    text-decoration: none;
}

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

/* Form Actions */
.propertix-form-actions {
    margin-bottom: 20px;
}

.propertix-form-actions button {
    width: 100%;
    justify-content: center;
}

/* Buttons */
.propertix-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.propertix-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.propertix-btn-primary {
    background: var(--propertix-primary);
    color: #fff;
}

.propertix-btn-primary:hover {
    background: var(--propertix-primary-dark);
}

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

.propertix-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* Form Footer */
.propertix-form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--propertix-border);
}

.propertix-form-footer p {
    margin: 8px 0;
    color: var(--propertix-secondary);
    font-size: 14px;
}

.propertix-form-footer a {
    color: var(--propertix-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Form Messages */
.propertix-form-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
}

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

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

.propertix-form-message.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.propertix-form-message h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.propertix-form-message p {
    margin: 0;
}

/* Error States */
.propertix-error-text {
    color: var(--propertix-error);
    font-size: 12px;
    margin-top: 5px;
}

/* Loading State */
.propertix-btn-loading {
    position: relative;
    color: transparent !important;
}

.propertix-btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Honeypot - Hidden from users, visible to bots */
.propertix-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* Success Message */
.propertix-message {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

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

.propertix-message-success h3 {
    margin: 0 0 10px;
    color: #155724;
}

.propertix-message-success p {
    margin: 0;
}

.propertix-message-success a {
    color: #0d4d2c;
    font-weight: 600;
}

/* Password Requirements */
.propertix-password-requirements {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 12px;
}

.propertix-password-requirements h5 {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--propertix-text);
}

.propertix-password-requirements ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.propertix-password-requirements li {
    position: relative;
    padding-left: 20px;
    margin: 4px 0;
    color: var(--propertix-secondary);
}

.propertix-password-requirements li::before {
    content: "○";
    position: absolute;
    left: 0;
    color: #ccc;
}

.propertix-password-requirements li.valid {
    color: var(--propertix-success);
}

.propertix-password-requirements li.valid::before {
    content: "●";
    color: var(--propertix-success);
}

/* Responsive */
@media (max-width: 600px) {
    .propertix-registration-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .propertix-form {
        padding: 20px;
    }
    
    .propertix-form-header {
        padding: 20px;
    }
    
    .propertix-form-header h2 {
        font-size: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --propertix-text: #e5e5e5;
        --propertix-border: #444;
        --propertix-primary-light: #1a3a52;
    }
    
    .propertix-form-wrapper {
        background: #1e1e1e;
    }
    
    .propertix-form-group input,
    .propertix-form-group select {
        background: #2d2d2d;
        color: var(--propertix-text);
        border-color: var(--propertix-border);
    }
    
    .propertix-form-group input:focus,
    .propertix-form-group select:focus {
        border-color: var(--propertix-primary);
    }
    
    .propertix-captcha-question {
        background: #2d2d2d;
    }
    
    .propertix-password-requirements {
        background: #2d2d2d;
    }
}

/* RTL Support */
[dir="rtl"] .propertix-form-group input,
[dir="rtl"] .propertix-form-group select {
    text-align: right;
}

[dir="rtl"] .propertix-toggle-password {
    right: auto;
    left: 10px;
}

[dir="rtl"] .propertix-captcha-question {
    border-left: none;
    border-right: 3px solid var(--propertix-primary);
}