/* =============================================================
   VDI Glossar Plugin – Frontend Styles
   ============================================================= */

/* Alphabetische Begriffsliste (Shortcode) */
.glossar-term-list {
    list-style: none !important;
    margin: 15px 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 16px;
}

.glossar-term-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.glossar-term-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    padding: 4px 0;
    transition: color 0.15s ease;
}

/* Chevron Icon vor jedem Begriff */
.glossar-term-link::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-top: 2px solid #6366f1;
    border-right: 2px solid #6366f1;
    transform: translateY(-1px) rotate(45deg);
    margin-right: 9px;
    flex-shrink: 0;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.glossar-term-link:hover {
    color: #4f46e5;
}

.glossar-term-link:hover::before {
    transform: translate(2px, -1px) rotate(45deg);
    border-color: #4f46e5;
}

/* Leere Liste */
.glossar-term-empty {
    font-style: italic;
    color: #94a3b8;
    margin: 8px 0;
}

/* Alphabetische Gruppen bei [glossar buchstabe="alle"] */
.glossar-group {
    margin-bottom: 28px;
}

.glossar-group-letter {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
    color: #1e293b;
}

/* Schnellnavigation (A B C ...) */
.glossar-nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0 25px 0;
    padding: 0;
    list-style: none;
}

.glossar-nav-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.glossar-nav-letter:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

.glossar-nav-letter.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* Frontend Auto-Link Styling */
.glossar-auto-link {
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.45);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    color: inherit;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.glossar-auto-link:hover {
    text-decoration-color: #4f46e5;
    color: #4f46e5;
}
