/* Site-wide info tooltip — hover + click pin, header cream/gold, centered caret. */

.ne-info-tooltip {
    --ne-info-tooltip-bg: var(--ne-brand-cream, #fff4d6);
    --ne-info-tooltip-border: var(--ne-gold-border, rgba(255, 191, 10, 0.35));
    --ne-info-tooltip-ink: var(--ne-brand-navy, #2a435d);
    position: relative;
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-inline-start: 6px;
    align-items: center;
    justify-content: center;
    color: var(--ne-info-tooltip-ink);
    cursor: help;
    vertical-align: text-bottom;
}

.ne-info-tooltip__icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

.ne-info-tooltip:focus {
    outline: none;
}

.ne-info-tooltip:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--ne-brand-gold, #ffbf0a) 55%, transparent);
    outline-offset: 2px;
    border-radius: 50%;
}

.ne-info-tooltip__panel {
    position: absolute;
    z-index: 1080;
    left: 50%;
    bottom: calc(100% + 12px);
    width: max-content;
    max-width: min(320px, 85vw);
    padding: 1rem 2.25rem 1rem 1rem;
    border: 1px solid var(--ne-info-tooltip-border);
    border-radius: 0.75rem;
    background: var(--ne-info-tooltip-bg);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--ne-brand-navy, #2a435d) 16%, transparent);
    color: var(--ne-info-tooltip-ink);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: start;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) scale(0.96);
    transform-origin: bottom center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Centered downward caret (rotated square) pointing at the icon */
.ne-info-tooltip__panel::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--ne-info-tooltip-border);
    border-top: 0;
    border-inline-start: 0;
    background: var(--ne-info-tooltip-bg);
    transform: translateX(-50%) rotate(45deg);
    pointer-events: none;
    box-shadow: 2px 2px 4px color-mix(in srgb, var(--ne-brand-navy, #2a435d) 8%, transparent);
}

.ne-info-tooltip__close {
    position: absolute;
    top: 0.4rem;
    inset-inline-end: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--ne-info-tooltip-ink);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
}

.ne-info-tooltip__close:hover,
.ne-info-tooltip__close:focus {
    opacity: 1;
    outline: none;
    background: color-mix(in srgb, var(--ne-brand-gold, #ffbf0a) 22%, transparent);
}

.ne-info-tooltip__title {
    display: block;
    margin: 0 0 0.35rem;
    color: var(--ne-info-tooltip-ink);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
}

.ne-info-tooltip__body {
    display: block;
    color: var(--ne-info-tooltip-ink);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.45;
}

.ne-info-tooltip.is-open .ne-info-tooltip__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

/* Bootstrap info tooltips — native Bootstrap caret; cream/gold fill only */
.tooltip.ne-bs-info-tooltip {
    --bs-tooltip-bg: var(--ne-brand-cream, #fff4d6);
    --bs-tooltip-color: var(--ne-brand-navy, #2a435d);
    --bs-tooltip-opacity: 1;
    --bs-tooltip-padding-x: 0.85rem;
    --bs-tooltip-padding-y: 0.65rem;
    --bs-tooltip-border-radius: 0.5rem;
    --bs-tooltip-max-width: 320px;
    --bs-tooltip-font-size: 0.875rem;
}

.tooltip.ne-bs-info-tooltip .tooltip-inner {
    max-width: min(320px, 85vw);
    text-align: start;
    font-weight: 400;
    line-height: 1.45;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--ne-brand-navy, #2a435d) 14%, transparent);
}
