﻿/* Main container styling */
.vehicle-rfid-management {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

    /* Table styling improvements */
    .vehicle-rfid-management .mud-table-container {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .vehicle-rfid-management .mud-table-head .mud-table-cell {
        font-weight: 600;
        background-color: #f8fafc;
        border-bottom: 2px solid #e2e8f0;
    }

    .vehicle-rfid-management .mud-table-body .mud-table-row:hover {
        background-color: #f1f5f9;
        transition: background-color 0.2s ease;
    }

    .vehicle-rfid-management .mud-table-cell {
        padding: 10px !important;
        text-align: center !important;
    }

    /* EPCID display styling - Keep legacy for compatibility */
    .vehicle-rfid-management .epcid-display {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.875rem;
        color: #475569;
        padding: 4px 0px;
        border-radius: 4px;
        display: inline-block;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vehicle-rfid-management .epcid-tooltip {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.75rem;
        word-break: break-all;
    }

    /* Status chips styling */
    .vehicle-rfid-management .status-chip {
        font-size: 0.75rem;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 12px;
    }

    /* Button styling */
    .vehicle-rfid-management .action-button {
        min-width: 80px;
        font-size: 0.875rem;
    }

        .vehicle-rfid-management .action-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transition: all 0.2s ease;
        }

    /* Dialog styling */
    .vehicle-rfid-management .edit-dialog .mud-dialog-title {
        background-color: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem 1.5rem;
    }

    .vehicle-rfid-management .edit-dialog .mud-dialog-content {
        padding: 1.5rem;
    }

    .vehicle-rfid-management .edit-dialog .mud-dialog-actions {
        background-color: #f8fafc;
        border-top: 1px solid #e2e8f0;
        padding: 1rem 1.5rem;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    /* Form styling */
    .vehicle-rfid-management .edit-form .mud-input-root {
        margin-bottom: 1rem;
    }

    .vehicle-rfid-management .edit-form .mud-input-label {
        font-weight: 500;
        color: #374151;
    }

    .vehicle-rfid-management .edit-form .mud-select {
        margin-bottom: 1rem;
    }

    /* Search bar styling */
    .vehicle-rfid-management .search-container {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        color: white;
    }

        .vehicle-rfid-management .search-container .mud-input-root {
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
        }

            .vehicle-rfid-management .search-container .mud-input-root:hover {
                background-color: rgba(255, 255, 255, 0.15);
            }

        .vehicle-rfid-management .search-container .mud-input {
            color: white !important;
        }

            .vehicle-rfid-management .search-container .mud-input::placeholder {
                color: rgba(255, 255, 255, 0.7) !important;
            }

    /* Card styling */
    .vehicle-rfid-management .info-card {
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

        .vehicle-rfid-management .info-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        }

    /* Loading states */
    .vehicle-rfid-management .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .vehicle-rfid-management .loading-spinner {
        background-color: white;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    /* Error states */
    .vehicle-rfid-management .error-state {
        color: #dc2626;
        border-color: #dc2626 !important;
    }

        .vehicle-rfid-management .error-state:focus {
            border-color: #dc2626 !important;
            box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2) !important;
        }

    /* Validation error styling */
    .vehicle-rfid-management .mud-input-error {
        border-color: #dc2626 !important;
    }

        .vehicle-rfid-management .mud-input-error:focus {
            border-color: #dc2626 !important;
            box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2) !important;
        }

    /* Character counter */
    .vehicle-rfid-management .character-counter {
        font-size: 0.75rem;
        color: #6b7280;
        text-align: right;
        margin-top: 0.25rem;
    }

        .vehicle-rfid-management .character-counter.warning {
            color: #d97706;
        }

        .vehicle-rfid-management .character-counter.error {
            color: #dc2626;
        }

/* Animation for success states */
@keyframes success-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.vehicle-rfid-management .success-animation {
    animation: success-pulse 1s infinite;
}

/* High specificity overrides for MudBlazor conflicts */
.vehicle-rfid-management.vehicle-rfid-management .mud-table-container.mud-table-container {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vehicle-rfid-management.vehicle-rfid-management .mud-table-head .mud-table-cell.mud-table-cell {
    font-weight: 600;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.vehicle-rfid-management.vehicle-rfid-management .mud-table-body .mud-table-row:hover {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* ==================== EPCID BADGE STYLES - EXACTLY MATCH GATE SECURITY ==================== */

.vehicle-rfid-management .epcid-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 14px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    max-width: 230px !important;
    min-width: 150px !important;
    user-select: none !important;
    position: relative !important;
    overflow: hidden !important;
}

    .vehicle-rfid-management .epcid-badge::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
        transition: left 0.5s !important;
    }

    .vehicle-rfid-management .epcid-badge:hover::before {
        left: 100% !important;
    }

    .vehicle-rfid-management .epcid-badge:hover {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
        color: white !important;
        border-color: #6366f1 !important;
        transform: translateY(-2px) scale(1.02) !important;
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4) !important;
    }

    .vehicle-rfid-management .epcid-badge:active {
        transform: translateY(-1px) scale(1.01) !important;
        transition: all 0.1s ease !important;
    }

.vehicle-rfid-management .epcid-display {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    justify-content: space-between !important;
}

.vehicle-rfid-management .epcid-icon {
    color: #6366f1 !important;
    transition: color 0.3s ease !important;
    flex-shrink: 0 !important;
}

.vehicle-rfid-management .epcid-badge:hover .epcid-icon {
    color: rgba(255, 255, 255, 0.9) !important;
}

.vehicle-rfid-management .epcid-short {
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    color: inherit !important;
}

.vehicle-rfid-management .epcid-badge .copy-indicator {
    opacity: 0.6 !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    color: #64748b !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    padding: 2px !important;
}

    .vehicle-rfid-management .epcid-badge .copy-indicator:hover {
        opacity: 1 !important;
        transform: scale(1.2) !important;
        background: rgba(99, 102, 241, 0.1) !important;
        color: #6366f1 !important;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
        cursor: pointer !important;
    }

.vehicle-rfid-management .epcid-badge:hover .copy-indicator {
    opacity: 1 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.1) !important;
}

/* Success animation */
@keyframes epcid-copy-success {
    0% {
        transform: translateY(-2px) scale(1.02);
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        border-color: #22c55e;
    }

    50% {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 12px 30px rgba(34, 197, 94, 0.5);
    }

    100% {
        transform: translateY(-2px) scale(1.02);
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        border-color: #6366f1;
    }
}

.vehicle-rfid-management .epcid-copy-success {
    animation: epcid-copy-success 0.6s ease-out;
    color: white !important;
}

    .vehicle-rfid-management .epcid-copy-success .epcid-icon,
    .vehicle-rfid-management .epcid-copy-success .copy-indicator {
        color: rgba(255, 255, 255, 0.9) !important;
    }

/* Error state for EPCID badges */
.vehicle-rfid-management .epcid-badge.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #dc2626;
}

    .vehicle-rfid-management .epcid-badge.error:hover {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        color: white;
    }

/* Loading state */
.vehicle-rfid-management .epcid-badge.loading {
    opacity: 0.7;
    cursor: wait;
}

    .vehicle-rfid-management .epcid-badge.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
        animation: loading-shimmer 1.5s infinite;
    }

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .vehicle-rfid-management {
        padding: 0.5rem;
    }

        .vehicle-rfid-management .mud-grid .mud-grid-item {
            padding: 0.25rem;
        }

        .vehicle-rfid-management .action-button {
            min-width: 60px;
            font-size: 0.75rem;
            padding: 0.5rem;
        }

        .vehicle-rfid-management .epcid-badge {
            padding: 6px 10px;
            font-size: 0.8rem;
            max-width: 180px;
            min-width: 130px;
        }

        .vehicle-rfid-management .epcid-display {
            gap: 6px;
        }
}

@media (max-width: 480px) {
    .vehicle-rfid-management .search-container {
        padding: 1rem;
    }

    .vehicle-rfid-management .mud-table-container {
        font-size: 0.875rem;
    }

    .vehicle-rfid-management .mud-table-cell {
        padding: 0.5rem !important;
    }

    .vehicle-rfid-management .epcid-badge {
        padding: 4px 8px;
        font-size: 0.75rem;
        max-width: 150px;
        min-width: 110px;
    }

    .vehicle-rfid-management .epcid-short {
        letter-spacing: 0.3px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vehicle-rfid-management .epcid-badge {
        border-width: 2px;
        background: white;
        color: black;
    }

        .vehicle-rfid-management .epcid-badge:hover {
            background: black;
            color: white;
            border-color: white;
        }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .vehicle-rfid-management .epcid-badge,
    .vehicle-rfid-management .epcid-icon,
    .vehicle-rfid-management .copy-indicator {
        transition: none;
    }

        .vehicle-rfid-management .epcid-badge::before {
            display: none;
        }

    .vehicle-rfid-management .epcid-copy-success {
        animation: none;
        background: #22c55e !important;
        border-color: #22c55e !important;
    }

    @keyframes loading-shimmer {
        0% {
            opacity: 0.7;
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: 0.7;
        }
    }
}

/* Print styles */
@media print {
    .vehicle-rfid-management .epcid-badge {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
        box-shadow: none !important;
        transform: none !important;
    }

        .vehicle-rfid-management .epcid-badge::before {
            display: none;
        }

    .vehicle-rfid-management .copy-indicator {
        display: none;
    }
}

/* Focus styles for accessibility */
.vehicle-rfid-management .epcid-badge:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.vehicle-rfid-management .epcid-badge:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ==================== HIGH SPECIFICITY OVERRIDES ==================== */
/* Ensure hover effects work exactly like Gate Security */
.vehicle-rfid-management.vehicle-rfid-management .epcid-badge.epcid-badge:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: white !important;
    border-color: #6366f1 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4) !important;
}

    .vehicle-rfid-management.vehicle-rfid-management .epcid-badge.epcid-badge:hover .epcid-icon {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .vehicle-rfid-management.vehicle-rfid-management .epcid-badge.epcid-badge:hover .epcid-short {
        color: rgba(255, 255, 255, 1) !important;
    }

    .vehicle-rfid-management.vehicle-rfid-management .epcid-badge.epcid-badge:hover .copy-indicator {
        opacity: 1 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        transform: scale(1.1) !important;
    }

/* Override any MudBlazor table cell hover effects that might interfere */
.vehicle-rfid-management .mud-table-body .mud-table-row:hover .epcid-badge {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: initial !important;
}

    .vehicle-rfid-management .mud-table-body .mud-table-row:hover .epcid-badge:hover {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
        color: white !important;
    }
