.tx-photo-sharing{--tx-photo-danger:#a6352f;box-sizing:border-box;width:min(980px,94vw);max-height:92vh;margin:auto;padding:22px;overflow:auto;border:1px solid var(--tx-line,#ccc);border-radius:20px;background:var(--tx-paper,#fff);color:var(--tx-ink,#18251f);font:14px/1.5 var(--tx-font-ui,system-ui)}
:root[data-theme="dark"] .tx-photo-sharing{--tx-photo-danger:#ff9c97}
.tx-photo-sharing::backdrop{background:#000b}
.tx-photo-sharing [hidden]{display:none!important}
.tx-photo-sharing header,.tx-photo-sharing footer,.tx-photo-sharing footer>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tx-photo-sharing header{position:sticky;top:0;z-index:2;align-items:flex-start;margin-bottom:20px;background:var(--tx-paper,#fff)}
.tx-photo-sharing header::before{content:"";position:absolute;inset:-22px -22px 0;z-index:-1;background:var(--tx-paper,#fff)}
.tx-photo-sharing header small,.tx-photo-sharing-meta{color:var(--tx-muted,#68726c)}
.tx-photo-sharing h2{margin:2px 0 0;font-size:25px;line-height:1.2}
.tx-photo-sharing h3{margin:0 0 8px;font-size:14px}
.tx-photo-sharing button,.tx-photo-sharing select,.tx-photo-sharing input:not([type=checkbox]){box-sizing:border-box;min-height:42px;padding:9px 12px;border:1px solid var(--tx-line,#ccc);border-radius:12px;background:var(--tx-surface,#fff);color:var(--tx-ink,#18251f);font:inherit}
.tx-photo-sharing button{font-weight:650;cursor:pointer}
.tx-photo-sharing button:disabled,.tx-photo-sharing fieldset:disabled{opacity:.6}
.tx-photo-sharing button:disabled{cursor:default}
.tx-photo-sharing :focus-visible{outline:3px solid var(--tx-gold-500,#b18a4a);outline-offset:3px}
.tx-photo-sharing .tx-photo-sharing-close{flex:0 0 42px;padding:4px;font-size:25px;line-height:1}
.tx-photo-sharing-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:25px}
.tx-photo-sharing-layout>aside{min-width:0;align-self:start;position:sticky;top:72px}
.tx-photo-sharing-preview{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:var(--tx-raised,#eef0eb);color:var(--tx-muted,#68726c)}
.tx-photo-sharing-preview img{display:block;width:100%;height:100%;object-fit:contain}
.tx-photo-sharing-nav{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:12px 0}
.tx-photo-sharing-nav button{padding:8px;font-size:12px}
.tx-photo-sharing-nav span{white-space:nowrap;font-size:12px;color:var(--tx-muted,#68726c)}
.tx-photo-sharing-meta{margin:9px 0;font-size:12px}
.tx-photo-sharing-state{margin:0 0 12px;font-weight:700}
.tx-photo-sharing fieldset{min-width:0;margin:0 0 18px;padding:14px;border:1px solid var(--tx-line,#ccc);border-radius:14px}
.tx-photo-sharing legend{padding:0 5px;font-weight:700}
.tx-photo-sharing-toggle{display:flex;align-items:flex-start;gap:12px;margin:6px 0 16px;cursor:pointer}
.tx-photo-sharing-toggle:last-child{margin-bottom:4px}
.tx-photo-sharing-toggle input{flex:0 0 20px;width:20px;height:20px;margin:3px 0 0;accent-color:#315b49}
.tx-photo-sharing-toggle span,.tx-photo-sharing-toggle small{display:block}
.tx-photo-sharing-toggle small{margin-top:4px;line-height:1.45;color:var(--tx-muted,#68726c)}
.tx-photo-sharing-uses{margin-bottom:20px}
.tx-photo-sharing-uses ul{margin:0;padding-left:18px}
.tx-photo-sharing-links{padding:0;margin:0 0 12px;list-style:none}
.tx-photo-sharing-links li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--tx-line,#ccc)}
.tx-photo-sharing-links li.tx-photo-sharing-meta{border:0;padding:0}
.tx-photo-sharing-links small,.tx-photo-sharing-links strong{display:block;overflow-wrap:anywhere}
.tx-photo-sharing-links small{color:var(--tx-muted,#68726c);font-size:11px}
.tx-photo-sharing-links .tx-photo-sharing-review{margin-top:6px;color:var(--tx-ink,#18251f);font-weight:600}
.tx-photo-sharing-links button{flex-shrink:0;font-size:11px;min-height:36px;padding:6px 9px}
.tx-photo-sharing-add{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tx-photo-sharing-add label{min-width:0;display:grid;gap:5px;font-size:12px;font-weight:600}
.tx-photo-sharing-add label:has([data-photo-trail]),.tx-photo-sharing-add label:has([data-photo-place]),.tx-photo-sharing-add label:has([data-photo-place-name]),.tx-photo-sharing-add details,.tx-photo-sharing-add>button{grid-column:1/-1}
.tx-photo-sharing-add select,.tx-photo-sharing-add input{width:100%;min-width:0}
.tx-photo-sharing-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;grid-column:1/-1}
.tx-photo-sharing-search .tx-photo-sharing-choice,.tx-photo-sharing-add>[data-link-place-field],.tx-photo-sharing-add>[data-link-results]{grid-column:1/-1}
.tx-photo-sharing-choice select{max-width:100%;text-overflow:ellipsis}
.tx-photo-sharing-add>[data-link-results]{margin:0;overflow-wrap:anywhere}
.tx-photo-sharing-fields>p{font-size:12px;color:var(--tx-muted,#68726c)}
.tx-photo-sharing-add details summary{cursor:pointer;font-size:12px}
.tx-photo-sharing-add details p{color:var(--tx-muted,#68726c);font-size:12px}
.tx-photo-sharing-add details>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tx-photo-sharing-status{min-height:22px;margin:12px 0;font-weight:600}
.tx-photo-sharing-status.is-error{color:var(--tx-photo-danger)}
.tx-photo-sharing-cleanup{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--tx-gold-500,#b18a4a);border-radius:12px;margin:12px 0;font-size:12px}
.tx-photo-sharing footer{position:sticky;bottom:-22px;padding:15px 0 1px;border-top:1px solid var(--tx-line,#ccc);background:var(--tx-paper,#fff);margin-top:18px}
.tx-photo-sharing .tx-photo-sharing-save{background:#315b49;border-color:#315b49;color:#fff}
.tx-photo-sharing .tx-photo-sharing-withdraw{color:var(--tx-photo-danger);font-size:12px}
@media(max-width:680px){.tx-photo-sharing{padding:16px;width:95vw;max-height:94vh}.tx-photo-sharing h2{font-size:22px}.tx-photo-sharing header::before{inset:-16px -16px 0}.tx-photo-sharing-layout{grid-template-columns:1fr;gap:18px}.tx-photo-sharing-preview{max-height:32vh}.tx-photo-sharing footer{bottom:-16px;align-items:stretch;flex-direction:column;padding-bottom:1px}.tx-photo-sharing footer>div{justify-content:flex-end}.tx-photo-sharing footer>div button{flex:1}.tx-photo-sharing-cleanup{align-items:stretch;flex-direction:column}}
@media(max-width:680px){.tx-photo-sharing-layout>aside{position:static}}
