/* =========================
Popover
API kept compatible with gnexus-ui-kit.
========================= */
@use "../kit-deps" as *;
.popover {
position: relative;
display: inline-block;
&.is-open .popover-panel {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
visibility: visible;
}
&.is-open .popover-trigger {
color: $neutral-900;
}
}
.popover-panel {
position: absolute;
z-index: 100;
top: calc(100% + #{$space-2});
left: 0;
width: max-content;
max-width: 320px;
padding: $space-4;
border: $border-width-base $border-style-base $border-color-muted;
border-radius: $radius-lg;
background: $neutral-0;
box-shadow: 0 8px 24px rgba($neutral-900, 0.08);
color: $neutral-700;
font-family: $font-family-base;
font-size: 14px;
line-height: 1.5;
opacity: 0;
transform: translateY(-4px);
pointer-events: none;
visibility: hidden;
transition: opacity $motion-base $motion-ease, transform $motion-base $motion-ease, visibility $motion-base $motion-ease;
&::before {
content: "";
position: absolute;
top: -5px;
left: $space-4;
width: 8px;
height: 8px;
background: $neutral-0;
border-left: $border-width-base $border-style-base $border-color-muted;
border-top: $border-width-base $border-style-base $border-color-muted;
transform: rotate(45deg);
}
}
.popover-title {
margin: 0 0 $space-2;
color: $neutral-900;
font-family: $font-family-base;
font-size: 16px;
font-weight: $font-weight-semibold;
line-height: 1.3;
}
.popover-text {
margin: 0;
color: $neutral-600;
font-size: 14px;
line-height: 1.4;
}
.popover[data-position="right"] .popover-panel {
top: 0;
left: calc(100% + #{$space-2});
&::before {
top: $space-4;
left: -5px;
border: none;
border-left: $border-width-base $border-style-base $border-color-muted;
border-bottom: $border-width-base $border-style-base $border-color-muted;
transform: rotate(45deg);
}
}