/*-------------------------------------------------------+
| Tags Stylesheet
| Bootstrap 5.3.8 (Frontend) & Bootstrap 3.4.1 (Admin)
+--------------------------------------------------------*/

/* === Címke badge (általános) === */
.tag-badge {
    display: inline-block;
    padding: 0.3em 0.5em;
    margin: 0 0.2em 0 0;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    /*box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);*/
}

.tag-badge:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    opacity: 0.9;
}

.tag-badge i {
    margin-right: 0.25em;
}

/* === Téma címkék konténer === */
.thread-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0;
}

/* Középre igazítás */
.thread-tags.text-center {
    justify-content: center;
}

/* Jobbra igazítás */
.thread-tags.text-right {
    justify-content: flex-end;
}

/* Balra igazítás (alapértelmezett) */
.thread-tags.text-left {
    justify-content: flex-start;
}

/* === Címkefelhő === */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #eff5fb 0%, #dbe9f5 100%);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.tag-cloud-item {
    display: inline-block;
    padding: 0.4em 0.8em;
    margin: 0.2em;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.tag-cloud-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s ease;
}

.tag-cloud-item:hover::before {
    left: 100%;
}

.tag-cloud-item:hover {
    transform: scale(1.15) rotate(-2deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 10;
}

.tag-cloud-item i {
    margin-right: 0.3em;
}

/* === Címke fejléc (tags.php) === */
.tag-header {
    padding: 2rem 0;
    border-bottom: 2px solid #e9ecef;
}

.tag-header h2 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tag-header p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* === Admin táblázat badge === */
.table .badge {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* === Bootstrap 3 kompatibilitás (admin) === */
@media (max-width: 767px) {
    .tag-badge,
    .tag-cloud-item {
        font-size: 0.85em;
        padding: 0.3em 0.6em;
    }
}

/* === Animáció === */
@keyframes tagPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.tag-badge:active,
.tag-cloud-item:active {
    animation: tagPulse 0.3s ease-in-out;
}

/* === Select2 testreszabás (admin) === */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #007bff;
    border: 1px solid #0056b3;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 3px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffcccc;
}

/* === Tooltips === */
[title] {
    cursor: help;
}

/* === Responsive === */
@media (max-width: 576px) {
    .tag-cloud {
        padding: 1rem;
    }
    
    .thread-tags {
        gap: 0.3rem;
    }
}
