/* Shared gallery: the full photo, with thumbnails over a bottom gradient. */
.horse-presentation-media{position:relative;min-width:0;overflow:hidden;border-radius:20px;background:#fff}
.horse-media-stage{position:relative;overflow:hidden;min-width:0;border-radius:20px}
.horse-media-panel[hidden]{display:none!important}
.horse-media-video{position:relative;aspect-ratio:3/2;background:#1F291E;display:flex;align-items:center;justify-content:center;min-height:220px}
.horse-media-video>video{display:block;width:100%;height:100%;object-fit:contain}
.horse-record-portrait>.horse-presentation-media{position:absolute;inset:0;border-radius:inherit;display:grid;grid-template-rows:minmax(0,1fr) auto}
.horse-record-portrait .horse-media-stage{min-height:0;border-radius:0}
.horse-record-portrait .horse-media-panel{position:absolute;inset:0}
.horse-record-portrait .horse-media-video{aspect-ratio:auto;min-height:0}
.b-detail .horse-presentation-media{margin-bottom:18px}.b-detail .horse-presentation-media .b-photo{margin-bottom:0}
.horse-media-thumbnails{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;background:#fff;border-top:1px solid #EEF0E9;overflow-x:auto}
.horse-media-thumbnail{flex:0 0 88px;display:flex;flex-direction:column;gap:6px;padding:0!important;min-height:0!important;border:0!important;border-radius:0;background:transparent!important;color:#757B6F;font:400 12px/1.4 Manrope,Arial,sans-serif;cursor:pointer;text-align:center;box-shadow:none!important}
.horse-media-thumbnail-preview{position:relative;display:flex;width:88px;height:58px;align-items:center;justify-content:center;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#E7EBDF;box-sizing:border-box;transition:border-color 140ms ease}
.horse-media-thumbnail-preview>img,.horse-media-thumbnail-preview>video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.horse-media-thumbnail-preview>.ph-light{font-size:23px;color:#8B967B}
.horse-media-thumbnail[aria-pressed=true]{color:#485634}.horse-media-thumbnail[aria-pressed=true] .horse-media-thumbnail-preview{border-color:#485634}
.horse-media-thumbnail:hover .horse-media-thumbnail-preview{border-color:#A5B18F}.horse-media-thumbnail:focus-visible{outline:2px solid #87986B;outline-offset:4px;border-radius:10px}
.horse-media-thumbnail.is-empty .horse-media-thumbnail-preview{background:#F4F5F0;border:1px dashed #C9D1BE}.horse-media-thumbnail.is-empty[aria-pressed=true] .horse-media-thumbnail-preview{border:2px solid #485634}
.horse-media-thumbnail-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;background:#17200E38;pointer-events:none}.horse-media-thumbnail-play>.ph-light{display:grid;place-items:center;width:28px;height:28px;border:1px solid #FFFFFFA6;border-radius:50%;background:#6C7356C9;backdrop-filter:blur(8px);font-size:15px}
.horse-media-stage .horse-photo-replace,.horse-video-tools{position:absolute;right:16px;bottom:16px;z-index:3}
.horse-video-tools{display:none;gap:8px;left:auto}
.horse-media-stage:has([data-horse-media-video]:not([hidden])) .horse-photo-replace{display:none}
.horse-media-stage:has([data-horse-media-video]:not([hidden])) .horse-video-tools{display:flex}
.horse-media-icon{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #FFFFFFC9;border-radius:50%;background:#FFFFFFD9;backdrop-filter:blur(12px);color:#354126;cursor:pointer;box-shadow:0 2px 10px #18200F14}
.horse-media-icon .ph-light{font-size:22px}.horse-media-icon:hover{background:#fff}.horse-media-icon:focus-visible{outline:2px solid #485634;outline-offset:3px}.horse-media-icon:disabled{opacity:.6;cursor:progress}
.horse-media-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#768267;min-height:100%;width:100%;padding:64px 24px;box-sizing:border-box;background:#fff;font:400 14px/1.5 Manrope,Arial,sans-serif;text-align:center}
.horse-media-empty>.ph-light{font-size:44px;font-weight:300}
.horse-media-error{position:absolute;left:18px;right:18px;top:40%;padding:14px;color:#fff;background:#29331EEE;border-radius:12px;font:400 14px/1.5 Manrope,Arial,sans-serif}
@media(max-width:760px){.horse-record-portrait:has(.horse-presentation-media){aspect-ratio:auto;min-height:0}.horse-record-portrait>.horse-presentation-media{position:relative;inset:auto;display:block}.horse-record-portrait .horse-media-stage{aspect-ratio:3/2}.horse-media-thumbnails{padding:12px;gap:10px}.horse-media-stage .horse-photo-replace,.horse-video-tools{right:12px;bottom:12px}}
@media(prefers-reduced-motion:reduce){.horse-media-thumbnail-preview{transition:none}}

#horse-dialog .b-detail .horse-presentation-media .b-photo{margin:0}

/* The gallery overlays the visual; it no longer reserves a white strip. */
.horse-record-portrait>.horse-presentation-media{display:block}
.horse-record-portrait .horse-media-stage{height:100%}
.horse-record-portrait .horse-record-image img{object-fit:contain;object-position:center}
.horse-media-thumbnails{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:38px 16px 14px;border:0;background:linear-gradient(180deg,rgba(22,29,18,0),rgba(22,29,18,.28) 38%,rgba(22,29,18,.72));pointer-events:none}
.horse-media-thumbnail{pointer-events:auto;color:#FFFFFFD9}
.horse-media-thumbnail[aria-pressed=true]{color:#fff}
.horse-media-thumbnail-preview{border-color:#FFFFFF55;background:#FFFFFF22}
.horse-media-thumbnail[aria-pressed=true] .horse-media-thumbnail-preview{border-color:#fff;box-shadow:0 0 0 1px #FFFFFF44}
.horse-media-thumbnail:hover .horse-media-thumbnail-preview{border-color:#FFFFFFC7}
.horse-media-thumbnail:focus-visible{outline-color:#fff}
.horse-media-thumbnail-label{text-shadow:0 1px 4px #16201270}
.horse-media-thumbnail.is-empty .horse-media-thumbnail-preview{background:#FFFFFF1F;border-color:#FFFFFF88;backdrop-filter:blur(8px)}
.horse-media-thumbnail.is-empty[aria-pressed=true] .horse-media-thumbnail-preview{border-color:#fff}
.horse-media-thumbnail-preview>.ph-light{color:#fff}
.horse-media-stage .horse-photo-replace,.horse-video-tools{top:16px;bottom:auto}
.horse-presentation-media:has([data-horse-media-video]:not([hidden])>video[controls]) .horse-media-thumbnails{bottom:48px}
#horse-dialog .b-detail .horse-presentation-media .b-photo:has(img){height:auto;display:block;aspect-ratio:auto}
#horse-dialog .b-detail .horse-presentation-media .b-photo img{position:static;display:block;width:100%;height:auto;object-fit:contain;object-position:center;transform:none}
#horse-dialog .horse-presentation-media .b-photo>.b-pill{top:16px;bottom:auto}
@media(max-width:760px){.horse-record-portrait .horse-media-stage{height:auto;aspect-ratio:3/2}.horse-media-thumbnails{padding:32px 12px 12px}.horse-media-stage .horse-photo-replace,.horse-video-tools{top:12px;bottom:auto}}

/* Follow the image's actual proportions instead of letterboxing in a fixed-height frame. */
.horse-record-portrait:has(.horse-presentation-media){aspect-ratio:3/2;min-height:0;align-self:start}

/* Empty media areas use the same white surface as the record cards. */
.horse-presentation-media :is(.horse-record-image.without-photo,.catalogue-photo-placeholder),#horse-dialog .horse-presentation-media .b-photo:not(:has(img)){background:#fff}

/* Photo and video actions share the same placement and circular treatment. */
.horse-photo-tools{position:absolute;right:16px;top:16px;z-index:3;display:flex;gap:8px}
.horse-media-stage .horse-photo-tools>.horse-photo-replace{position:static;flex:0 0 44px}
.horse-media-stage:has([data-horse-media-video]:not([hidden])) .horse-photo-tools{display:none}
.horse-photo-remove,[data-horse-video-remove]{color:#9B644A}
@media(max-width:760px){.horse-photo-tools{right:12px;top:12px}}
