/* Advanced Registration Forms - Frontend Styles */

.arf-form-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

.arf-registration-form {
    position: relative;
}

.arf-form-title {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.arf-form-description {
    margin-bottom: 25px;
    color: #666;
    font-size: 16px;
}

.arf-field-group {
    margin-bottom: 20px;
}

.arf-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.arf-required {
    color: #dc3232;
    margin-left: 3px;
    font-weight: bold;
}

.arf-field-input,
.arf-field-textarea,
.arf-field-select,
.arf-field-file {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.arf-field-input:focus,
.arf-field-textarea:focus,
.arf-field-select:focus,
.arf-field-file:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.arf-field-input.error,
.arf-field-textarea.error,
.arf-field-select.error,
.arf-field-file.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
}

.arf-field-textarea {
    resize: vertical;
    min-height: 100px;
}

.arf-radio-group,
.arf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.arf-radio-label,
.arf-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.5;
}

.arf-field-radio,
.arf-field-checkbox {
    margin-right: 10px;
    margin-top: 2px;
    width: auto;
    flex-shrink: 0;
}

.arf-radio-text,
.arf-checkbox-text {
    flex: 1;
}

.arf-field-description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.arf-file-info {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.arf-form-actions {
    margin-top: 30px;
    text-align: center;
}

.arf-submit-button {
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.arf-submit-button:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.arf-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.arf-submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.arf-submit-button.loading {
    color: transparent;
}

.arf-submit-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: arf-spin 1s linear infinite;
}

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

.arf-form-messages {
    margin-top: 20px;
}

.arf-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 500;
    border: 1px solid;
    position: relative;
}

.arf-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.arf-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.arf-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.arf-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Field validation styles */
.arf-field-error {
    color: #dc3232;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.arf-field-group.has-error .arf-field-label {
    color: #dc3232;
}

/* Loading overlay */
.arf-form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.arf-form-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Responsive design */
@media (max-width: 768px) {
    .arf-form-container {
        padding: 20px;
    }
    
    .arf-field-input,
    .arf-field-textarea,
    .arf-field-select,
    .arf-field-file {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .arf-submit-button {
        width: 100%;
        padding: 18px 20px;
        font-size: 18px;
    }
    
    .arf-radio-group,
    .arf-checkbox-group {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .arf-form-title {
        font-size: 20px;
    }
    
    .arf-form-description {
        font-size: 14px;
    }
    
    .arf-field-label {
        font-size: 13px;
    }
    
    .arf-field-input,
    .arf-field-textarea,
    .arf-field-select {
        padding: 14px 12px;
    }
}

/* Accessibility improvements */
.arf-field-input:focus,
.arf-field-textarea:focus,
.arf-field-select:focus,
.arf-field-file:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.arf-submit-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .arf-field-input,
    .arf-field-textarea,
    .arf-field-select,
    .arf-field-file {
        border-width: 2px;
    }
    
    .arf-submit-button {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .arf-field-input,
    .arf-field-textarea,
    .arf-field-select,
    .arf-field-file,
    .arf-submit-button {
        transition: none;
    }
    
    .arf-submit-button.loading::after {
        animation: none;
    }
}

/* Print styles */
@media print {
    .arf-submit-button {
        display: none;
    }
    
    .arf-form-messages {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .arf-form-container {
        color: #e0e0e0;
    }
    
    .arf-field-label {
        color: #e0e0e0;
    }
    
    .arf-field-input,
    .arf-field-textarea,
    .arf-field-select,
    .arf-field-file {
        background-color: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .arf-field-input:focus,
    .arf-field-textarea:focus,
    .arf-field-select:focus,
    .arf-field-file:focus {
        border-color: #4a9eff;
        box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
    }
    
    .arf-field-description,
    .arf-file-info {
        color: #b0b0b0;
    }
}

/* Already Logged In Message */
.arf-already-logged-in {
    max-width: 500px;
    margin: 20px auto;
    padding: 0;
}

.arf-already-logged-in .arf-message {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    color: #0c5460;
}

.arf-already-logged-in .arf-message h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #0c5460;
    font-weight: 600;
}

.arf-already-logged-in .arf-message p {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.5;
}

.arf-already-logged-in .arf-message p:last-child {
    margin-bottom: 0;
}

.arf-button {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 8px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.arf-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.arf-button-secondary {
    background: #6c757d;
}

.arf-button-secondary:hover {
    background: #545b62;
}
