/* Photo sales extend the existing gallery. No offer means no visible sale surface. */
.aps-photo-offer-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.aps-event-cover > .aps-photo-offer-trigger { height: 100%; }
.aps-event-gallery__item .aps-photo-offer-trigger { overflow: hidden; background: #d9d7d0; }
.aps-event-gallery__item--landscape .aps-photo-offer-trigger { aspect-ratio: 3 / 2; }
.aps-event-gallery__item--portrait .aps-photo-offer-trigger { aspect-ratio: 3 / 4; }
.aps-event-gallery__item--square .aps-photo-offer-trigger { aspect-ratio: 1; }
.aps-event-gallery__item .aps-photo-offer-trigger:hover img,
.aps-event-gallery__item .aps-photo-offer-trigger:focus-visible img { transform: scale(1.015); }
.aps-project-page .aps-photo-offer-trigger {
    max-width: min(100%, var(--aps-photo-width, 100%), calc(var(--aps-photo-height) * var(--aps-photo-ratio, 1.5)));
    margin-inline: auto;
    aspect-ratio: auto;
    overflow: visible;
}
.aps-project-intro__copy .aps-photo-sales-note {
    max-width: 48ch;
    margin-top: 20px;
    color: var(--aps-muted, #92918b);
    font-family: var(--monument-sans, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.65;
}
.aps-lightbox.has-photo-offer[open] { grid-template-rows: 64px minmax(0, 1fr) auto; }
.aps-lightbox.has-photo-offer .aps-lightbox__stage { padding-bottom: 12px; }
.aps-photo-selection { display: inline-flex; min-height: 44px; align-items: center; color: inherit; font-size: 12px; font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
.aps-photo-selection:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.aps-photo-sale {
    width: 100%;
    padding: 0 54px max(18px, env(safe-area-inset-bottom));
    color: var(--aps-white, #f3f2ed);
    font-family: var(--monument-sans, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.55;
}
.aps-photo-sale { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: start; gap: 0 24px; }
.aps-photo-sale > details { max-width: 580px; margin: 0; }
.aps-photo-sale summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    width: fit-content;
    margin: 0 auto;
    padding: 0 6px;
    list-style: none;
    cursor: pointer;
}
.aps-photo-sale summary::-webkit-details-marker { display: none; }
.aps-photo-sale summary::after { content: '+'; color: var(--aps-muted, #92918b); font-size: 18px; }
.aps-photo-sale details[open] > summary::after { content: '−'; }
.aps-photo-sale__details { max-height: min(160px, 24dvh); padding: 12px 0 0; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.18); }
.aps-photo-sale__details p { max-width: 68ch; margin: 0 auto 12px; color: var(--aps-muted, #92918b); text-align: center; }
.aps-photo-sale__details .aps-photo-sale__file { color: var(--aps-white, #f3f2ed); }
.aps-photo-sale__actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 24px; }
.aps-photo-sale__actions a { display: inline-flex; min-height: 44px; align-items: center; color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.aps-photo-sale__actions .aps-photo-sale__add { padding: 10px 18px; border: 1px solid rgba(255,255,255,.4); text-decoration: none; }
.aps-photo-sale__add[aria-disabled="true"] { color: var(--aps-muted, #92918b); cursor: default; }
.aps-photo-sale > .aps-photo-sale__status { grid-column: 1 / -1; margin: 8px auto 0; font-size: 12px; color: var(--aps-muted, #92918b); text-align: center; }
.aps-photo-sale__status:empty { display: none; }
.aps-photo-sale a:focus-visible, .aps-photo-sale summary:focus-visible,
.aps-photo-selected a:focus-visible, .aps-photo-offer-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.aps-photo-selected { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 0 var(--aps-gutter, 24px) 64px; }
.aps-photo-selected[hidden] { display: none; }
.aps-photo-selected > img { width: 100%; max-height: 70vh; object-fit: contain; }
.aps-photo-selected h2 { margin: 0 0 16px; font-size: 24px; }
.aps-photo-selected p { font-size: 14px; line-height: 1.65; }
.aps-photo-selected .aps-photo-sale__actions { justify-content: flex-start; font-size: 13px; }
@media (max-width: 700px) {
    .aps-lightbox.has-photo-offer { height: 100dvh; }
    .aps-lightbox.has-photo-offer .aps-lightbox__stage { padding-bottom: 48px; }
    .aps-photo-sale { grid-template-columns: minmax(0, 1fr); gap: 0; padding-inline: 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .aps-photo-sale > details { width: 100%; }
    .aps-photo-sale__details p { font-size: 12px; }
    .aps-photo-sale__actions { flex-wrap: nowrap; gap: 16px; }
    .aps-photo-sale__actions a { font-size: 13px; line-height: 1.3; }
    .aps-photo-sale__actions .aps-photo-sale__add { min-width: 136px; justify-content: center; }
    .aps-photo-selected { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .aps-photo-offer-trigger img { transition: none; }
}
