/* ====== BASE CARD ====== */
.ticket-counter {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 220px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    z-index: 1000;
    display: none;
    /* hidden by default */
    border: 1px solid rgba(0, 0, 0, .08);

    /* If some other stylesheet adds rotate, keep it here and
       animate float on the inner wrapper to avoid conflicts */
    transform: rotate(var(--card-rotate, 0deg));
}

/* Animate the INNER wrapper only, not the card that may be rotated */
.ticket-float-wrapper {
    animation: counter-float 3s ease-in-out infinite;
    will-change: transform;
}

/* Unique float keyframes (no name collisions) */
@keyframes counter-float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ====== CLOSE BUTTON ====== */
.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 20px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease, transform .2s ease;
}

.close-btn:hover {
    color: #dc3545;
    transform: scale(1.05);
}

/* ====== LAYOUT ====== */
.ticket-counter-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticket-icon {
    font-size: 2em;
    color: #2A93D5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-svg {
    width: 36px;
    height: 36px;
    stroke: #2A93D5;
}

.ticket-info {
    text-align: left;
}

.ticket-label {
    font-size: 0.6em;
    color: #666;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}

.ticket-number {
    font-size: 1.6em;
    font-weight: bold;
    color: #1E4B7D;
    margin-bottom: 4px;
    line-height: 1;
}

/* ====== BADGES ====== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: .3px;
    border: 1px solid transparent;
}

.available {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.limited {
    background-color: rgba(255, 193, 7, 0.15);
    color: #d97706;
    border-color: rgba(255, 193, 7, 0.3);
    animation: badge-pulse 1.5s infinite;
    /* unique name */
}

.sold-out {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

/* Unique keyframes for the LIMITED badge */
@keyframes badge-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .85;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ====== FLASH ON UPDATE ====== */
.counter-update {
    animation: update-pulse .6s ease;
    /* unique name */
    color: #C6A75A;
    font-weight: bold;
}

@keyframes update-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}