/**
 * Enhanced Badges & Labels
 * Status indicators, tags, and notification badges
 */

/* ===================================
   BASE BADGE STYLES
   =================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ===================================
   STATUS BADGES
   =================================== */

/* Success */
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Warning */
.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Error/Danger */
.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Info */
.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Primary */
.badge-primary {
    background: rgba(0, 243, 255, 0.15);
    color: #00f3ff;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

/* Secondary */
.badge-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   BADGE VARIANTS
   =================================== */

/* Solid badges */
.badge-solid.badge-success {
    background: #10b981;
    color: white;
    border: none;
}

.badge-solid.badge-warning {
    background: #f59e0b;
    color: white;
    border: none;
}

.badge-solid.badge-error {
    background: #ef4444;
    color: white;
    border: none;
}

.badge-solid.badge-primary {
    background: linear-gradient(135deg, #00f3ff 0%, #0066ff 100%);
    color: white;
    border: none;
}

/* Gradient badges */
.badge-gradient {
    background: linear-gradient(135deg, #00f3ff 0%, #d946ef 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 243, 255, 0.3);
}

/* Outlined badges */
.badge-outlined {
    background: transparent;
    border-width: 2px;
}

/* ===================================
   BADGE SIZES
   =================================== */

.badge-sm {
    padding: 2px 8px;
    font-size: 10px;
}

.badge-md {
    padding: 4px 12px;
    font-size: 12px;
}

.badge-lg {
    padding: 6px 16px;
    font-size: 14px;
}

/* ===================================
   BADGE WITH ICONS
   =================================== */

.badge i {
    font-size: 14px;
}

.badge-sm i {
    font-size: 12px;
}

.badge-lg i {
    font-size: 16px;
}

/* ===================================
   NOTIFICATION BADGE (DOT)
   =================================== */

.badge-dot {
    position: relative;
    padding-right: 20px;
}

.badge-dot::before {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Pulsing dot */
.badge-dot.pulse::before {
    animation: badgeDotPulse 2s ease-in-out infinite;
}

@keyframes badgeDotPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 currentColor;
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 4px transparent;
    }
}

/* ===================================
   COUNT BADGE
   =================================== */

.badge-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: #ef4444;
    color: white;
}

/* Position on element */
.has-badge {
    position: relative;
}

.has-badge .badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
}

/* ===================================
   LABEL TAGS
   =================================== */

.label {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.3);
}

/* Removable label */
.label-removable {
    padding-right: 30px;
    position: relative;
}

.label-remove {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.label-remove:hover {
    background: rgba(239, 68, 68, 0.8);
}

/* ===================================
   STATUS INDICATORS
   =================================== */

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
    background: #6b7280;
}

.status-dot.busy {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status-dot.away {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Pulsing status */
.status-dot.pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ===================================
   BADGE ANIMATIONS
   =================================== */

/* Slide in */
.badge-slide-in {
    animation: badgeSlideIn 0.3s ease;
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pop in */
.badge-pop {
    animation: badgePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .badge-lg {
        font-size: 12px;
        padding: 5px 14px;
    }
}