.garan-badge-button {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.garan-badge-image {
    max-width: initial;
    max-height: initial;
    width: 100%;
}

/* A margókkal szűkített viewportot képviselő segédelem: a jQuery UI position()
   'within' opciója csak elemet fogad el. Nem látszik és nem fog egeret. */
.garan-popover-viewport {
    position: fixed;
    z-index: -1;
    visibility: hidden;
    pointer-events: none;
}

/* A popover a body-hoz kerül, a pozíciót a JS (jQuery UI position) állítja be. */
.garan-popover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1060;
    width: 280px;
    max-width: calc(100vw - 20px);
    padding: 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    font-family: inherit;
    /* Megjelenítés előtt rejtve, hogy ne villanjon fel a végleges helye előtt. */
    visibility: hidden;
    opacity: 0;
    transition: opacity .12s ease-out;
}

.garan-popover--visible {
    visibility: visible;
    opacity: 1;
}

.garan-popover__title {
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ebebeb;
    border-radius: 3px 3px 0 0;
}

.garan-popover__body {
    padding: 8px;
}

/* width/height auto + max-* korlátok: a JS által beállított maxHeight mellett is
   megmarad a kép oldalaránya. */
.garan-popover__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
}

/* Nyíl: két egymásra rétegzett háromszög adja a keretet és a kitöltést.
   A nyíl menti eltolást (left/top) a JS állítja, hogy a badge közepére mutasson. */
.garan-popover__arrow,
.garan-popover__arrow::after {
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.garan-popover__arrow::after {
    content: "";
}

.garan-popover--top .garan-popover__arrow {
    bottom: -16px;
    border-top-color: rgba(0, 0, 0, .2);
}

.garan-popover--top .garan-popover__arrow::after {
    bottom: 1px;
    left: -8px;
    border-top-color: #fff;
}

.garan-popover--bottom .garan-popover__arrow {
    top: -16px;
    border-bottom-color: rgba(0, 0, 0, .2);
}

.garan-popover--bottom .garan-popover__arrow::after {
    top: 1px;
    left: -8px;
    border-bottom-color: #fff;
}

.garan-popover--left .garan-popover__arrow {
    right: -16px;
    border-left-color: rgba(0, 0, 0, .2);
}

.garan-popover--left .garan-popover__arrow::after {
    top: -8px;
    right: 1px;
    border-left-color: #fff;
}

.garan-popover--right .garan-popover__arrow {
    left: -16px;
    border-right-color: rgba(0, 0, 0, .2);
}

.garan-popover--right .garan-popover__arrow::after {
    top: -8px;
    left: 1px;
    border-right-color: #fff;
}
