/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ========================================
   ERIC VALIDATION ERROR DISPLAY (December 2025)
   ======================================== */

.tx-validation-errors {
    margin: 16px 0;
    padding: 16px;
    border-radius: 8px;
    font-family: var(--mdc-typography-body1-font-family, Roboto, sans-serif);
}

.tx-validation-errors--error {
    background-color: #ffebee;
    border: 1px solid #ef5350;
}

.tx-validation-errors--success {
    background-color: #e8f5e9;
    border: 1px solid #66bb6a;
}

/* Validation Header */
.tx-validation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tx-validation-header--error .tx-validation-icon {
    color: #d32f2f;
    font-size: 24px;
    font-weight: bold;
}

.tx-validation-header--success .tx-validation-icon {
    color: #388e3c;
    font-size: 24px;
    font-weight: bold;
}

.tx-validation-message {
    font-size: 16px;
    font-weight: 500;
}

.tx-validation-header--error .tx-validation-message {
    color: #c62828;
}

.tx-validation-header--success .tx-validation-message {
    color: #2e7d32;
}

/* Error List */
.tx-validation-errors-list,
.tx-validation-warnings-list {
    margin-top: 12px;
}

.tx-validation-errors-title,
.tx-validation-warnings-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #424242;
}

.tx-validation-error-items,
.tx-validation-warning-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tx-validation-error-item,
.tx-validation-warning-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.tx-validation-error-item {
    background-color: rgba(211, 47, 47, 0.1);
    border-left: 3px solid #d32f2f;
    color: #b71c1c;
}

.tx-validation-error-item--eric {
    border-left-color: #9c27b0;
    background-color: rgba(156, 39, 176, 0.1);
}

.tx-validation-error-item--xml {
    border-left-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.tx-validation-warning-item {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
    color: #e65100;
}

/* Source Labels */
.tx-error-source {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.1);
    color: #616161;
}

.tx-validation-error-item--eric .tx-error-source {
    background-color: #9c27b0;
    color: white;
}

.tx-validation-error-item--xml .tx-error-source {
    background-color: #ff9800;
    color: white;
}

.tx-validation-error-item--php .tx-error-source {
    background-color: #2196f3;
    color: white;
}

/* ERIC Status Badge */
.tx-validation-eric-status {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tx-eric-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.tx-eric-badge--active {
    background-color: #9c27b0;
    color: white;
}

.tx-eric-badge--inactive {
    background-color: #9e9e9e;
    color: white;
}

/* Field Error Highlight */
.tx-field-error {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2) !important;
}

.tx-field-error:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.3) !important;
}

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

.tx-button--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: tx-spinner 0.8s linear infinite;
}

@keyframes tx-spinner {
    to {
        transform: rotate(360deg);
    }
}