.bze-agency-credit {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bze-agency-credit-trigger {
    display: inline-block;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.bze-agency-credit-link {
    text-decoration: none;
}

.bze-agency-tooltip {
    position: absolute;
    box-sizing: border-box;
    /* Centred on its trigger with a translate, so on a phone a card wider
       than the screen hangs off both sides of it. */
    max-width: min(360px, calc(100vw - 24px));
    visibility: hidden;
    opacity: 0;
    overflow: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
    white-space: normal;
    z-index: 1000;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: #333;
    color: #fff;
    padding: 14px 18px;
    border-radius: 6px;
}

/* Position: above (default) */
.bze-agency-tooltip.is-position-above {
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
}

.bze-agency-tooltip.is-position-above::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: inherit;
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
    transition: background-color 0.3s ease;
}

/* Position: below */
.bze-agency-tooltip.is-position-below {
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
}

.bze-agency-tooltip.is-position-below::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: inherit;
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
    transition: background-color 0.3s ease;
}

.bze-agency-tooltip-align-start .bze-agency-tooltip:is(.is-position-above, .is-position-below) { left: 0; right: auto; transform: none; }
.bze-agency-tooltip-align-end .bze-agency-tooltip:is(.is-position-above, .is-position-below) { left: auto; right: 0; transform: none; }
.bze-agency-tooltip-align-start .bze-agency-tooltip:is(.is-position-above, .is-position-below)::after { left: 18px; transform: rotate(45deg); }
.bze-agency-tooltip-align-end .bze-agency-tooltip:is(.is-position-above, .is-position-below)::after { left: auto; right: 18px; transform: rotate(45deg); }

/* Position: inline-end (to the right of the link) */
.bze-agency-tooltip.is-position-inline-end {
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
}

.bze-agency-tooltip.is-position-inline-end::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background-color: inherit;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
    transition: background-color 0.3s ease;
}

.bze-tooltip-text {
    margin: 0;
    padding: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bze-agency-tooltip .bze-tooltip-link,
.bze-agency-tooltip .bze-tooltip-link:is(:hover, :focus, :active, :visited) {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bze-tooltip-link:hover .bze-tooltip-link-label,
.bze-tooltip-link:focus-visible .bze-tooltip-link-label {
    text-decoration: underline;
}

.bze-agency-tooltip.is-text {
    min-width: min(270px, calc(100vw - 24px));
}

.bze-agency-tooltip.is-template,
.bze-agency-tooltip.is-external {
    white-space: normal;
    min-width: min(200px, calc(100vw - 24px));
}

.bze-agency-credit .bze-agency-tooltip.is-template {
    background: transparent;
    color: inherit;
    border: none;
    box-shadow: none;
    padding: 0;
}

.bze-agency-tooltip.is-template::after {
    display: none;
}

.bze-agency-tooltip.is-external {
    min-width: min(300px, calc(100vw - 24px));

}

.bze-agency-tooltip.is-active {
    visibility: visible;
    opacity: 1;
}

/* Close button — top-right of tooltip, offset outside by default */
.bze-agency-credit .bze-agency-tooltip > button.bze-tooltip-close {
    position: absolute;
    top: -12px;
    inset-inline-end: -12px;
    bottom: auto;
    inset-inline-start: auto;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: none;
    --bze-close-bg-color: var(--e-global-color-accent, var(--e-global-color-primary, #000000));
    --bze-close-icon-color: var(--e-global-color-primary, #ffffff);
    background-color: var(--bze-close-bg-color);
    background-image: none;
    color: var(--bze-close-icon-color);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Prevent any flow positioning */
    float: none;
    order: unset;
}

.bze-agency-credit .bze-agency-tooltip.is-active > button.bze-tooltip-close {
    display: flex;
}

.bze-agency-credit .bze-agency-tooltip > button.bze-tooltip-close:is(:hover, :focus) {
    background-color: var(--bze-close-bg-color);
    color: var(--bze-close-icon-color);
}

.bze-agency-credit .bze-agency-tooltip > button.bze-tooltip-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.bze-agency-tooltip > .bze-tooltip-close svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.bze-agency-tooltip > .bze-tooltip-close i {
    font-size: inherit;
}

.bze-tooltip-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: inherit;
}

.bze-agency-tooltip {
    transition-property: opacity, visibility, background-color, translate, scale, filter, clip-path;
}

/* An entrance animation that has finished still makes the widget a stacking context, below floating buttons. */
.elementor-widget-bze-agency-credit:has(.bze-agency-tooltip.is-active) {
    z-index: 100000;
}

.bze-agency-tooltip.is-hover > .bze-tooltip-close,
.bze-agency-credit .bze-agency-tooltip.is-hover.is-active > button.bze-tooltip-close,
.bze-agency-credit .bze-agency-tooltip.is-inline > button.bze-tooltip-close {
    display: none;
}

.bze-agency-tooltip-hide-arrow-yes .bze-agency-tooltip::after,
.bze-agency-tooltip.is-inline::after,
.bze-agency-tooltip.is-sheet::after {
    display: none;
}

.bze-agency-credit-trigger.has-inline-tooltip {
    flex-direction: column;
    align-items: flex-start;
}

.bze-agency-credit .bze-agency-credit-trigger .bze-agency-tooltip.is-inline {
    position: static;
    min-width: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
}

.bze-agency-credit .bze-agency-credit-trigger .bze-agency-tooltip.is-sheet {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    /* The widget's Width control would otherwise narrow the panel that spans the screen. */
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    transform: none;
    translate: 0 100%;
    z-index: 100000;
    border-bottom: env(safe-area-inset-bottom, 0px) solid transparent;
}

.bze-agency-credit .bze-agency-tooltip.is-sheet .bze-tooltip-text {
    padding-inline-end: 56px;
}

.bze-agency-credit .bze-agency-credit-trigger .bze-agency-tooltip.is-sheet.is-active {
    translate: 0 0;
}

/* The widget's offset controls place the button outside the panel, which would be off the screen here. */
.bze-agency-credit .bze-agency-tooltip.is-sheet > button.bze-tooltip-close {
    top: 12px !important;
    right: 12px !important;
    inset-inline-end: 12px !important;
}

.bze-tooltip-anim-rise .bze-agency-tooltip:not(.is-sheet, .is-inline, .is-active) { translate: 0 14px; }
.bze-tooltip-anim-pop .bze-agency-tooltip:not(.is-sheet, .is-inline, .is-active) { scale: 0.82; }
.bze-tooltip-anim-pop .bze-agency-tooltip { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.bze-tooltip-anim-blur .bze-agency-tooltip:not(.is-sheet, .is-inline, .is-active) { filter: blur(10px); translate: 0 8px; }
.bze-tooltip-anim-reveal .bze-agency-tooltip:not(.is-sheet, .is-inline) { clip-path: inset(-48px -48px 100% -48px); }
.bze-tooltip-anim-reveal .bze-agency-tooltip.is-active:not(.is-sheet, .is-inline) { clip-path: inset(-48px); }

.bze-tooltip-fx-shine .bze-agency-tooltip.is-active::before,
.bze-tooltip-fx-border .bze-agency-tooltip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.bze-tooltip-fx-shine .bze-agency-tooltip.is-active::before {
    background: linear-gradient(105deg, transparent 35%, var(--bze-tooltip-fx, #fff) 50%, transparent 65%) no-repeat;
    background-size: 300% 100%;
    opacity: 0.55;
    animation: bze-credit-shine 1.1s ease-out both;
}

@property --bze-credit-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.bze-tooltip-fx-border .bze-agency-tooltip::before {
    padding: 2px;
    background: conic-gradient(from var(--bze-credit-angle), transparent 55%, var(--bze-tooltip-fx, #fff));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: bze-credit-orbit 3s linear infinite;
}

.bze-tooltip-fx-glow .bze-agency-tooltip.is-active,
.bze-tooltip-fx-glow .bze-agency-tooltip.is-inline {
    animation: bze-credit-tooltip-glow 2.4s ease-in-out infinite;
}

.bze-credit-effect-shimmer .bze-agency-credit-link {
    background-image: linear-gradient(100deg, currentColor 40%, var(--bze-credit-fx, #fff) 50%, currentColor 60%);
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bze-credit-effect-shimmer.bze-credit-run-hover .bze-agency-credit-link:is(:hover, :focus-visible),
.bze-credit-effect-shimmer.bze-credit-run-loop .bze-agency-credit-link {
    animation: bze-credit-shimmer var(--bze-credit-speed, 3s) linear infinite;
}

.bze-credit-effect-underline .bze-agency-credit-link {
    background: linear-gradient(var(--bze-credit-fx, currentColor), var(--bze-credit-fx, currentColor)) no-repeat 0 100% / 0 1px;
    transition-property: color, background-size;
}

.bze-credit-effect-underline.bze-credit-run-hover .bze-agency-credit-link:is(:hover, :focus-visible) {
    background-size: 100% 1px;
}

.bze-credit-effect-underline.bze-credit-run-loop .bze-agency-credit-link {
    animation: bze-credit-underline var(--bze-credit-speed, 3s) ease-in-out infinite alternate;
}

.bze-credit-effect-glow .bze-agency-credit-link {
    transition-property: color, text-shadow;
}

.bze-credit-effect-glow.bze-credit-run-hover .bze-agency-credit-link:is(:hover, :focus-visible) {
    text-shadow: 0 0 14px var(--bze-credit-fx, currentColor);
}

.bze-credit-effect-glow.bze-credit-run-loop .bze-agency-credit-link {
    animation: bze-credit-glow var(--bze-credit-speed, 3s) ease-in-out infinite alternate;
}

.bze-credit-effect-arrow .bze-agency-credit-link::after {
    content: '\2192';
    display: inline-block;
    margin-inline-start: 6px;
    color: var(--bze-credit-fx, currentColor);
    opacity: 0;
    translate: -8px 0;
    transition: opacity 0.3s ease, translate 0.3s ease;
}

.bze-credit-effect-arrow.bze-credit-run-hover .bze-agency-credit-link:is(:hover, :focus-visible)::after {
    opacity: 1;
    translate: 0 0;
}

.bze-credit-effect-arrow.bze-credit-run-loop .bze-agency-credit-link::after {
    opacity: 1;
    animation: bze-credit-arrow var(--bze-credit-speed, 3s) ease-in-out infinite alternate;
}

.bze-credit-effect-lift .bze-agency-credit-link {
    display: inline-block;
    transition-property: color, translate;
}

.bze-credit-effect-lift.bze-credit-run-hover .bze-agency-credit-link:is(:hover, :focus-visible) {
    translate: 0 -3px;
}

.bze-credit-effect-lift.bze-credit-run-loop .bze-agency-credit-link {
    animation: bze-credit-lift var(--bze-credit-speed, 3s) ease-in-out infinite alternate;
}

@keyframes bze-credit-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes bze-credit-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes bze-credit-orbit { to { --bze-credit-angle: 360deg; } }
@keyframes bze-credit-underline { from { background-size: 0 1px; } to { background-size: 100% 1px; } }
@keyframes bze-credit-glow { from { text-shadow: 0 0 0 transparent; } to { text-shadow: 0 0 14px var(--bze-credit-fx, currentColor); } }
@keyframes bze-credit-arrow { from { translate: -4px 0; } to { translate: 4px 0; } }
@keyframes bze-credit-lift { from { translate: 0 0; } to { translate: 0 -3px; } }
@keyframes bze-credit-tooltip-glow { 0%, 100% { box-shadow: 0 0 6px var(--bze-tooltip-fx, #fff); } 50% { box-shadow: 0 0 28px var(--bze-tooltip-fx, #fff); } }

@media (prefers-reduced-motion: reduce) {
    .bze-agency-credit *,
    .bze-agency-credit *::before,
    .bze-agency-credit *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
