/* Interactive Tag Styles */

/* Base Tag Styles */
.event-tag {
    position: relative;
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.event-tag:hover::before {
    left: 100%;
}

.event-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.event-tag:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tag Variants */
.tag-generic {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: 2px solid #ff6b6b;
}

.tag-activity {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    border: 2px solid #4ecdc4;
}

.tag-workshop {
    background: linear-gradient(135deg, #f7b731 0%, #f5af19 100%);
    color: white;
    border: 2px solid #f7b731;
}

.tag-environment {
    background: linear-gradient(135deg, #5f27cd 0%, #341f97 100%);
    color: white;
    border: 2px solid #5f27cd;
}

.tag-special {
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    color: #2d5016;
    border: 2px solid #a8e6cf;
}

/* Animated Tags */
.tag-animated {
    animation: tagFloat 3s ease-in-out infinite;
}

@keyframes tagFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Pulsing Tags */
.tag-pulse {
    animation: tagPulse 2s ease-in-out infinite;
}

@keyframes tagPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    }
}

/* Badge Style Tags */
.tag-badge {
    position: relative;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
}

.tag-badge::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Ribbon Style Tags */
.tag-ribbon {
    position: relative;
    padding: 8px 20px;
    margin: 5px 0;
    color: white;
    font-weight: bold;
    text-align: center;
    transform: rotate(-2deg);
}

.tag-ribbon::before,
.tag-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    background: inherit;
    z-index: -1;
}

.tag-ribbon::before {
    left: -10px;
    transform: skewX(-15deg);
    border-radius: 5px 0 0 5px;
}

.tag-ribbon::after {
    right: -10px;
    transform: skewX(15deg);
    border-radius: 0 5px 5px 0;
}

/* Interactive Hover Effects */
.tag-interactive {
    position: relative;
    overflow: hidden;
}

.tag-interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.tag-interactive:hover::before {
    width: 300px;
    height: 300px;
}

/* Glowing Tags */
.tag-glow {
    animation: tagGlow 2s ease-in-out infinite alternate;
}

@keyframes tagGlow {
    from {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

/* 3D Flip Tags */
.tag-3d {
    perspective: 1000px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.tag-3d:hover {
    transform: rotateY(180deg);
}

.tag-3d .tag-front,
.tag-3d .tag-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-3d .tag-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Morphing Tags */
.tag-morph {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tag-morph:hover {
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* Loading State Tags */
.tag-loading {
    position: relative;
    color: transparent;
}

.tag-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: tagSpin 1s linear infinite;
}

@keyframes tagSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.tag-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.tag-error {
    background: linear-gradient(135deg, #d63031 0%, #74b9ff 100%);
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Grouped Tags */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
}

.tag-group .event-tag {
    margin: 0;
}

/* Stacked Tags */
.tag-stack {
    position: relative;
    margin: 10px 0;
}

.tag-stack .event-tag {
    position: absolute;
    transition: all 0.3s ease;
}

.tag-stack:hover .event-tag:nth-child(1) {
    transform: translateX(0) translateY(0);
    z-index: 3;
}

.tag-stack:hover .event-tag:nth-child(2) {
    transform: translateX(5px) translateY(2px);
    z-index: 2;
}

.tag-stack:hover .event-tag:nth-child(3) {
    transform: translateX(10px) translateY(4px);
    z-index: 1;
}

/* Responsive Tags */
@media (max-width: 768px) {
    .event-tag {
        font-size: 0.65rem;
        padding: 4px 8px;
        margin: 1px;
    }
    
    .tag-badge {
        padding: 6px 12px;
    }
    
    .tag-ribbon {
        padding: 6px 15px;
    }
}

/* Accessibility */
.event-tag:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.event-tag[aria-pressed="true"] {
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tag-special {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        color: #e2e8f0;
        border-color: #4a5568;
    }
}

/* Tooltips for Tags */
.tag-tooltip {
    position: relative;
}

.tag-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.tag-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Progress Tags */
.tag-progress {
    position: relative;
    overflow: hidden;
}

.tag-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
}

.tag-progress[data-progress="25"]::before { width: 25%; }
.tag-progress[data-progress="50"]::before { width: 50%; }
.tag-progress[data-progress="75"]::before { width: 75%; }
.tag-progress[data-progress="100"]::before { width: 100%; }
