﻿.kb-citation {
    position: relative;
    display: inline;
    padding: 1px 4px;
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.08);
    border-bottom: 1px solid rgba(26, 115, 232, 0.45);
    border-radius: 5px;
    cursor: help;
    transition: background-color .15s ease, color .15s ease;
}

    .kb-citation:hover,
    .kb-citation:focus {
        color: #174ea6;
        background: rgba(26, 115, 232, 0.14);
        outline: none;
    }

.kb-popover {
    position: absolute;
    z-index: 9999;
    width: min(360px, calc(100vw - 32px));
    background: #fff;
    color: #202124;
    border: 1px solid rgba(60, 64, 67, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(60, 64, 67, 0.22), 0 2px 8px rgba(60, 64, 67, 0.08);
    opacity: 0;
    transform: translateY(6px) scale(.98);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    overflow: hidden;
}

    .kb-popover.is-visible {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .kb-popover img {
        width:100%;
        height:auto;
        margin-bottom: 20px;
    }

.kb-popover__header {
    padding: 13px 16px 10px;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid #eef0f2;
}

.kb-popover__body {
    padding: 12px 16px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: #3c4043;
}

.kb-popover__source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
}

    .kb-popover__source:hover {
        text-decoration: underline;
    }

.kb-popover__arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(60, 64, 67, 0.12);
    border-top: 1px solid rgba(60, 64, 67, 0.12);
}
