main > div:has(> aside + dialog + section) > section > div:first-child > div *:has(> img[src$=".png" i]):after,
article figure section:has(> img[src$=".png" i]):after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%) scaleX(1.5);
    width: 60%;
    height: var(--mediumSpacing);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 80%);
    filter: blur(2.5px);
    z-index: revert-layer;
    opacity: .75;
}

main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li > figure:has(> img[src$=".png" i]) {
    background-color: var(--secondaryContrastColor);
}

main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li > figure + div {
	justify-content: start;
    position: absolute;
    bottom: 0;
    left: 0;
	width: 100%;
	margin: var(--smallSpacing);
    font-size: 1.6em;
    overflow: hidden;
}

main > div:has(> aside + dialog + section) > section > div[aria-hidden="true"] {
    display: block;
    width: 100%;
    min-width: 0;
    height: 1px;
    min-height: 0;
    max-height: none;
    margin: 0 0 -1px;
    padding: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    animation: none;
    overflow: hidden;
    pointer-events: none;
}

main > div:has(> aside + dialog + section) > section > button[type="button"] {
    margin: var(--mediumSpacing) auto;
}

main > div:has(> aside + dialog + section) > section > button[type="button"][hidden] {
    display: none;
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
)[data-image-status]:not(:where([data-image-status="native"]))::before {
    content: "\F02E9";
    display: grid;
    place-items: center;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--monochromeColor);
    background-color: var(--contrastColor);
    font-family: "Material Design Icons";
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    text-rendering: auto;
    opacity: 0.5;
    pointer-events: none;
    z-index: 3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:where(main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure)[data-image-status]::before {
    font-size: clamp(3.5rem, 6vw, 5rem);
}

:where(article > section > figure > section)[data-image-status]::before {
    font-size: clamp(6rem, 12vw, 12rem);
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
):is([data-image-status="loading"], [data-image-status="timeout"])::before {
    animation: gemstoneImagePulse 1.2s ease-in-out infinite;
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
)[data-image-status="error"]::before {
    content: "\F11D1";
    animation: none;
    opacity: 0.75;
}

article > section > figure > strong {
    z-index: 4;
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
)[data-image-status="loaded"]::before {
    content: none;
    display: none;
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
)[data-image-status]:not(:where([data-image-status="native"])) > img {
    opacity: 0;
    transition: opacity 250ms ease;
    z-index: 2;
}

:where(
    main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
    article > section > figure > section
)[data-image-status="loaded"] > img {
    opacity: 1;
}

@keyframes gemstoneImagePulse {
    50% {
        opacity: 0.75;
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(
        main > div:has(> aside + dialog + section) > section > div:first-child > div > a > ul > li:first-child > figure,
        article > section > figure > section
    ):is([data-image-status="loading"], [data-image-status="timeout"])::before {
        animation: none;
    }
}

/* Catalog page's pagination */
main > div:has(> aside + dialog + section) > section > div:first-child + div {
	height: var(--smallSpacing); /* Height necessary to debounce Object Observer API */
}

main > div:has(> aside + dialog + section) > section > div:first-child ~ div[role="status"][aria-label="Loading"] {
    position: sticky;
	position: -webkit-sticky;
    bottom: 0;
	height: 100px;
    z-index: 1;
}

main > div:has(> aside + dialog + section) > section > div:first-child ~ div[role="status"][aria-label="Loading"] > div {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	background-color: transparent;
}

main > div:has(> aside + dialog + section) > dialog > div {
	position: relative;
}

main > div:has(> aside + dialog + section) > dialog[aria-busy="true"] > div > div[role="status"][aria-label="Loading"] {
	display: block;
	z-index: 3;
}

body > header > section > div:first-child > p > span[role="status"][aria-label="Loading"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: calc(var(--largeSpacing) * 2);
	color: inherit;
	font-size: 1.75em;
	line-height: 0.75;
	white-space: nowrap;
}

/* Native navigation stays at the results end; enhancement reveals it there. */
main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"] {
    position: relative;
    z-index: 3;
    inline-size: fit-content;
    min-width: 0;
    min-inline-size: 0;
    block-size: fit-content;
    max-inline-size: calc(100% - var(--largeSpacing));
    margin: var(--largeSpacing) auto;
    padding: 0;
    border: 0;
    border-radius: var(--borderRadius);
    background-color: var(--contrastColor);
    color: var(--contrastOverlayColor);
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"] > nav {
    position: static;
    inset: auto;
    inline-size: auto;
    block-size: auto;
    max-block-size: none;
    margin: 0;
    padding: var(--largeSpacing);
    border-radius: var(--borderRadius);
    opacity: 1;
    animation: none;
    box-shadow: var(--boxShadow_pagination);
    backdrop-filter: none;
    background-color: var(--secondaryColor);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--largeSpacing);
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"] > nav > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 3rem;
    padding: var(--mediumSpacing) var(--largeSpacing);
    border-radius: var(--borderRadius);
    background-color: var(--contrastOverlayColor);
    color: var(--contrastColor);
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"] > nav > span {
    padding: var(--smallSpacing);
    text-align: center;
    text-transform: none;
    white-space: pre-line;
    line-height: 1.2;
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"][hidden],
main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"] > nav > a[hidden] {
    display: none;
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"][aria-hidden] {
    position: sticky;
    inset-block-end: var(--mediumSpacing);
}

main > div:has(> aside + dialog + section) > section > aside[aria-label="Catalog pagination"][aria-hidden="true"] {
    visibility: hidden;
    pointer-events: none;
}

main > div:has(> aside + dialog + section) > aside > div > label:has(input[name="FiltersPanel"]):before {
	content: "\F062E"; /* mdi-tune */
}

details > div {
    font-weight: bold;
}

/* Weight */
details:has(input[name="weightInputMin"]) > div {
    display: flex;
    flex-direction: column;
    position: relative;
	outline: 1px solid transparent;
}

details:has(input[name="weightInputMin"]) > div > div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .25em;
}

details:has(input[name="weightInputMin"]) > div > div:first-child > div {
    width: 4.75em;
}

details:has(input[name="weightInputMin"]) > div > div:first-child > span {
    padding: var(--smallSpacing);
}

details:has(input[name="weightInputMin"]) > div > div:first-child > div:first-of-type > input[inputmode="decimal"],
details:has(input[name="dimensionsInputMinLength"]) > div > div:nth-of-type(odd) > input[inputmode="decimal"] {
    border-radius: var(--borderRadius) 0 0 var(--borderRadius);
}

details:has(input[name="weightInputMin"]) > div > div:first-child > div:last-of-type > input[inputmode="decimal"],
details:has(input[name="dimensionsInputMinLength"]) > div > div:nth-of-type(even) > input[inputmode="decimal"] {
    border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
}

form > details div:has(> input[inputmode="decimal"] + label) {
    margin-top: var(--smallSpacing);
}

form > details div:has(> input[inputmode="decimal"] + label) > label {
    top: 0;
    transform: translateY(-50%) scale(0.75);
}

main > div:has(> aside + dialog + section) > aside > div > form details label span {
    font-size: inherit;
}

/* Native dual-range slider */
details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) {
    --weight-range-start: 0%;
    --weight-range-end: 100%;
    position: relative;
    height: 2em;
    margin-block: .25em;
    touch-action: none;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) > span,
details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) > span > span {
    position: absolute;
    inset: 0;
    border-radius: var(--borderRadius);
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) > span {
    overflow: hidden;
    outline: 1px solid transparent;
    background: var(--secondaryColor);
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) > span > span {
    left: var(--weight-range-start);
    right: calc(100% - var(--weight-range-end));
    background: #000;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]::-moz-range-track {
    height: 100%;
    background: transparent;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]::-webkit-slider-thumb {
    width: 1.5em;
    height: 2em;
    border: 1px solid #000;
    border-radius: var(--borderRadius);
    appearance: none;
    -webkit-appearance: none;
    background: var(--secondaryColor);
    cursor: ew-resize;
    pointer-events: auto;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]::-moz-range-thumb {
    width: 1.5em;
    height: 2em;
    border: 1px solid #000;
    border-radius: var(--borderRadius);
    background: var(--secondaryColor);
    cursor: ew-resize;
    pointer-events: auto;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--highlightColor);
    outline-offset: 2px;
}

details:has(input[name="weightInputMin"]) div:has(> input[type="range"]) input[type="range"]:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--highlightColor);
    outline-offset: 2px;
}

/* Dimensions */
details:has(input[name="dimensionsInputMinLength"]) > div {
    display: grid;
   	grid-template-columns: 6em 1em 6em 1em;
	align-items: center;
	justify-content: center;
    gap: var(--smallSpacing) var(--largeSpacing);
}

details:has(input[name="dimensionsInputMinLength"]) > div div:has(> input[name="dimensionsInputMinLength"]) {
    grid-area: 1 / 1;
}

details:has(input[name="dimensionsInputMinLength"]) > div div:has(> input[name="dimensionsInputMaxLength"]) {
    grid-area: 2 / 1;
}

details:has(input[name="dimensionsInputMinLength"]) > div span {
	grid-row: 1 / 3; /* Spans rows 1-3 */
}

/* × symbol */
details:has(input[name="dimensionsInputMinLength"]) > div span:first-of-type { 
	grid-column: 2;
	font-size: 2em;
} 

details:has(input[name="dimensionsInputMinLength"]) > div div:has(> input[name="dimensionsInputMinWidth"]) {
    grid-area: 1 / 3;
}

details:has(input[name="dimensionsInputMinLength"]) > div div:has(> input[name="dimensionsInputMaxWidth"]) {
    grid-area: 2 / 3;
}

details:has(input[name="dimensionsInputMinLength"]) > div span:last-of-type {
    grid-column: 4;
}

/* Irregular facet planes for gemstone Type controls. */
:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child {
    background:
        linear-gradient(146deg,
            oklch(from var(--contrastColor) l c h / 0.32) 0 31%,
            transparent 31.5%),
        linear-gradient(24deg,
            transparent 0 56%,
            oklch(from var(--secondaryColor) l c h / 0.24) 56.5% 76%,
            transparent 76.5%),
        linear-gradient(163deg,
            transparent 0 62%,
            oklch(from var(--contrastOverlayColor) l c h / 0.08) 62.5% 100%);
    background-size: 100% 100%;
}

:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child {
    position: absolute;
    inset: 0;
    opacity: 0.82;
    animation: fadeIn 750ms ease-in forwards;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    transition: filter 250ms ease-in-out;
}

:is(label, div:has(> input[name="FiltersType"])):has(input:checked ~ div:last-child) {
    box-shadow: var(--boxShadow_gemSelection);
}

:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child:before,
:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child:after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-origin: 41% 44%;
}

:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child:before {
    background: oklch(from var(--contrastColor) l c h / 0.22);
    clip-path: polygon(0 0, 67% 0, 41% 44%, 0 76%);
    transform: var(--type-facet-before);
}

:is(label, div:has(> input[name="FiltersType"])):has(input[name="FiltersType"]) > div:last-child:after {
    background: oklch(from var(--contrastOverlayColor) l c h / 0.10);
    clip-path: polygon(67% 0, 100% 0, 100% 58%, 41% 44%);
    transform: var(--type-facet-after);
}

:is(label:has(> input[name="FiltersType"]), div:has(> input[name="FiltersType"]) > label) > div:first-of-type {
    background: var(--type-swatch);
}

:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"]):hover,
:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"]):has(input:checked) {
    background: var(--type-surface);
}

:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"]):is(:hover, :has(input:checked)) > div:last-child {
    filter: contrast(1.06) saturate(1.08);
}

:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"][value="SA"]) {
    --type-facet-before: rotate(8deg) scale(1.18);
    --type-facet-after: rotate(96deg) scale(1.18);
    --type-swatch: conic-gradient(
        rgba(0, 0, 139, 1.00) 0%,
        rgba(148, 0, 211, 1.00) 12.5%,
        rgba(255, 69, 0, 1.00) 37.5%,
        rgba(255, 223, 0, 1.00) 50%,
        rgba(0, 128, 0, 1.00) 62.5%,
        rgba(255, 255, 255, 1.00) 75%,
        rgba(0, 0, 128, 1.00) 87.5%,
        rgba(0, 0, 139, 1.00) 100%
    );
    --type-surface: conic-gradient(from 14deg at 47% 43%,
        rgba(0, 0, 139, 0.4) 0%,
        rgba(148, 0, 211, 0.4) 12.5%,
        rgba(255, 69, 0, 0.4) 37.5%,
        rgba(255, 223, 0, 0.4) 50%,
        rgba(0, 128, 0, 0.4) 62.5%,
        rgba(255, 255, 255, 0.4) 75%,
        rgba(0, 0, 128, 0.4) 87.5%,
        rgba(0, 0, 139, 0.4) 100%
    );
}

:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"][value="RU"]) {
    --type-facet-before: rotate(38deg) scale(1.18);
    --type-facet-after: rotate(-34deg) scale(1.18);
    --type-swatch: conic-gradient(
        rgba(220, 20, 60, 1.00) 0%,
        rgba(139, 0, 0, 1.00) 25%,
        rgba(187, 48, 80, 1.00) 50%,
        rgba(178, 34, 34, 1.00) 75%,
        rgba(220, 20, 60, 1.00) 100%
    );
    --type-surface: conic-gradient(from 58deg at 56% 51%,
        rgba(220, 20, 60, 0.4) 0%,
        rgba(139, 0, 0, 0.4) 25%,
        rgba(187, 48, 80, 0.4) 50%,
        rgba(178, 34, 34, 0.4) 75%,
        rgba(220, 20, 60, 0.4) 100%
    );
}

:is(label, div:has(> input[name="FiltersType"])):has(> input[name="FiltersType"][value="semi"]) {
    --type-facet-before: rotate(164deg) scale(1.18);
    --type-facet-after: rotate(47deg) scale(1.18);
    --type-swatch: conic-gradient(
        rgba(0, 180, 255, 1.0) 0%,
        rgba(136, 255, 51, 1.0) 20%,
        rgba(170, 102, 255, 1.0) 40%,
        rgba(255, 228, 0, 1.0) 60%,
        rgba(255, 102, 34, 1.0) 80%
    );
    --type-surface: conic-gradient(from 206deg at 59% 39%,
        rgba(0, 180, 255, 0.5) 0%,
        rgba(136, 255, 51, 0.5) 20%,
        rgba(170, 102, 255, 0.5) 40%,
        rgba(255, 228, 0, 0.5) 60%,
        rgba(255, 102, 34, 0.5) 80%
    );
}

:where(details:has(input[name="FiltersType"][value="SA"]:checked)) ~ details :is(label, div):has(> input[name="FiltersColor"][value="RE"]),
details:has(input[name="FiltersType"][value="RU"]:checked) ~ details:has(input[name="FiltersColor"][value="BL"]) {
    display: none;
}

details label img,
details label svg {
    grid-column: span 2;
    max-width: 6em;
    height: auto;
    z-index: 1;
}

/* Color values */
:is(label, div):has(> input[name="FiltersColor"][value="BL"]) {
    --color-surface: 153, 153, 255;
    --color-swatch: 41, 69, 255;
}

:is(label, div):has(> input[name="FiltersColor"][value="PU"]) {
    --color-surface: 180, 76, 224;
    --color-swatch: 148, 0, 211;
}

:is(label, div):has(> input[name="FiltersColor"][value="PK"]) {
    --color-surface: 255, 137, 201;
    --color-swatch: 255, 20, 147;
}

:is(label, div):has(> input[name="FiltersColor"][value="PH"]) {
    --color-surface: 253, 142, 134;
    --color-swatch: 253, 94, 83;
}

:is(label, div):has(> input[name="FiltersColor"][value="OR"]) {
    --color-surface: 255, 166, 76;
    --color-swatch: 255, 128, 0;
}

:is(label, div):has(> input[name="FiltersColor"][value="YL"]) {
    --color-surface: 255, 255, 153;
    --color-swatch: 255, 255, 0;
}

:is(label, div):has(> input[name="FiltersColor"][value="GR"]) {
    --color-surface: 48, 189, 157;
    --color-swatch: 11, 146, 27;
}

:is(label, div):has(> input[name="FiltersColor"][value="WH"]) {
    --color-surface: 229, 229, 229;
    --color-swatch: 255, 255, 255;
    border: 1px solid #c0c0c0;
}

:is(label, div):has(> input[name="FiltersColor"][value="RE"]) {
    --color-surface: 255, 76, 76;
    --color-swatch: 255, 0, 0;
}

/* Shared color presentation and states */
:is(label, div):has(> input[name="FiltersColor"]) {
    background-color: rgba(var(--color-surface), 0.50);
}

:is(label, div):has(> input[name="FiltersColor"]) div:first-of-type {
    background-color: rgba(var(--color-swatch), 0.50);
}

:is(label, div):has(> input[name="FiltersColor"]):hover {
    background-color: rgba(var(--color-surface), 0.75);
}

:is(label, div):has(> input[name="FiltersColor"]):hover div:first-of-type {
    background-color: rgba(var(--color-swatch), 0.75);
}

:is(label, div):has(> input[name="FiltersColor"]):has(input:checked) {
    background-color: rgba(var(--color-surface), 1.00);
}

:is(label, div):has(> input[name="FiltersColor"]):has(input:checked) div:first-of-type {
    background-color: rgba(var(--color-swatch), 1.00);
}

@media only screen and (max-width: 1000px) {
    /* Keep touch layouts at their resting color when a browser synthesizes hover. */
    :is(label, div):has(> input[name="FiltersColor"]):hover {
        background-color: rgba(var(--color-surface), 0.50);
    }

    :is(label, div):has(> input[name="FiltersColor"]):hover div:first-of-type {
        background-color: rgba(var(--color-swatch), 0.50);
    }
}

:is(label, div):has(> input[name="FiltersMatching"][value="1"]):has(input:checked) svg g:first-of-type {
    animation: PairedLeft 500ms linear 1 normal forwards;
}

@keyframes PairedLeft {
    from {
        transform: translate(7.630455px, 15.308873px);
    }

    to {
        transform: translate(10.500738px, 18.023718px);
    }
}

:is(label, div):has(> input[name="FiltersMatching"][value="1"]):has(input:checked) svg g:last-of-type {
    animation: PairedRight 500ms linear 1 normal forwards;
}

@keyframes PairedRight {
    from {
        transform: translate(18.289944px, 25.742831px);
    }

    to {
        transform: translate(16.385505px, 23.554753px);
    }
}

/* A compound option groups a native selection label and an independent result link. */
div:has(> input:is([name="FiltersType"], [name="FiltersColor"], [name="FiltersShape"], [name="FiltersEnhancement"], [name="FiltersMatching"])) > label:has(img, svg, div) {
    display: contents;
}

div:has(> input[name="FiltersType"]) {
    margin: auto;
    max-height: 125px;
}

div:has(> input[name="FiltersType"]) > :is(a, label:not(:has(img, svg, div))) {
    text-align: center;
}

/* Stretch the real fallback link across its option without nesting controls. */
div:has(> input:is([name="FiltersType"], [name="FiltersColor"], [name="FiltersShape"], [name="FiltersEnhancement"], [name="FiltersMatching"])):has(> a) {
    position: relative;
}

div:has(> input:is([name="FiltersType"], [name="FiltersColor"], [name="FiltersShape"], [name="FiltersEnhancement"], [name="FiltersMatching"])) > a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

div:has(> input:is([name="FiltersType"], [name="FiltersColor"], [name="FiltersShape"], [name="FiltersEnhancement"], [name="FiltersMatching"])) > a:focus-visible::after {
    outline: 2px solid var(--highlightColor);
    outline-offset: 2px;
}

main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label {
    width: auto;
    padding: unset;
}

@media only screen and (max-width: 1000px) {

    main > div:has(> aside + dialog + section) > aside:has(> div > div:first-child > a:focus-visible) {
        overflow: visible;
    }

    main > div:has(> aside + dialog + section) > aside:has(> div > label input:not(:checked)) > div > div:first-child:has(> a:focus-visible) {
        top: 100%;
    }

	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) {        
		position: absolute;
        top: 0;
        left: 0;
        right: 0;
        margin: auto;
        width: auto;
        min-width: unset;
        height: auto;
        transition: top 500ms ease-in-out;
        cursor: default;
        overflow: hidden;
        z-index: 8;
	}

	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]:checked) {
		height: 100%;
		width: 100%;
		padding: unset;
		border-radius: var(--borderRadius);
		backdrop-filter: blur(0);
		-webkit-backdrop-filter: blur(0);
		animation: backdrop 1750ms ease-in forwards;
	}

	main > div:has(> aside + dialog + section) > aside:not([data-state="initiating"]):has(> div > label input[type="checkbox"]) > div {
		width: auto;
		height: 100%;
		max-height: unset;
		padding: unset;
		box-shadow: none;
		background-color: transparent;
	}

	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div:has(> label input:checked) {
		width: 100%;
		background-color: oklch(from var(--contrastOverlayColor) l c h / 0.50);
		transition: background-color ease-in 1750ms;
	}

	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > :is(label:has(> input[type="checkbox"]), form) {
		opacity: 1;
		animation: none;
	}

	/* Header */
	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label:has(input) {
		justify-content: center;
		width: auto;
		min-width: 200px;
		height: 1.5em;
		margin-top: 0;
		padding: unset;
		box-shadow: none;
		transition: width 500ms ease-in-out, letter-spacing 500ms ease-in-out, box-shadow 500ms ease-in-out;
	}
	
	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label:has(input:checked) {       
		width: 100%;
		margin: unset;
		letter-spacing: var(--smallSpacing);
		animation: FiltersHeaderShowAnimation 500ms ease-in 500ms forwards;
	}
	@keyframes FiltersHeaderShowAnimation {

		from {
			box-shadow: none;
		}

		to {
			box-shadow: var(--boxShadow_elevated);
		}

	}
	
	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label:has(input):after {
		content: "\F0415"; /* mdi-plus */
	}
	
	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label:has(input:checked):after {
		content: "\F0374"; /* mdi-minus */
	}
	
	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) form {
		display: none;
		margin: auto 0 0;
		padding: var(--mediumSpacing) 1vh;
		transform: translateY(100%);
		background-color: var(--contrastColor);
		cursor: default;
		transition: all 500ms ease-out 250ms;
	}

	main > div:has(> aside + dialog + section) > aside:has(> div > label input[type="checkbox"]) > div > label:has(input:checked) ~ form {
		display: flex;
		max-height: unset;
		transform: translateY(100%);
		animation: MobileFiltersShowAnimation 1000ms ease-in-out forwards;
	}
	@keyframes MobileFiltersShowAnimation {

		from {
			transform: translateY(100%);
		}

		to {
			transform: translateY(0);
		}

	}
	
}

details {
	outline: 1px solid transparent;
}

details,
search {
	width: 100%;
}

main > div:has(> aside + dialog + section) > aside > div > form > search {
	grid-template-columns: calc(3em + (var(--largeSpacing) * 2)) minmax(0, 1fr) 3em;
}

search,
details summary {
	min-height: 2em;
	font-weight: bold;
}

search,
details summary {
	border-bottom: 2px solid transparent;
}

details summary {
	overflow: hidden;
}

details summary::-webkit-details-marker {
	display: none;
}

details[open] summary {
	cursor: pointer;
}

details summary > small:last-child {
	min-width: 0;
	max-width: 50%;
	margin-left: auto;
	overflow: hidden;
	color: oklch(from var(--contrastOverlayColor) l c h / .7);
	font-size: .75em;
	font-weight: normal;
	text-overflow: ellipsis;
	white-space: nowrap;
}

details summary > small:last-child:empty {
	display: none;
}

search:has(input:not(:placeholder-shown)),
search:has(input:focus),
details[open] summary {
	border-color: var(--primaryColor);
}

/* Icon found on Inventory.css */
search > span.mdi-magnify,
details summary:before {
    display: flex;
    align-items: center;
    justify-content: center;
	height: 100%;
	min-width: 3em;
    margin: 0 var(--largeSpacing);
	transform: scale(1.5);    
	backdrop-filter: unset;
    -webkit-backdrop-filter: unset;
	background-color: unset;
}

main > div:has(> aside + dialog + section) > aside > div > form > search > span.mdi-magnify {
	width: auto;
}

main > div:has(> aside + dialog + section) > aside > div > form > search > button {
	width: 3em;
}

/* Arrow indicator */
search button,
details summary:after {
	content: "\F035F"; /* mdi-menu-right */
	display: flex;
    align-items: center;
    justify-content: center;
	min-width: 3em;
	height: 2em;
	margin-left: auto;
	color: rgba(0, 0, 0, 0.25);
    transition: all ease-out 250ms;
}

details summary:has(> small:last-child:not(:empty)):after {
	margin-left: 0;
}

details summary:hover:after {
	color: oklch(from var(--contrastOverlayColor) l c h / 0.75);
}

details[open] summary:after {
	color: rgba(0, 0, 0, 1.00);
	transform: rotate(90deg);
}

details > div {
    display: grid;
    justify-items: center;
    grid-template-columns: 1fr 1fr;
    gap: var(--largeSpacing);
    border-radius: 0 0 var(--borderRadius) var(--borderRadius);
	background-color: oklch(from var(--highlightColor) l c h / 0.25);
	overflow: auto;
}

/* Open the tab when summary is checked */
details[open] > div {
	max-height: 0;
	padding: 0 var(--largeSpacing);
	animation: detailsOpen 500ms ease-in forwards;
}
@keyframes detailsOpen {

	from {
		max-height: 0;
		padding: 0 var(--largeSpacing);
	}

	to {
		max-height: 50vh;
		padding: calc(var(--largeSpacing) / 2) var(--largeSpacing) calc(var(--largeSpacing) / 4);
	}

}

/* An unpaired final Type choice remains centered in the shared two-column group. */
details > div:has(input[name="FiltersType"]) > :is(label, div):last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Media tabs */
* > section:has(> header > label > input[name="mediaTabs"]) {
	min-width: 275px;
	height: -webkit-fill-available;
	margin: 0 auto;
	aspect-ratio: 1;
	overflow: hidden;
	background-color: #fff;
}

header:has(> label > input[name="mediaTabs"]),
figure section > div:has(> label > input[name="certificateMediaTab"]) {    
	position: relative;
	display: flex;
    justify-content: center;
    justify-items: center;
    gap: var(--smallSpacing);
	max-height: 2em;
	border-radius: inherit;
    background-color: oklch(from var(--secondaryColor) l c h / 0.75);
	z-index: 2;
}

header:has(> label > input[name="mediaTabs"]) > label,
figure section > div:has(> label > input[name="certificateMediaTab"]) > label {
	grid-template-columns: unset;
	position: relative;
	z-index: 1;
    width: auto;
	padding: var(--mediumSpacing);
	border-bottom: 2px solid transparent;
    background-color: transparent;
	transition: all 400ms ease-in;
}

header:has(> label > input[name="mediaTabs"]) > label:has(> input:checked),
figure section > div:has(> label > input[name="certificateMediaTab"]) > label:has(> input:checked) {
    box-shadow: none;
}

header:has(> label > input[name="mediaTabs"]) > label:before,
figure section > div:has(> label > input[name="certificateMediaTab"]) > label:before {
	font-size: calc(var(--largeSpacing) * 1.1);
}

header:has(> label > input[name="mediaTabs"]) > label:hover,
figure section > div:has(> label > input[name="certificateMediaTab"]) > label:hover {
	border-color: oklch(from var(--primaryColor) l c h / 0.75);
}

header:has(> label > input[name="mediaTabs"]) > label:has(> input:checked),
figure section > div:has(> label > input[name="certificateMediaTab"]) > label:has(> input:checked) {
	pointer-events: none;
}

header:has(> label > input[name="mediaTabs"]):before,
figure section > div:has(> label > input[name="certificateMediaTab"]):before {
	content: "";
	position: absolute;
	top: var(--mediaTabY, 0);
	left: var(--mediaTabX, 0);
	z-index: 0;
	box-sizing: border-box;
	width: var(--mediaTabWidth, 0);
	height: var(--mediaTabHeight, 0);
	border-bottom: 2px solid var(--primaryColor);
	background-color: var(--highlightColor);
	pointer-events: none;
	transition: var(--mediaTabTransition, left 500ms ease-in-out, top 500ms ease-in-out, width 500ms ease-in-out, height 500ms ease-in-out);
	will-change: left, top, width, height;
}

/* Subtabs [certificates] */
figure section > div:has(> label > input[name="certificateMediaTab"]) {    
	position: absolute;
    right: 0;
    bottom: var(--smallSpacing);
    left: 0;
    margin: 0 auto;
	padding: var(--smallSpacing);
    width: fit-content;
    width: -moz-fit-content;
    border-radius: var(--borderRadius);
    background-color: oklch(from var(--secondaryColor) l c h / 0.50);
    overflow: hidden;
}

figure section > div:has(> label > input[name="certificateMediaTab"]) > label {
	position: relative;
	z-index: 1;
	padding: var(--smallSpacing);
	font-weight: bold;
}

figure section > div:has(> label > input[name="certificateMediaTab"]) > label > span {
    padding: 0;
    background-color: transparent;
}

figure section > div:has(> label > input[name="certificateMediaTab"]) ~ div {
	display: none;
	position: absolute;
	height: 100%;
	width: 100%;
	overflow: hidden;
}

header:has(> label:nth-of-type(1) > input[name="mediaTabs"]:checked) ~ figure > section:nth-of-type(1),
header:has(> label:nth-of-type(2) > input[name="mediaTabs"]:checked) ~ figure > section:nth-of-type(2),
header:has(> label:nth-of-type(3) > input[name="mediaTabs"]:checked) ~ figure > section:nth-of-type(3),
figure section > div:has(> label:nth-of-type(1) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(2),
figure section > div:has(> label:nth-of-type(2) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(3),
figure section > div:has(> label:nth-of-type(3) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(4),
figure section > div:has(> label:nth-of-type(4) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(5),
figure section > div:has(> label:nth-of-type(5) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(6),
figure section > div:has(> label:nth-of-type(6) > input[name="certificateMediaTab"]:checked) ~ :nth-of-type(7) {
	display: flex;
}
@media only screen and (max-width: 1000px) {

	article:has(> section > header input[name="mediaTabs"]):has(> table) {
		block-size: var(--panelMaxBlockSize);
	}

	article:has(> section > header input[name="mediaTabs"]) > section {
		flex: none;
		align-self: center;
		inline-size: min(75%, 18rem, calc(var(--panelMaxBlockSize) / 2));
		min-inline-size: 0;
		max-block-size: min(18rem, calc(var(--panelMaxBlockSize) / 2));
		block-size: auto;
	}

	article:has(> section > header input[name="mediaTabs"]) > section > figure {
		flex: 1;
		min-block-size: 0;
		inline-size: 100%;
	}

	article:has(> section > header input[name="mediaTabs"]) > table {
		flex: 1 1 0;
		min-block-size: 0;
		max-block-size: none;
		inline-size: 100%;
		margin-block: 0;
	}

	article:has(> section > header input[name="mediaTabs"]) > table > tbody {
		min-block-size: 0;
		overscroll-behavior: contain;
	}

}

/* data-state="initiating" gets manipulated by the Catalog initiation component. */
main > div:has(> aside + dialog + section):has(aside[data-state="initiating"]) > *:not(aside[data-state="initiating"], section, dialog[open]),
aside[data-state="initiating"] > div > form > *:not(:has(input[name="FiltersType"])),
aside[data-state="initiating"] > div > div:first-child,
aside[data-state="initiating"] > div > div:last-child {
    display: none;
}

aside[data-state="initiating"] details:has(input[name="FiltersType"]:checked:not([value="RU"], [value="COR-PA"])) ~ details:has(input[name="FiltersColor"][value="BL"]) {
    display: block;
}

aside[data-state="initiating"] details[open] summary:after {
    color: var(--secondaryColor);
}

main > div:has(> aside + dialog + section):has(aside[data-state="initiating"]) > section {
    --totalTransitionDuration: 1250ms;
    --catalogInitiationCollapseEasing: cubic-bezier(0.65, 0, 0.35, 1);
    --catalogInitiationFadeEasing: ease-out;
    --catalogInitiationTravelEasing: cubic-bezier(0.45, 0.05, 0.2, 1);

    width: 0;
    height: 0;
    opacity: 0;
    animation: none;
}

main > div:has(> aside + dialog + section):has(aside[data-state="initiating"]) > section::after {
    content: none;
    animation: none;
}

/* The Catalog initiation component removes data-state="initiating". */
main > div:has(> aside + dialog + section):not(:has(aside[data-state="initiating"])) > section {
    --totalTransitionDuration: 1250ms;
    
    height: 100%;    
    opacity: 1;
}

main > div:has(> aside + dialog + section) > aside:not([data-state="initiating"]) > div {
    opacity: 1;
    animation: none;
}

main > div:has(> aside + dialog + section) > aside:not([data-state="initiating"]) > div > div:first-child:has(> a) a:focus-visible {
    padding: calc(var(--smallSpacing) / 2) var(--smallSpacing);
    border-radius: var(--borderRadius);
    outline: 2px solid var(--primaryColor);
    outline-offset: 2px;
    background-color: var(--contrastColor);
    box-shadow: var(--boxShadow_subtle);
}

@media only screen and (max-width: 1000px) {

    main > div:has(> aside + dialog + section) > aside:has(> div > label input[name="FiltersPanel"]) {
        transition: top 550ms cubic-bezier(0.65, 0, 0.35, 1), transform 550ms cubic-bezier(0.65, 0, 0.35, 1);
    }

    main > div:has(> aside + dialog + section) > aside:not([data-state="initiating"]):has(> div > label input[name="FiltersPanel"]:not(:checked)) {
        overflow: visible;
    }

    main > div:has(> aside + dialog + section) > aside:not([data-state="initiating"]):has(> div > label input[name="FiltersPanel"]:not(:checked)) > div {
        overflow: visible;
    }

    main > div:has(> aside + dialog + section):has(aside[data-state="initiating"]) > section {
        width: auto;
    }
    
    main > div:has(> aside + dialog + section) aside[data-state="initiating"] {
        top: var(--mediumSpacing);
        bottom: var(--mediumSpacing);
        height: auto;
        transform: none;
        cursor: unset;
    }

    main > div:has(> aside + dialog + section) aside[data-state="initiating"] > div {
        width: auto;
        background-color: var(--contrastColor);
    }

    main > div:has(> aside + dialog + section) > aside[data-state="initiating"]:has(> div > label input[name="FiltersPanel"]) > div > label:has(input[name="FiltersPanel"]),
    main > div:has(> aside + dialog + section) > aside[data-state="initiating"]:has(> div > label input[name="FiltersPanel"]) > div > label:has(input[name="FiltersPanel"]:focus) {
		color: var(--contrastOverlayColor);
		margin-top: 0;
		background-color: transparent;
		cursor: default;
		pointer-events: none;
    }

    main > div:has(> aside + dialog + section) aside[data-state="initiating"] > div > label:has(input):after {
        display: none;
    }

    main > div:has(> aside + dialog + section) aside[data-state="initiating"] form {
        display: flex;
        max-height: calc(var(--panelMaxBlockSize) - (var(--largeSpacing) * 4));
        transform: unset;
        overflow-y: auto;
    }

    main > div:has(> aside + dialog + section) > aside[data-state="initiating"]:has(> div > label input[name="FiltersPanel"]) > div > form {
        display: flex;
        max-height: calc(var(--panelMaxBlockSize) - (var(--largeSpacing) * 4));
        transform: unset;
        overflow-y: auto;
    }

    main > div:has(> aside + dialog + section):has(> aside[data-state="initiating"]) > section > div {
        display: none;
    }

}

@media (prefers-reduced-motion: reduce) {

    main > div:has(> aside + dialog + section):not(:has(aside[data-state="initiating"])) > section,
    main > div:has(> aside + dialog + section) > aside:has(> div > label input[name="FiltersPanel"]) {
        transition: none;
        animation: none;
    }

    main > div:has(> aside + dialog + section):not(:has(aside[data-state="initiating"])) > section > div:first-child,
    aside[data-state="initiating"] details[open] > div,
    aside[data-state="initiating"] details[open] > div > label {
        opacity: 1;
        filter: none;
        transform: none;
        animation: none;
    }

    aside[data-state="initiating"] details[open] > div {
        max-height: 50vh;
        padding: calc(var(--largeSpacing) / 2) var(--largeSpacing) calc(var(--largeSpacing) / 4);
    }

}
