/* Keep the label beside its image so galleries retain the correct reference. */
.photo-model {
  position:absolute;
  right:1.2rem;
  bottom:1.1rem;
  z-index:3;
  max-width:calc(100% - 2.4rem);
  padding:.25rem .45rem;
  min-height:24px;
  border:0;
  border-radius:2px;
  appearance:none;
  background:transparent;
  color:#ffffff80;
  text-shadow:0 1px 3px #0008;
  font-family:inherit;
  font-size:.6875rem;
  font-weight:400;
  line-height:1.5;
  text-align:left;
  letter-spacing:0;
  cursor:pointer;
  transition:background-color 400ms ease, color 400ms ease;
}
img[hidden] + .photo-model,
a:has(img[hidden]) + .photo-model,
.home-hero-photo:not(.is-active) + .photo-model,
.footer-scene:not(.is-current) + .photo-model { display:none; }
/* A caption remains below the photo; the model sits inside the image row. */
figure:has(> .photo-model) { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; }
figure:has(> .photo-model) > :is(img,a) { grid-area:1 / 1; }
figure > .photo-model {
  position:relative; inset:auto; grid-area:1 / 1;
  align-self:end; justify-self:end; margin:.7rem;
  max-width:calc(100% - 1.4rem);
}
figure:has(> .photo-model) > figcaption { grid-area:2 / 1; }
.model-specimen { min-width:0; margin:0; }
.model-specimen > .photo-model { grid-area:2 / 1; justify-self:center; margin:.65rem 0 0; max-width:100%; }
figure.model-specimen > figcaption { grid-area:3 / 1; }
.range-chapter-media .model-specimen > img { width:100%; }
.brand-feature-image > .photo-model { right:4.5rem; max-width:calc(100% - 5.7rem); }
.style-example-brand { left:auto; right:1.2rem; max-width:calc(100% - 2.4rem); padding:.3rem .6rem; font-size:.75rem; line-height:1.5; background:#121316e6; }
.story-feature-inner:has(> .photo-model) > img { grid-area:1 / 1; }
.story-feature-inner > .photo-model {
  position:relative; inset:auto; grid-area:1 / 1;
  align-self:end; justify-self:end; margin:1.1rem 1.2rem;
}
.story-feature-inner:has(> .photo-model) > .story-copy { grid-area:2 / 1; }
@media(min-width:721px) {
  .feature-split .story-feature-inner:has(> .photo-model) > .story-copy { grid-area:1 / 2; }
  .feature-overlay .story-feature-inner > .photo-model { position:absolute; right:0; bottom:0; }
  .feature-overlay .story-feature-inner:has(> .photo-model) > .story-copy { grid-area:1 / 1; }
}
.spartherm-sightlines figure:has(> .photo-model),
.spartherm-finishes figure:has(> .photo-model) { display:grid; }
.spartherm-sightlines figure:has(> .photo-model) { grid-template-rows:minmax(0,1fr) auto; }
.spartherm-sightlines figure:has(> .photo-model) > img { height:100%; }
.brand-photo-link:has(img[hidden]) { visibility:hidden; pointer-events:none; }
.home-brand-bento figure:has(> .photo-model) { display:grid; grid-template-rows:minmax(0,1fr) auto; }
.model-specimen > .photo-model { background:transparent; color:#5a5a60; text-shadow:none; }
.photo-model:focus-visible { background:#12131699; color:#ffffffe6; outline:2px solid var(--action); outline-offset:3px; }
@media(hover:hover) and (pointer:fine) {
  .photo-model:hover,
  :has(> .photo-model):hover > .photo-model { background:#12131699; color:#ffffffe6; transition-delay:120ms; }
}
.photo-copy-feedback {
  position:absolute; right:0; bottom:calc(100% + .4rem);
  padding:.2rem .45rem; border-radius:2px;
  background:#121316; color:#fff; font-size:.7rem; white-space:nowrap;
  pointer-events:none;
}
.photo-copy-feedback:empty { display:none; }
@media(prefers-reduced-motion:reduce) { .photo-model { transition:none; } }
/* Copy controls must sit above the footer banner's background layer. */
.footer-scenes { z-index:0; }
.footer-invitation > div:not(.footer-scenes):not(.footer-scene-controls),
.footer-invitation > .footer-conversation { position:relative; z-index:1; }
.footer-scene-controls { z-index:1; }

@media(max-width:800px) {
  .photo-model {
    right:0;
    bottom:0;
    max-width:100%;
    border-radius:.35rem 0 0 0;
    background:rgb(247 243 236 / 68%);
    color:#25221e;
    line-height:1.35;
    text-align:right;
    text-shadow:none;
    overflow-wrap:anywhere;
    transition:none;
  }

  figure:not(.model-specimen) > .photo-model,
  .story-feature-inner > .photo-model {
    inset:auto;
    margin:0;
    border-bottom-right-radius:.35rem;
  }

  .brand-feature-image > .photo-model { right:0; max-width:100%; }
  .brand-feature-image > .brand-photo-choice { bottom:2.5rem; }
}

@media(max-width:740px) {
  .resource-hero > .photo-model {
    grid-row:1;
    position:relative;
    align-self:end;
    justify-self:end;
  }
}

@media(max-width:800px) and (hover:hover) and (pointer:fine) {
  .photo-model:hover,
  :has(> .photo-model):hover > .photo-model {
    background:rgb(247 243 236 / 68%);
    color:#25221e;
  }
}
