/* 
   BuildNet App Overrides v6.0
   Application-specific styles
*/

/* ═══════════════════════════════════════════════════════════════════
   VALIDATION STATES
   ═══════════════════════════════════════════════════════════════════ */

.valid.modified:not([type=checkbox]) {
    border-color: var(--success);
}

.invalid {
    border-color: var(--error) !important;
}

.validation-message {
    color: var(--error);
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}

/* ═══════════════════════════════════════════════════════════════════
   BLAZOR ERROR UI
   ═══════════════════════════════════════════════════════════════════ */

#blazor-error-ui {
    background: var(--warning-light);
    bottom: 0;
    box-shadow: var(--elevation-2);
    display: none;
    left: 0;
    padding: var(--space-4) var(--space-6);
    position: fixed;
    width: 100%;
    z-index: 9999;
    color: #5F4B00;
    font-family: var(--font-family);
    font-size: var(--text-sm);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.7;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

#blazor-error-ui .reload {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    margin-right: var(--space-2);
}

#blazor-error-ui .reload:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════
   RTL OVERRIDES
   ═══════════════════════════════════════════════════════════════════ */

[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }

/* ═══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════ */

.fw-medium {
    font-weight: var(--font-weight-medium) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════ */

@media print {
    .no-print { display: none !important; }
    .sidebar, .topbar, .footer-modern { display: none !important; }
    .main-content { margin: 0 !important; }
    body { background: white !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DISABLED STATES
   ═══════════════════════════════════════════════════════════════════ */

.btn:disabled,
.form-control:disabled,
.form-select:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
