/* DiscrepancyAlert Component Styles - Fixed Height */
.discrepancy-alert {
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible !important;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 180px !important;
    height: auto !important;
    max-height: none !important;
}

.discrepancy-alert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.discrepancy-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--border-color, #ff9800), transparent);
    border-radius: 8px 8px 0 0;
}

/* Header Section - Compact */
.discrepancy-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.discrepancy-title {
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.3 !important;
}

.discrepancy-subtitle {
    color: var(--rz-text-color-secondary) !important;
    margin: 0.25rem 0 0 0 !important;
    opacity: 0.8;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
}

.discrepancy-icon {
    animation: pulse 2s infinite;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    font-size: 2rem !important;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Count Display - Better Proportions */
.discrepancy-count {
    text-align: left;
    margin: 0 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: countUp 0.6s ease-out;
    font-size: 2.8rem !important;
    line-height: 1 !important;
}

@keyframes countUp {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Progress Bar - Visible */
.discrepancy-progress {
    margin: 1rem 0 !important;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.08);
    padding: 0 !important;
}

.discrepancy-progress .rz-progressbar {
    height: 10px !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.08) !important;
}

.discrepancy-progress .rz-progressbar-value {
    transition: width 1s ease-in-out;
    border-radius: 6px !important;
    height: 10px !important;
}

.discrepancy-progress .rz-text {
    font-size: 0.8rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--rz-text-color) !important;
    font-weight: 500 !important;
}

/* Badges Section - Compact */
.discrepancy-badges {
    justify-content: center;
    margin: 0.75rem 0;
    gap: 0.5rem !important;
}

.discrepancy-badge {
    animation: slideInLeft 0.5s ease-out;
    font-weight: 600 !important;
    padding: 0.4rem 1rem !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem !important;
}

.discrepancy-trend {
    animation: slideInRight 0.5s ease-out 0.2s both;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    font-size: 1.5rem !important;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Action Button - Visible */
.discrepancy-action {
    width: 100%;
    margin-top: 1rem !important;
    background: linear-gradient(135deg, var(--border-color, #ff9800), var(--border-color, #ff9800)CC) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem !important;
}

.discrepancy-action:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
    filter: brightness(1.05);
}

.discrepancy-action:active {
    transform: translateY(0) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .discrepancy-alert {
        margin: 0.25rem;
        min-height: 160px !important;
    }
    
    .discrepancy-count {
        font-size: 2.2rem !important;
    }
    
    .discrepancy-title {
        font-size: 0.9rem !important;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .discrepancy-alert {
        border-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .discrepancy-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .discrepancy-progress {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Severity-specific enhancements - Subtle */
.discrepancy-alert[data-severity="crítica"] {
    border-left-width: 4px;
    border-left-color: #f44336;
}

.discrepancy-alert[data-severity="alta"] {
    border-left-width: 3px;
    border-left-color: #ff9800;
}

.discrepancy-alert[data-severity="média"] {
    border-left-width: 2px;
    border-left-color: #ffc107;
}

.discrepancy-alert[data-severity="baixa"] {
    border-left-width: 2px;
    border-left-color: #4caf50;
}

/* Loading state */
.discrepancy-alert.loading {
    opacity: 0.7;
    pointer-events: none;
}

.discrepancy-alert.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Card content spacing - Fixed */
.discrepancy-alert .rz-stack {
    padding: 1rem !important;
    min-height: 140px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Ensure consistent spacing */
.discrepancy-alert .rz-stack > * {
    margin: 0 !important;
    flex-shrink: 0;
}

.discrepancy-alert .rz-row {
    margin: 0 !important;
    flex-shrink: 0;
}

.discrepancy-alert .rz-column {
    padding: 0 0.25rem !important;
}

/* Force visibility */
.discrepancy-alert * {
    box-sizing: border-box !important;
}

.discrepancy-alert .rz-progressbar-container {
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
} 