/* Tagify customizations for Materio theme
   Used by: drill filter, drill search, goal search, result profile, drill/goal create/edit
*/
.tagify {
    --tag-bg: var(--bs-primary);
    --tag-text-color: white;
    --tag-hover: var(--bs-primary);
    --tag-remove-bg: rgba(255,255,255,0.3);
    --tag-remove-btn-color: white;
    border-radius: var(--bs-border-radius);
}

.tagify__tag {
    margin: 2px;
}

/* Category label in tag */
.tagify__tag-category {
    opacity: 0.7;
    font-size: 0.85em;
}

.tagify__dropdown {
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow);
    max-height: 400px;
    overflow-y: auto;
}

.tagify__dropdown__item {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    line-height: 1.4;
}

/* Category label styling in dropdown */
.tagify__dropdown__item .text-muted {
    font-size: 0.7rem;
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.tagify__dropdown__item .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.tagify__dropdown__item--active {
    background-color: var(--bs-primary);
    color: white;
}

.tagify__dropdown__item--active .text-muted {
    color: rgba(255,255,255,0.9) !important;
    background-color: rgba(255,255,255,0.2);
}

/* Badge sizing for tags in table */
.badge-sm {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Loading spinner animation (used in drill-edit media upload) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .badge-sm {
        font-size: 0.65rem;
    }
}
