/* Scope resource styles so listing cards, the summary pane, and galleries keep their layout. */
.listing-resources-pane {
    --listing-resource-gap: 24px;
    min-width: 0;
    padding: 0 0 80px;
    color: #292929;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: .04em;
}

.listing-resources-pane .listing-resources-title {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
}

.listing-resources-pane .listing-resource-container,
.listing-resources-pane .natural-heritage-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 858px;
    gap: var(--listing-resource-gap);
}

/* Keep the group name accessible while matching the reference's button-only presentation. */
.listing-resources-pane .property-resources > .listing-resources-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.listing-resources-pane .listing-resource,
.listing-resources-pane .ontario-map-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 52px;
    padding: 9px 14px 9px 10px;
    border: 0;
    border-radius: 14px;
    font-size: 16px;
    line-height: 28px;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.listing-resources-pane .listing-resource {
    background: #e2e6ed;
    gap: 0;
    padding-right: 10px;
}
.listing-resources-pane .listing-resource-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    object-fit: contain;
}
/* Give the icon 14 px of breathing room while preserving space for long resource labels. */
.listing-resources-pane .listing-resource-name {
    flex: 1;
    min-width: 0;
    padding-left: 14px;
    padding-right: 4px;
}
.listing-resources-pane .listing-resource-arrow {
    flex: 0 0 8px;
    width: 8px;
    height: 14px;
    margin-left: auto;
    object-fit: contain;
}
.listing-resources-pane .property-resources + .natural-heritage-research { margin-top: 48px; }

.listing-resources-pane .natural-heritage-steps {
    /* Keep both steps compact and top-aligned, matching the reference's 270 px control width. */
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 270px));
}
.listing-resources-pane .natural-heritage-step { min-width: 0; }
.listing-resources-pane .natural-heritage-research-instruction {
    margin: 0 0 24px;
    color: #7E7E7E;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
}

/* Additional ARN rows extend downward without a maximum height or wrapping columns. */
.listing-resources-pane .listing-arn-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.listing-resources-pane .listing-arn-row {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    padding: 4px 5px 4px 16px;
    border-radius: 14px;
    background: #eaeaea;
}
.listing-resources-pane .listing-arn-number {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
    white-space: nowrap;
    color: #424242;
    font-family: inherit;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    line-height: 28px;
}
.listing-resources-pane .arn-copy-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    flex: 0 0 70px;
    min-width: 70px;
    min-height: 44px;
    /* Offset the font's cap-height visually while keeping the pill and touch target centered. */
    padding: 4px 0 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #b5b5b5;
    font: inherit;
    font-size: 16px;
    line-height: 28px;
    font-weight: 400;
    /* Reference tracking 40 is 40/1000 em, or 0.64 px at a 16 px font size. */
    letter-spacing: .04em;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
/* The visible pill stays compact; the transparent button retains a touch target at least 44 px tall. */
.listing-resources-pane .arn-copy-button::before {
    content: '';
    position: absolute;
    inset: 9px 1px;
    z-index: -1;
    border-radius: 999px;
    background: #fff;
}
.listing-resources-pane .arn-copy-button[data-copied] { color: #32614c; }
.listing-resources-pane .ontario-map-link {
    background: #eaeaea;
    color: #424242;
    min-height: 52px;
    padding-left: 22px;
    padding-right: 20px;
}
.listing-resources-pane .listing-arn-empty {
    margin: 0;
    color: #686868;
    font-size: 13px;
    line-height: 1.6;
}

/* Announce copy results without reserving blank space or moving the ARN list. */
.listing-resources-pane .listing-copy-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.listing-resources-pane :is(.listing-resource, .ontario-map-link, .arn-copy-button):focus-visible {
    outline: 2px solid #4b50ff;
    outline-offset: 3px;
}
.listing-resources-pane :is(.listing-resource, .ontario-map-link, .arn-copy-button):active { transform: scale(.98); }

@media (hover: hover) and (pointer: fine) {
    .listing-resources-pane .listing-resource:hover { background: #d7dee8; }
    .listing-resources-pane .ontario-map-link:hover { background: #dfdfdf; }
    .listing-resources-pane .arn-copy-button:hover { color: #555; }
    .listing-resources-pane .arn-copy-button:hover::before { background: #f7f7ff; }
}
@media screen and (min-width: 601px) and (max-width: 1350px) {
    .listing-resources-pane .listing-resource-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 1000px) {
    /* The panel owns one inset; override the site's generic mobile child margins. */
    .listing-body-container > .listing-body-tab-content[tab="Resources"] { margin-left: 0; margin-right: 0; }
    .listing-body-container[data-active-tab="Resources"] { padding-bottom: 0; }
    .listing-right-pane-container.listing-resources-pane { margin: 32px var(--body-content-side-margins) 0; }
}
@media screen and (max-width: 600px) {
    .listing-resources-pane .natural-heritage-steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .listing-resources-pane .listing-resource-container { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    .listing-resources-pane .property-resources + .natural-heritage-research { margin-top: 32px; }
    .listing-resources-pane .listing-resources-title { margin-bottom: 30px; text-align: center; }
    .listing-resources-pane .natural-heritage-research-instruction { margin-bottom: 16px; text-align: center; font-size: 16px; }
    .listing-resources-pane .listing-resource,
    .listing-resources-pane .ontario-map-link { border-radius: 16px; font-size: 16px; }
    .listing-resources-pane .listing-resource { gap: 0; padding-right: 20px; }
    .listing-resources-pane .listing-resource-icon { flex-basis: 34px; width: 34px; height: 34px; }
    .listing-resources-pane .listing-arn-list { gap: 12px; }
    .listing-resources-pane .listing-arn-row { border-radius: 16px; padding-left: 22px; padding-right: 20px; }
}
@media screen and (max-width: 360px) {
    .listing-resources-pane .listing-arn-row { padding-left: 10px; padding-right: 5px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .listing-resources-pane :is(.listing-resource, .ontario-map-link, .arn-copy-button):active { transform: none; }
}
