/* Tricios public vector controls. Load after every page's existing styles.
 * Selector inventory:
 * - .door-select::after, .project-edit-select::after: select chevrons.
 * - .door-check input:checked::after: checkbox check.
 * - .mr-option-grid > button.is-selected::after: option selection check.
 * - .floor-model-card.is-selected::after: floor selection check.
 * - .project-type-option:has(input:checked)::after: project selection check.
 * - .project-type-option.catalog-link .project-option-copy strong::after:
 *   external-link arrow.
 * - .estimate-details summary::after: expand/collapse plus/minus.
 * - .one-off-features li::before: feature-list check.
 * - .toc summary::after: mobile-only expand/collapse plus/minus.
 * No text nodes, translation keys, mathematical operators or dynamic SVG
 * renderers are changed. Native Safari/Chrome controls are outside this file.
 */

:root {
  --tricios-vector-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 6'/%3E%3C/svg%3E");
  --tricios-vector-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --tricios-vector-arrow-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M6 6h12v12'/%3E%3C/svg%3E");
  --tricios-vector-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E");
  --tricios-vector-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}

.door-select::after,
.project-edit-select::after,
.door-check input:checked::after,
body.mr-catalog-page .mr-option-grid > button.is-selected::after,
body.mr-premium-floor .floor-model-card.is-selected::after,
.project-type-option:has(input:checked)::after,
.project-type-option.catalog-link .project-option-copy strong::after,
.estimate-details summary::after,
.one-off-features li::before,
html[data-theme] body[data-m02-native] .mr-option-grid > button.is-selected::after,
html[data-theme] body[data-m02-native] .project-type-option:has(input:checked)::after {
  content: "" !important;
  display: inline-block;
  background: none !important;
  background-color: currentColor !important;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
  font-size: 0;
  line-height: 0;
  box-shadow: none !important;
}

.door-select::after,
.project-edit-select::after {
  -webkit-mask-image: var(--tricios-vector-chevron-down);
  mask-image: var(--tricios-vector-chevron-down);
  width: 18px;
  height: 18px;
}

.project-edit-select::after {
  width: 14px;
  height: 14px;
}

.door-check input:checked::after,
body.mr-catalog-page .mr-option-grid > button.is-selected::after,
body.mr-premium-floor .floor-model-card.is-selected::after,
.project-type-option:has(input:checked)::after,
.one-off-features li::before {
  -webkit-mask-image: var(--tricios-vector-check);
  mask-image: var(--tricios-vector-check);
}

.door-check input:checked::after {
  width: 13px;
  height: 13px;
}

body.mr-catalog-page .mr-option-grid > button.is-selected::after {
  width: 15px;
  height: 15px;
  color: var(--m02-accent, var(--brand, #ad8645));
  -webkit-mask-size: 13px 13px;
  mask-size: 13px 13px;
}

body.mr-premium-floor .floor-model-card.is-selected::after {
  width: 22px;
  height: 22px;
  color: var(--m02-accent, var(--brand, #b58b47));
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

.project-type-option:has(input:checked)::after {
  width: 28px;
  height: 28px;
  color: var(--m02-accent, var(--brand, #76243b));
  -webkit-mask-size: 18px 18px !important;
  mask-size: 18px 18px !important;
}

/* A standalone check inherits the accent instead of the former white glyph
 * used on a solid badge; it remains visible on light selected surfaces. */
html[data-theme] body[data-m02-native] .mr-option-grid > button.is-selected::after,
html[data-theme] body[data-m02-native] .project-type-option:has(input:checked)::after {
  color: var(--m02-accent, #76243b) !important;
}

html[data-theme="dark"] body.mr-catalog-page .mr-option-grid > button.is-selected::after,
html[data-theme="dark"] body.mr-premium-floor .floor-model-card.is-selected::after,
html[data-theme="dark"] .project-type-option:has(input:checked)::after,
html[data-theme="dark"] body[data-m02-native] .mr-option-grid > button.is-selected::after,
html[data-theme="dark"] body[data-m02-native] .project-type-option:has(input:checked)::after {
  color: var(--m02-ink, #ffffff) !important;
}

.project-type-option.catalog-link .project-option-copy strong::after {
  -webkit-mask-image: var(--tricios-vector-arrow-external);
  mask-image: var(--tricios-vector-arrow-external);
  width: 14px;
  height: 14px;
  margin-left: 5px;
  vertical-align: -1px;
}

.estimate-details summary::after {
  -webkit-mask-image: var(--tricios-vector-plus);
  mask-image: var(--tricios-vector-plus);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  margin-left: 10px;
}

.estimate-details[open] summary::after {
  content: "" !important;
  -webkit-mask-image: var(--tricios-vector-minus);
  mask-image: var(--tricios-vector-minus);
}

.one-off-features li::before {
  width: 14px;
  height: 14px;
  top: 0.18em;
}

/* The original table-of-contents affordance exists only on small screens. */
@media (max-width: 680px) {
  .toc summary::after {
    content: "" !important;
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    align-self: center;
    background: currentColor;
    -webkit-mask-image: var(--tricios-vector-minus);
    mask-image: var(--tricios-vector-minus);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
  }

  .toc details:not([open]) summary::after {
    content: "" !important;
    -webkit-mask-image: var(--tricios-vector-plus);
    mask-image: var(--tricios-vector-plus);
  }
}
