/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    border-radius: 15px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 100000; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

.badge-container {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
}

.pill-badge {
    display: flex !important;
    min-width: 60px;
    max-width: 80px;
    flex-direction: row;
    flex: 1;
    align-items: center;
    border-radius: 20px;
    border-width: 2px;
    padding: 5px 10px;
    border-style: solid;
    font-size: 14px;
    font-weight: bold;
    color: white;
    opacity: 1;
    /* transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.pill-badge:hover {
    filter: brightness(1.3); /* Brighten effect on hover */
    transform: scale(1.1); /* Slightly increase size */
}

.pill-badge-icon {
    margin-left: 0px !important;
    font-size: 20px !important;
}

.pill-badge .material-icons {
    font-size: 16px;
    margin-right: 4px;
}

.badge-count {
    font-weight: bold;
    margin-left: 0px !important;
    font-size: 14px !important;
}

/* Fade-in effect */
.visible-badge {
    opacity: 1;
    transform: scale(1);
}

/* Fade-out effect */
.hidden-badge {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none; /* Prevents interactions when hidden */
}

/* Spin animation for loading spinners */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Custom spinner for loading states */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
