﻿/*
 * The SHI mark and its popover (DELTA-1346): SalmonHabitatIndicatorMarkHelper (PsInfo.WebCommon) and
 * ScriptsCustom/SalmonHabitatIndicatorMark.js. Copied into each web app that shows it (PsInfo.Web, VitalSigns.Web);
 * keep the copies identical.
 */
.shiMarkWrapper {
    display: inline-block;
}

/* Under the indicator's name in the Vital Signs trees. */
.vitalsignstree .shiMarkWrapper {
    display: block;
}

/* Element-qualified so it outranks the site-wide button and a.button rules (dark fill, white text). */
.shiMark,
button.shiMark,
button.shiMark:hover,
button.shiMark:focus,
button.shiMark:focus-visible {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 1.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: #00549a;
    font: inherit;
    font-weight: 700;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

    a.shiMark:hover,
    a.shiMark:focus {
        color: #00549a;
        text-decoration: none;
    }

    .shiMark:hover .shiMark__label {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .shiMark:focus-visible {
        outline: 2px solid #00549a;
        outline-offset: 2px;
    }

.shiMark__icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
}

.shiMarkPopover {
    position: fixed;
    z-index: 1070;
    width: min(16rem, calc(100vw - 2rem));
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    color: #212529;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: start;
}

.shiMarkPopover__definition {
    display: block;
}

.shiMarkPopover__link {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
