/* My uploads (assets/js/my-uploads.js): the button under Add photos, the sheet, and the full-size view's "Your upload"
 * menu. Theme colours throughout, so it matches each gallery's design. */

/* Upload page: Add photos and Leave a message side by side, My uploads underneath. */
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-buttons{display:flex;gap:10px;width:100%}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-buttons>.button{flex:1 1 0;min-width:0;width:auto;margin:0;padding-inline:10px;white-space:nowrap}
html body.guest-upload-page:not(.owner-upload-page) .guest-upload-buttons .guest-message-open{margin:0;min-height:52px}
.my-uploads-open{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;margin-top:12px;border-radius:999px;font-weight:700}
html body.guest-upload-page:not(.owner-upload-page) .my-uploads-open{color:var(--theme-primary);background:var(--theme-surface);border:1px solid var(--theme-border)}
.my-uploads-stack{display:inline-flex}
.my-uploads-stack:empty{display:none}
.my-uploads-stack img{width:24px;height:24px;margin-left:-8px;border:2px solid var(--theme-surface,#fff);border-radius:6px;object-fit:cover}
.my-uploads-stack img:first-child{margin-left:0}
.my-uploads-count{min-width:22px;padding:2px 8px;border-radius:999px;color:var(--theme-button-text,#fff);background:var(--theme-primary);font-size:.78rem;line-height:1.3}

/* The sheet: rises from the bottom on phones, a centred card on wider screens. */
.my-uploads-sheet{width:min(560px,100vw);max-width:100vw;max-height:min(88dvh,820px);margin:auto auto 0;padding:0;border:1px solid var(--theme-border,#ddd);border-bottom:0;border-radius:22px 22px 0 0;color:var(--theme-text,#1d2a24);background:var(--theme-surface,#fff);box-shadow:0 -12px 40px rgba(0,0,0,.25);overflow:auto;overscroll-behavior:contain}
.my-uploads-sheet::backdrop{background:rgba(6,12,10,.5);backdrop-filter:blur(2px)}
@media(min-width:701px){.my-uploads-sheet{margin:auto;border-bottom:1px solid var(--theme-border,#ddd);border-radius:22px}}
.my-uploads-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 18px 6px;background:var(--theme-surface,#fff)}
.my-uploads-head h2{margin:0;font-family:var(--theme-heading-font,inherit);font-size:1.45rem;color:var(--theme-text,#1d2a24)}
.my-uploads-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid var(--theme-border,#ddd);border-radius:50%;color:var(--theme-text,#1d2a24);background:var(--theme-surface,#fff);cursor:pointer}
.my-uploads-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.my-uploads-body{padding:0 18px max(20px,env(safe-area-inset-bottom))}
.my-uploads-sub{margin:0 0 12px;color:var(--theme-muted,#5f6b64);font-size:.92rem;line-height:1.45}
.my-uploads-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.my-uploads-tile{position:relative;display:block;aspect-ratio:1;padding:0;overflow:hidden;border:0;border-radius:10px;background:color-mix(in srgb,var(--theme-text,#1d2a24) 8%,var(--theme-surface,#fff));cursor:pointer}
.my-uploads-tile img{display:block;width:100%;height:100%;object-fit:cover}
.my-uploads-tile.is-selected{outline:3px solid var(--theme-primary);outline-offset:-3px}
.my-uploads-tile:focus-visible{outline:3px solid var(--theme-accent,var(--theme-primary));outline-offset:2px}
.my-uploads-tile.is-message{display:flex;flex-direction:column;justify-content:space-between;gap:6px;padding:9px;text-align:left;color:var(--theme-text,#1d2a24);border:1px solid var(--theme-border,#ddd)}
.my-uploads-message-text{display:-webkit-box;overflow:hidden;font-size:.78rem;line-height:1.3;-webkit-line-clamp:4;-webkit-box-orient:vertical}
.my-uploads-message-label{font-size:.72rem}
.my-uploads-badge,.my-uploads-video{position:absolute;left:5px;bottom:5px;max-width:calc(100% - 10px);padding:2px 7px;border-radius:999px;color:#fff;background:rgba(0,0,0,.62);font-size:.68rem;line-height:1.35;text-align:left}
.my-uploads-video{left:auto;right:5px;top:5px;bottom:auto}
.my-uploads-tile.is-message .my-uploads-badge{position:static;align-self:flex-start}
.my-uploads-edit{display:grid;gap:10px;margin-top:12px;padding:14px;border:1px solid var(--theme-border,#ddd);border-radius:16px}
.my-uploads-field{display:grid;gap:5px;color:var(--theme-muted,#5f6b64);font-size:.85rem}
.my-uploads-field input,.my-uploads-field select,.my-uploads-field textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--theme-border,#ccc);border-radius:12px;color:var(--theme-control-text,var(--theme-text,#1d2a24));background:var(--theme-control-background,var(--theme-surface,#fff));font:inherit;font-size:16px}
.my-uploads-field textarea{min-height:96px;resize:vertical}
.my-uploads-status{min-height:1.2em;margin:0;color:var(--theme-muted,#5f6b64);font-size:.85rem}
.my-uploads-status:empty{display:none}
.my-uploads-actions{display:flex;gap:8px}
.my-uploads-actions .my-uploads-save{flex:1;min-height:46px;margin:0;border-radius:999px}
.my-uploads-remove{flex:none;min-height:46px;padding:0 18px;border:1px solid color-mix(in srgb,#b3261e 40%,transparent);border-radius:999px;color:#b3261e;background:transparent;font:inherit;font-weight:700;cursor:pointer}
.my-uploads-empty{display:grid;justify-items:center;gap:10px;padding:26px 6px 10px;text-align:center}
.my-uploads-empty-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;color:var(--theme-primary);background:color-mix(in srgb,var(--theme-primary) 12%,var(--theme-surface,#fff))}
.my-uploads-empty-icon svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.my-uploads-empty h3{margin:0;font-family:var(--theme-heading-font,inherit);font-size:1.25rem;color:var(--theme-text,#1d2a24)}
.my-uploads-empty p{max-width:34em;margin:0;color:var(--theme-muted,#4b5550);line-height:1.5}
.my-uploads-empty .button{margin-top:6px;min-height:48px;padding-inline:26px;border-radius:999px}

/* Gallery: "Your upload" at the top of the full-size view's ⋯ menu. */
.image-viewer-own{display:grid;margin-bottom:4px;padding-bottom:4px;border-bottom:1px solid #ffffff25}
.image-viewer-own[hidden]{display:none}
.image-viewer-own.is-only{margin-bottom:0;padding-bottom:0;border-bottom:0}
.image-viewer-menu .image-report-button[hidden],.image-viewer-own button[hidden]{display:none}
.image-viewer-own-label{margin:4px 14px 2px;color:#ffffffa8;font:12px system-ui}
.image-viewer-menu .image-viewer-own .is-danger{color:#ffb4ab}
@media(prefers-reduced-motion:no-preference){.my-uploads-sheet[open]{animation:my-uploads-rise .22s ease-out}@keyframes my-uploads-rise{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}}
.my-uploads-confirm{width:min(400px,calc(100vw - 32px));margin:auto;padding:20px;border:1px solid var(--theme-border,#ddd);border-radius:20px;color:var(--theme-text,#1d2a24);background:var(--theme-surface,#fff);box-shadow:0 24px 60px rgba(0,0,0,.3)}
.my-uploads-confirm::backdrop{background:rgba(6,12,10,.5)}
.my-uploads-confirm p{margin:0 0 16px;line-height:1.5}
.my-uploads-confirm .my-uploads-actions .button{flex:1;min-height:46px;margin:0;border-radius:999px}
.my-uploads-confirm .my-uploads-confirm-danger{color:#fff;background:#b3261e;border-color:#b3261e}
