/**
 * Hawkes' Impossible Portraits — in-app help info-icon + popover.
 * Add-only; inherits the shared --hac-* design tokens (configurator.css) with
 * safe fallbacks so it also reads correctly on the WooCommerce cart/checkout pages.
 */

.hac-hip-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 6px;
    font-weight: 400;
    line-height: 1;
}

/* Explicit resets with !important: the site/Kadence theme styles bare <button>s
   (the tan pill), and its rules were winning the cascade over `all: unset`. */
.hac-hip-help__btn {
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Fixed size + fixed weight so the icon stays a tidy small circle regardless of
       the host text (a big heading vs a small field label). */
    width: 18px !important;
    min-width: 0 !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: currentColor !important;
    border: 1px solid currentColor !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    cursor: pointer !important;
    opacity: 0.65;
    vertical-align: middle;
}

.hac-hip-help__btn:hover { opacity: 1 !important; }
.hac-hip-help__btn:focus-visible {
    opacity: 1 !important;
    outline: 2px solid var(--hac-accent, #c1a87b) !important;
    outline-offset: 2px !important;
}

.hac-hip-help__pop {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(280px, 80vw);
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--hac-surface, #1c1c1e);
    color: var(--hac-text, #f5f5f5);
    border: 1px solid var(--hac-border, rgba(255, 255, 255, 0.15));
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
    white-space: normal;
}

.hac-hip-help__pop[hidden] { display: none; }

.hac-hip-help__title {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.hac-hip-help__body { display: block; }

/* On narrow screens, dock the popover to the bottom so it never clips off-screen. */
@media (max-width: 600px) {
    .hac-hip-help__pop {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        top: auto;
        transform: none;
        width: auto;
    }
}
