/* ==========================================================================
   Cyber Sour Glossar – Frontend Styles
   CI: Geomanist (headings/numbers), Geomanist Book (body)
   Farben: #16160f (dunkel), #76766e (grau), #aeaea6 (hellgrau),
           #edf001 (akzent/lime), #ecebe2 (creme)
   ========================================================================== */

/* --------------------------------------------------------------------------
   AUTOLINK – Inline link + Icon
   Critical: display:inline to prevent Elementor full-line link issue
   -------------------------------------------------------------------------- */

.csg-glossar-link {
    display: inline !important;
    color: inherit !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(22, 22, 15, 0.3) !important;
    text-underline-offset: 2px !important;
    text-decoration-thickness: 1px !important;
    transition: text-decoration-color 0.2s ease !important;
    cursor: pointer !important;
    position: relative !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    white-space: normal !important;
    box-shadow: none !important;
    outline: none !important;
}

.csg-glossar-link:hover {
    text-decoration-color: #16160f !important;
}

.csg-glossar-link:focus-visible {
    outline: 2px solid #16160f !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}

/* Info circle icon */
.csg-glossar-icon {
    display: inline !important;
    vertical-align: middle !important;
    width: 14px !important;
    height: 14px !important;
    margin-left: 3px !important;
    margin-right: 1px !important;
    color: #76766e !important;
    position: relative !important;
    top: -1px !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
}


/* --------------------------------------------------------------------------
   TOOLTIP
   Dark background, positioned above the term
   -------------------------------------------------------------------------- */

.csg-glossar-tooltip {
    position: absolute;
    z-index: 999999;
    background: #0f0f0f !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    padding: 16px 18px !important;
    max-width: 320px !important;
    min-width: 200px !important;
    box-shadow: 5px 5px 0 #edf001 !important;
    font-family: 'Geomanist Book', sans-serif !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    pointer-events: auto !important;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 2px solid #f2f2ec !important;
}

.csg-glossar-tooltip.csg-glossar-tooltip--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip arrow */
.csg-glossar-tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: #0f0f0f !important;
    border: 2px solid #f2f2ec !important;
    border-top: none !important;
    border-left: none !important;
    transform: rotate(45deg);
}

/* When tooltip is below the word */
.csg-glossar-tooltip--below .csg-glossar-tooltip-arrow {
    bottom: auto;
    top: -6px;
    border: 2px solid #f2f2ec !important;
    border-bottom: none !important;
    border-right: none !important;
}

.csg-glossar-tooltip-text {
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Geomanist Book', sans-serif !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

.csg-glossar-tooltip-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    background: #edf001 !important;
    color: #0f0f0f !important;
    border: 2px solid #0f0f0f !important;
    border-radius: 0 !important;
    padding: 11px 20px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 4px 4px 0 #f2f2ec !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-text-size-adjust: 100% !important;
    white-space: nowrap !important;
}

.csg-glossar-tooltip-btn:hover {
    background: #edf001 !important;
    color: #0f0f0f !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #f2f2ec !important;
}

.csg-glossar-tooltip-btn::after {
    content: '\2192';
    font-size: 13px;
    transition: transform 0.2s ease;
}

.csg-glossar-tooltip-btn:hover::after {
    transform: translateX(2px);
}


/* --------------------------------------------------------------------------
   A-Z INDEX – Shortcode [cyber_sour_glossar]
   Brutalist Editorial: harte Kanten, Schlagschatten, Buchstaben-Filter
   statt Sprungmarken (Klick blendet alle anderen Gruppen aus).
   -------------------------------------------------------------------------- */

.csg-glossar-index-wrap {
    width: 100% !important;
    max-width: 100% !important;
    font-family: 'Geomanist', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    padding: 0 !important;
}

/* A-Z Filterleiste */
.csg-az-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 28px 0 !important;
    border-top: 2px solid #f2f2ec !important;
    border-bottom: 2px solid #f2f2ec !important;
    margin: 0 !important;
}

.csg-az-tile {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0f0f0f !important;
    border: 2px solid #f2f2ec !important;
    border-radius: 0 !important;
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    color: #f2f2ec !important;
    box-shadow: 4px 4px 0 #edf001 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

button.csg-az-tile:hover {
    background: #edf001 !important;
    color: #0f0f0f !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #f2f2ec !important;
}

.csg-az-tile.active {
    background: #edf001 !important;
    color: #0f0f0f !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #f2f2ec !important;
}

.csg-az-tile.off {
    opacity: 0.28 !important;
    box-shadow: none !important;
    border-color: rgba(242, 242, 236, 0.16) !important;
    cursor: default !important;
}

/* Filter löschen – gleicher Look wie der Tooltip-Button */
.csg-glossar-clear-filter {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    background: #edf001 !important;
    color: #0f0f0f !important;
    border: 2px solid #0f0f0f !important;
    border-radius: 0 !important;
    padding: 11px 20px !important;
    cursor: pointer !important;
    box-shadow: 4px 4px 0 #f2f2ec !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    margin: 20px 0 0 !important;
}

.csg-glossar-clear-filter:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #f2f2ec !important;
}

.csg-glossar-clear-filter[hidden] {
    display: none !important;
}

/* Begriffs-Gruppen */
.csg-glossar-groups {
    margin-top: 48px !important;
}

.csg-glossar-group {
    padding: 34px 0 !important;
    border-bottom: 1px solid rgba(242, 242, 236, 0.16) !important;
    scroll-margin-top: 110px !important;
}

.csg-glossar-group:first-child {
    border-top: 2px solid #f2f2ec !important;
}

.csg-glossar-group-head {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
}

.csg-glossar-group-letter {
    width: 56px !important;
    height: 56px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0f0f0f !important;
    border: 2px solid #f2f2ec !important;
    border-radius: 0 !important;
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 22px !important;
    text-transform: uppercase !important;
    color: #edf001 !important;
    box-shadow: 6px 6px 0 #edf001 !important;
}

.csg-glossar-group-count {
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: #9d9d98 !important;
}

/* Begriffs-Buttons */
.csg-glossar-terms {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
}

.csg-term-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-family: 'Geomanist Book', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    background: #edf001 !important;
    color: #0f0f0f !important;
    border: 2px solid #0f0f0f !important;
    border-radius: 0 !important;
    padding: 12px 20px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 4px 4px 0 #f2f2ec !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.csg-term-btn:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #f2f2ec !important;
}

.csg-term-btn:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 1px 1px 0 #f2f2ec !important;
}

/* Empty state */
.csg-glossar-empty {
    font-family: 'Geomanist', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    color: #9d9d98 !important;
    text-align: center !important;
    padding: 40px 20px !important;
}


/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    /* Tooltip */
    .csg-glossar-tooltip {
        max-width: calc(100vw - 32px) !important;
        min-width: 0 !important;
    }

    /* A-Z Index */
    .csg-az-tile {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .csg-glossar-group-letter {
        width: 46px !important;
        height: 46px !important;
        font-size: 18px !important;
    }
}
