/* ═══════════════════════════════════════════════════
   Tag List Widget — Duolingo-inspired Styles
   ═══════════════════════════════════════════════════ */

.tlw-wrap {
    --tlw-tag-bg: #DDF4FF;
    --tlw-tag-color: #1CB0F6;
    --tlw-tag-hover-bg: #C7EEFF;
    --tlw-tag-hover-color: #0A8CD8;

    background: transparent;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px 28px;
    font-family: 'DIN Round Pro', 'Nunito', system-ui, -apple-system, sans-serif;
}

/* ── Title ── */
.tlw-title {
    font-size: 0.85em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #AFAFAF;
    margin: 0 0 16px 0;
    padding: 0;
    line-height: 1.3;
}

/* ── Tags Container ── */
.tlw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ── Individual Tag ── */
.tlw-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    cursor: default;
    user-select: none;

    /* Use per-tag override vars if set, otherwise global */
    background-color: var(--tlw-this-bg, var(--tlw-tag-bg));
    color: var(--tlw-this-color, var(--tlw-tag-color));
}

/* ── Tag with link ── */
.tlw-tag--link {
    text-decoration: none;
    cursor: pointer;
}

.tlw-tag--link:hover {
    background-color: var(--tlw-tag-hover-bg);
    color: var(--tlw-tag-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(28, 176, 246, 0.15);
}

.tlw-tag--link:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Tag without link (subtle hover) ── */
.tlw-tag:not(.tlw-tag--link):hover {
    background-color: var(--tlw-tag-hover-bg);
    color: var(--tlw-tag-hover-color);
}

/* ── Icon inside tag ── */
.tlw-tag-icon {
    font-size: 0.95em;
    line-height: 1;
}

.tlw-tag-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Animation on load ── */
@keyframes tlw-pop {
    0%   { opacity: 0; transform: scale(0.85) translateY(6px); }
    60%  { transform: scale(1.04) translateY(-1px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.tlw-tag {
    animation: tlw-pop 0.35s ease-out both;
}

.tlw-tag:nth-child(1) { animation-delay: 0.04s; }
.tlw-tag:nth-child(2) { animation-delay: 0.08s; }
.tlw-tag:nth-child(3) { animation-delay: 0.12s; }
.tlw-tag:nth-child(4) { animation-delay: 0.16s; }
.tlw-tag:nth-child(5) { animation-delay: 0.20s; }
.tlw-tag:nth-child(6) { animation-delay: 0.24s; }
.tlw-tag:nth-child(7) { animation-delay: 0.28s; }
.tlw-tag:nth-child(8) { animation-delay: 0.32s; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .tlw-wrap {
        padding: 18px 20px;
    }
    .tlw-tag {
        font-size: 0.75em;
        padding: 7px 14px;
    }
}
