/**
 * Advanced Form Engine - Validation Styles
 * 
 * Styles for validation UI components, modals, and rule management
 */

/* Rule Selection List */
.rules-selection-list {
    display: grid;
    gap: 15px;
}

.rule-selection-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
}

.rule-selection-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rule-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rule-selection-header h4 {
    margin: 0;
    font-size: 15px;
    color: #333;
}

.rule-selection-description {
    color: #666;
    font-size: 13px;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.rule-params-info {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
}

.rule-params-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.rule-params-info ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.rule-params-info li {
    color: #666;
    line-height: 1.6;
}

/* Rule Configuration */
.rule-config-section {
    margin-bottom: 20px;
}

.rule-config-section:last-child {
    margin-bottom: 0;
}

.rule-config-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.rule-config-section .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.rule-param-field {
    margin-bottom: 15px;
}

.rule-param-field:last-child {
    margin-bottom: 0;
}

.rule-param-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.rule-param-input,
.rule-error-message {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rule-param-input:focus,
.rule-error-message:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Custom Rule Editor */
.custom-rule-section {
    margin-bottom: 20px;
}

.custom-rule-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.custom-rule-name,
.custom-rule-error-message {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-rule-code,
.custom-rule-params {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #f5f5f5;
    resize: vertical;
}

.custom-rule-code:focus,
.custom-rule-params:focus {
    border-color: #2271b1;
    outline: none;
    background: #fff;
}

/* Custom Rule Test Area */
.custom-rule-test-area {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.custom-rule-test-area h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
}

.test-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.test-input-group label {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.custom-rule-test-value {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.test-result-area {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
}

.test-result-area .success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

.test-result-area .error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}

/* Utility Classes */
.widefat {
    width: 100%;
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* ==========================================================================
   Validation Rules List (Property Panel)
   ========================================================================== */

.validation-rules-section {
    margin-top: 15px;
}

.validation-rules-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    max-height: 300px;
    overflow-y: auto;
    background: #f9f9f9;
}

.validation-rules-list:empty::before {
    content: 'No validation rules added';
    display: block;
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.validation-rule-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.validation-rule-item:last-child {
    margin-bottom: 0;
}

.validation-rule-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.1);
}

.validation-rule-item.disabled {
    opacity: 0.5;
    background: #f6f7f7;
}

.validation-rule-item.disabled .validation-rule-name {
    text-decoration: line-through;
}

/* Rule Enable Toggle */
.validation-rule-enable {
    margin-right: 12px;
    flex-shrink: 0;
}

.validation-rule-enable input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Rule Information */
.validation-rule-info {
    flex: 1;
    min-width: 0;
}

.validation-rule-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1d2327;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-rule-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.validation-rule-type-badge.built-in {
    background: #e3f2fd;
    color: #1976d2;
}

.validation-rule-type-badge.custom {
    background: #f3e5f5;
    color: #7b1fa2;
}

.validation-rule-message {
    font-size: 12px;
    color: #646970;
    margin-bottom: 2px;
    line-height: 1.4;
}

.validation-rule-message::before {
    content: '💬 ';
    opacity: 0.7;
}

.validation-rule-params {
    font-size: 11px;
    color: #999;
    font-style: italic;
    font-family: 'Courier New', monospace;
}

.validation-rule-params::before {
    content: '⚙ ';
    font-style: normal;
}

/* Rule Actions */
.validation-rule-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 10px;
}

.validation-rule-action {
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    transition: all 0.15s ease;
    color: #2271b1;
    font-weight: 500;
}

.validation-rule-action:hover {
    background: #f0f0f1;
    border-color: #2271b1;
}

.validation-rule-action.edit {
    color: #2271b1;
}

.validation-rule-action.edit:hover {
    background: #e3f2fd;
}

.validation-rule-action.delete {
    color: #d63638;
}

.validation-rule-action.delete:hover {
    background: #fcebec;
    border-color: #d63638;
}

/* Validation Actions Buttons */
.validation-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.validation-actions .button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    padding: 8px 12px;
    text-align: center;
}

.validation-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.add-builtin-rule-btn {
    background: #2271b1 !important;
    color: white !important;
    border-color: #2271b1 !important;
}

.add-builtin-rule-btn:hover {
    background: #135e96 !important;
    border-color: #135e96 !important;
}

.add-custom-rule-btn {
    background: #7b1fa2 !important;
    color: white !important;
    border-color: #7b1fa2 !important;
}

.add-custom-rule-btn:hover {
    background: #6a1b9a !important;
    border-color: #6a1b9a !important;
}

/* Validation Behavior Settings */
.validation-behavior-settings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

/* ==========================================================================
   Built-in Rules Modal
   ========================================================================== */

.afe-builtin-rules-modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.afe-builtin-rules-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.builtin-rules-content {
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.builtin-rules-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.builtin-rules-header h2 {
    margin: 0;
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
}

.builtin-rules-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    width: 36px;
    height: 36px;
    color: #646970;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.builtin-rules-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

/* Modal Body */
.builtin-rules-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Search Field */
.rules-search-wrapper {
    margin-bottom: 20px;
}

.rules-search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.rules-search-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rules-search-wrapper {
    position: relative;
}

.rules-search-wrapper::before {
    content: '\f179';
    font-family: 'dashicons';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #8c8f94;
}

/* Rules List */
.builtin-rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.builtin-rule-item {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.builtin-rule-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
    transform: translateY(-1px);
}

.builtin-rule-item.selected {
    border-color: #2271b1;
    background: #f0f8ff;
}

.builtin-rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.builtin-rule-title {
    font-weight: 600;
    color: #1d2327;
    font-size: 15px;
}

.builtin-rule-category {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f0f0f1;
    color: #646970;
}

.builtin-rule-description {
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
    margin-bottom: 8px;
}

.builtin-rule-applicable {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

.builtin-rule-applicable::before {
    content: '✓ ';
    color: #4caf50;
}

/* No Results */
.no-rules-found {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-rules-found .dashicons {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

/* Modal Footer */
.builtin-rules-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.selected-rule-info {
    font-size: 13px;
    color: #646970;
}

.selected-rule-info strong {
    color: #1d2327;
}

.builtin-rules-footer .button {
    min-width: 100px;
}

/* ==========================================================================
   Custom Rule Editor Modal
   ========================================================================== */

.afe-rule-editor-modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.afe-rule-editor-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-editor-content {
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

/* Modal Header */
.rule-editor-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-editor-header h2 {
    margin: 0;
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-editor-header .dashicons {
    color: #7b1fa2;
}

.rule-editor-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    width: 36px;
    height: 36px;
    color: #646970;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.rule-editor-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

/* Modal Body */
.rule-editor-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.rule-editor-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Fields */
.rule-form-field {
    display: flex;
    flex-direction: column;
}

.rule-form-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
    font-size: 14px;
}

.rule-form-field label .required {
    color: #d63638;
    margin-left: 3px;
}

.rule-form-field input,
.rule-form-field textarea,
.rule-form-field select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.rule-form-field input:focus,
.rule-form-field textarea:focus,
.rule-form-field select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rule-form-field .field-description {
    font-size: 12px;
    color: #646970;
    margin-top: 5px;
    font-style: italic;
}

/* Code Editor */
.rule-code-editor {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    min-height: 200px;
    max-height: 400px;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    background: #f5f5f5;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.rule-code-editor:focus {
    border-color: #2271b1;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rule-code-editor.has-error {
    border-color: #d63638;
    background: #fcebec;
}

/* Code Editor Header */
.code-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.code-editor-title {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.code-editor-help {
    font-size: 11px;
    color: #646970;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: help;
}

.code-editor-help .dashicons {
    font-size: 14px;
}

/* Function Signature Help */
.function-signature {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #1976d2;
}

.function-signature strong {
    display: block;
    margin-bottom: 5px;
    color: #0d47a1;
}

.function-signature code {
    display: block;
    margin: 5px 0;
    padding: 2px 0;
}

/* Parameters JSON Editor */
.rule-params-editor {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    min-height: 100px;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    background: #f5f5f5;
    font-size: 13px;
    line-height: 1.6;
    transition: border-color 0.2s ease;
}

.rule-params-editor:focus {
    border-color: #2271b1;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rule-params-editor.has-error {
    border-color: #d63638;
    background: #fcebec;
}

/* Validation Errors */
.rule-validation-error {
    background: #fcebec;
    border: 1px solid #d63638;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 8px;
    color: #721c24;
    font-size: 12px;
    display: flex;
    align-items: start;
    gap: 8px;
}

.rule-validation-error .dashicons {
    color: #d63638;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Test Area */
.rule-test-area {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    background: #f9f9f9;
    margin-top: 20px;
}

.rule-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rule-test-header h4 {
    margin: 0;
    color: #1d2327;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rule-test-header .dashicons {
    color: #2271b1;
}

.test-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.test-value-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.test-value-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.test-rule-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.test-rule-btn:hover {
    background: #135e96;
}

.test-rule-btn:disabled {
    background: #8c8f94;
    cursor: not-allowed;
}

/* Test Result */
.rule-test-result {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rule-test-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rule-test-result.success::before {
    content: '\f147';
    font-family: 'dashicons';
    font-size: 18px;
}

.rule-test-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rule-test-result.error::before {
    content: '\f153';
    font-family: 'dashicons';
    font-size: 18px;
}

.rule-test-result.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.rule-test-result.loading::before {
    content: '\f463';
    font-family: 'dashicons';
    font-size: 18px;
    animation: spin 1s linear infinite;
}

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

/* Modal Footer */
.rule-editor-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    background: #f9f9f9;
}

.rule-editor-footer .button {
    padding: 10px 25px;
}

.rule-editor-footer .button-primary {
    background: #7b1fa2;
    border-color: #7b1fa2;
}

.rule-editor-footer .button-primary:hover {
    background: #6a1b9a;
    border-color: #6a1b9a;
}

/* ==========================================================================
   Frontend Validation Errors
   ========================================================================== */

.afe-field-error {
    border-color: #d63638 !important;
    background-color: #fcebec !important;
}

.afe-error-message {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: start;
    gap: 5px;
    line-height: 1.4;
}

.afe-error-message::before {
    content: '\f534';
    font-family: 'dashicons';
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.afe-field-valid {
    border-color: #4caf50 !important;
}

.afe-field-validating {
    border-color: #ff9800 !important;
    position: relative;
}

.afe-field-validating::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ff9800;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Multiple Error Messages */
.afe-error-messages {
    margin-top: 8px;
}

.afe-error-messages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afe-error-messages li {
    color: #d63638;
    font-size: 12px;
    margin-bottom: 4px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.afe-error-messages li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .builtin-rules-content,
    .rule-editor-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .builtin-rules-body,
    .rule-editor-body {
        padding: 15px;
    }
    
    .validation-actions {
        flex-direction: column;
    }
    
    .validation-actions .button {
        width: 100%;
    }
    
    .validation-rule-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .validation-rule-actions {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f1;
    }
    
    .test-controls {
        flex-direction: column;
    }
    
    .rule-editor-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .rule-editor-footer .button {
        width: 100%;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus styles */
.validation-rule-action:focus,
.add-builtin-rule-btn:focus,
.add-custom-rule-btn:focus,
.test-rule-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Screen reader only text */
.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;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .validation-rule-item,
    .builtin-rule-item,
    .rule-code-editor,
    .rule-params-editor {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .afe-builtin-rules-modal,
    .afe-rule-editor-modal,
    .builtin-rules-content,
    .rule-editor-content,
    .rule-test-result {
        animation: none;
    }
    
    .rule-test-result.loading::before {
        animation: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .afe-builtin-rules-modal,
    .afe-rule-editor-modal {
        display: none !important;
    }
}