﻿.gate-security-page .epcid-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 230px;
    min-width: 150px;
    user-select: none;
    position: relative;
    overflow: hidden;
}

    .gate-security-page .epcid-badge::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.5s;
    }

    .gate-security-page .epcid-badge:hover::before {
        left: 100%;
    }

    .gate-security-page .epcid-badge:hover {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        color: white;
        border-color: #6366f1;
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    }

    .gate-security-page .epcid-badge:active {
        transform: translateY(-1px) scale(1.01);
        transition: all 0.1s ease;
    }

.gate-security-page .epcid-display {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.gate-security-page .epcid-icon {
    color: #6366f1;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.gate-security-page .epcid-badge:hover .epcid-icon {
    color: rgba(255, 255, 255, 0.9);
}

.gate-security-page .epcid-short {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

.gate-security-page .epcid-badge .copy-indicator {
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #64748b;
    cursor: pointer !important;
    border-radius: 4px;
    padding: 2px;
}

    .gate-security-page .epcid-badge .copy-indicator:hover {
        opacity: 1;
        transform: scale(1.2);
        background: rgba(99, 102, 241, 0.1);
        color: #6366f1;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
        cursor: pointer !important;
    }

.gate-security-page .epcid-badge:hover .copy-indicator {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* 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;
    }
}

.gate-security-page .epcid-copy-success {
    animation: epcid-copy-success 0.6s ease-out;
    color: white !important;
}

    .gate-security-page .epcid-copy-success .epcid-icon,
    .gate-security-page .epcid-copy-success .copy-indicator {
        color: rgba(255, 255, 255, 0.9) !important;
    }

/* Error state for EPCID badges */
.gate-security-page .epcid-badge.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #dc2626;
}

    .gate-security-page .epcid-badge.error:hover {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        color: white;
    }

/* Loading state */
.gate-security-page .epcid-badge.loading {
    opacity: 0.7;
    cursor: wait;
}

    .gate-security-page .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) {
    .gate-security-page .epcid-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
        max-width: 180px;
        min-width: 130px;
    }

    .gate-security-page .epcid-display {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .gate-security-page .epcid-badge {
        padding: 4px 8px;
        font-size: 0.75rem;
        max-width: 150px;
        min-width: 110px;
    }

    .gate-security-page .epcid-short {
        letter-spacing: 0.3px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gate-security-page .epcid-badge {
        border-width: 2px;
        background: white;
        color: black;
    }

        .gate-security-page .epcid-badge:hover {
            background: black;
            color: white;
            border-color: white;
        }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gate-security-page .epcid-badge,
    .gate-security-page .epcid-icon,
    .gate-security-page .copy-indicator {
        transition: none;
    }

        .gate-security-page .epcid-badge::before {
            display: none;
        }

    .gate-security-page .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 {
    .gate-security-page .epcid-badge {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
        box-shadow: none !important;
        transform: none !important;
    }

        .gate-security-page .epcid-badge::before {
            display: none;
        }

    .gate-security-page .copy-indicator {
        display: none;
    }
}

/* Focus styles for accessibility */
.gate-security-page .epcid-badge:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.gate-security-page .epcid-badge:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
