/**
 * Premium CSS for VV Tag Module
 * Features: Glassmorphism, HSL Colors, Micro-animations
 */

:root {
    --vv-tag-primary: #007bff;
    --vv-tag-primary-hover: #0056b3;
    --vv-tag-bg: #ffffff;
    --vv-tag-text: #333333;
    --vv-tag-hint-bg: rgba(255, 255, 255, 0.85);
    --vv-tag-glass-border: rgba(255, 255, 255, 0.2);
    --vv-tag-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.vv-tags-container {
    margin: 10px 0;
    padding: 0px;
    border: none;
    border-radius: 3px;
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}


.vv-tags-group {
    margin-bottom: 15px;
    padding: 0px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vv-tags-group:last-child {
    margin-bottom: 0;
}

.vv-tags-group.is-accordion .vv-tags-group-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    user-select: none;
}

.vv-tags-group.is-accordion.is-open .vv-tags-group-title {
    margin-bottom: 15px;
}

.vv-tags-group.is-accordion .vv-tags-list {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    opacity: 0;
    padding-left: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vv-tags-group.is-accordion.is-open .vv-tags-list {
    max-height: 2000px;
    opacity: 1;
    margin-top: 10px;
    overflow: visible;
}

.vv-accordion-icon {
    width: 16px;
    height: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.vv-accordion-icon::before,
.vv-accordion-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
}

.vv-accordion-icon::before {
    width: 10px;
    height: 2px;
    top: 7px;
    left: 3px;
}

.vv-accordion-icon::after {
    width: 2px;
    height: 10px;
    top: 3px;
    left: 7px;
    transition: opacity 0.3s ease;
}

.vv-tags-group.is-open .vv-accordion-icon {
    transform: rotate(180deg);
}

.vv-tags-group.is-open .vv-accordion-icon::after {
    opacity: 0;
}

.vv-tags-group-title {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    font-size: 13px;
    color: #495057;
    text-transform: uppercase;
}

.vv-tags-list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    list-style: none;
    align-items: center;
}

.vv-tag-wrapper {
    position: relative;
    display: inline-block;
}

.vv-tag-wrapper:hover {
    z-index: 999;
}

.vv-tags-group:hover {
    z-index: 10;
}

.vv-tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: var(--vv-tag-primary);
    color: #ffffff;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    line-height: normal;
}

.vv-tag-image {
    display: block;
    max-width: 100%;
    height: auto;
    width: auto;
    border-radius: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vv-tag-item:has(.vv-tag-image) {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    padding: 2px !important;
    font-size: inherit !important;
    box-shadow: none !important;
}

.vv-tag-image[style*="border-color"] {
    border-color: inherit !important;
}

.vv-tag-item img.vv-tag-image {
    padding: 0px;
}

.vv-tag-image {
    background: transparent !important;
    color: inherit !important;
}

.vv-tag-item img.vv-tag-image[style*="border-color"] {
    border-color: inherit !important;
}

.vv-tag-item img.vv-tag-image[style*="1px solid"] {
    border: inherit !important;
}

.vv-tag-item img.vv-tag-image {
    box-shadow: inherit !important;
}

.vv-tag-wrapper[data-display="popup"] .vv-tag-item {
    cursor: pointer;
}

.vv-tag-wrapper[data-display="popup"] .vv-tag-item:hover {
    background: var(--vv-tag-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(177 177 177 / 30%);
}

.vv-tag-wrapper[data-display="popup"] .vv-tag-item:hover .vv-tag-image {
    transform: scale(1.05);
}

.vv-tag-hint {
    visibility: hidden;
    width: 220px;
    background: var(--vv-tag-hint-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--vv-tag-text);
    text-align: left;
    border-radius: 12px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--vv-tag-glass-border);
}

.vv-tag-hint.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%);
}

.vv-tag-hint::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.8) transparent transparent transparent;
}

.vv-tag-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.vv-tag-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 35px;
    border-radius: 20px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--vv-tag-glass-border);
    animation: vvModalFadeIn 0.4s ease-out;
}

@keyframes vvModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.vv-tag-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #adb5bd;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    z-index: 10;
    transition: color 0.2s;
}

.vv-tag-modal-close:hover {
    color: #495057;
}

.vv-tag-popup-inner h3 {
    margin-top: 0;
    font-size: 22px;
    color: var(--vv-tag-primary);
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.vv-tag-hint-text {
    font-size: 15px;
    line-height: 1.6;
    color: #495057;
}

@media (max-width: 767px) {
    .vv-tag-hint {
        width: 180px;
        max-width: 85vw !important;
    }

    .vv-tag-modal-content {
        padding: 25px;
    }
}

.vv-tag-hint.align-left {
    left: 0 !important;
    transform: translateX(0) translateY(0) !important;
}

.vv-tag-hint.align-right {
    left: auto !important;
    right: 0 !important;
    transform: translateX(0) translateY(0) !important;
}

.vv-tag-hint.align-left::after {
    left: 20px !important;
    margin-left: 0 !important;
}

.vv-tag-hint.align-right::after {
    left: auto !important;
    right: 20px !important;
    margin-left: 0 !important;
}

.vv-tag-hint.is-visible.align-left,
.vv-tag-hint.is-visible.align-right {
    transform: translateX(0) translateY(0) !important;
}