/* Shared-file gallery and upload settings. */
.share-folder-dialog{width:min(1050px,calc(100vw - 32px));max-width:1050px}
.share-folder-info{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:.8rem;margin-bottom:20px}
.share-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:16px;margin-top:16px}
.share-file-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:var(--surface);display:flex;flex-direction:column}
.share-thumb{position:relative;width:100%;height:148px;display:grid;place-items:center;background:#202226;color:#b5b7bd;overflow:hidden;border-radius:0;flex-shrink:0}
button.share-thumb:hover{background:#292724;color:var(--orange)}
.share-thumb-image{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}
.share-thumb-image[hidden]{display:none}
.share-file-symbol{font-size:36px;color:#bd9b80;line-height:1}
.share-file-symbol svg{width:34px;height:34px}
.share-format{position:absolute;right:10px;bottom:10px;font-size:10px;letter-spacing:.6px;background:#111c;color:#f4ded0;padding:5px 8px;border:1px solid #ffffff20;border-radius:5px;max-width:calc(100% - 20px);overflow:hidden}
.share-file-meta{padding:16px;display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}
.share-file-meta h3{font-size:.86rem;font-weight:600;line-height:1.5;margin:0;min-width:0}
.share-file-meta p{margin:0}
.share-file-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:7px}
.share-file-actions .btn{font-size:11px;padding:9px 10px;min-height:38px}
.share-preview-panel{border:1px solid #66452f;border-radius:13px;background:#141517;padding:18px;margin-bottom:22px;outline-offset:3px;scroll-margin-top:20px}
.share-preview-panel[hidden]{display:none}
.share-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.share-preview-head>div{min-width:0}
.share-preview-head strong{font-size:.9rem;line-height:1.5;display:block}
.share-preview-head small{display:block;margin-top:5px}
.share-preview-head .icon-btn{flex-shrink:0}
.share-preview-content{min-width:0}
.share-large-image{display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:auto;background:#101112}
.share-preview-content video{width:100%;max-height:60vh;display:block;background:#090a0b;border-radius:8px}
.share-preview-content audio{width:100%;display:block;margin:30px 0}
.share-pdf{width:100%;height:65vh;min-height:300px;background:#eee;border:0;border-radius:7px;display:block}
.share-text-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:55vh;overflow:auto;background:#101112;padding:17px;border-radius:8px;color:#e0dedb;line-height:1.7;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:4}
.share-preview-help{margin:16px 0 0;line-height:1.7}
.share-preview-help a{color:var(--orange);text-decoration:underline}
.share-uploader{padding:22px;border:1px dashed #57504a;border-radius:13px;background:#191a1c;margin-top:26px}
.share-uploader-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.share-uploader-head h3{font-size:1rem;margin:0}
.share-uploader input[type=file]{padding:14px;background:#202123;border-radius:8px}
.share-uploader p{line-height:1.7;margin:12px 0}
.share-upload-progress{overflow-wrap:anywhere;font-size:13px;font-weight:550}
.share-uploader .progress{width:100%;height:7px;margin:0;accent-color:var(--orange)}
.share-uploader .actions{margin-top:16px;flex-wrap:wrap}
.share-selected-files ul{padding:0;margin:12px 0 20px;list-style:none;max-height:180px;overflow:auto}
.share-selected-files li{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}
.share-selected-files li>span{min-width:0}
.share-selected-files li>small{flex-shrink:0;max-width:40%;text-align:right}
.file-settings-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:24px}
.file-settings-summary>div{background:#202123;border:1px solid var(--line);border-radius:12px;padding:18px;min-width:0}
.file-settings-summary strong{display:block;font-size:28px;font-weight:600;letter-spacing:-.8px;margin:12px 0 7px;overflow-wrap:anywhere}
.file-settings-summary small{font-size:11px;line-height:1.6;display:block}
.file-settings-summary .eyebrow{font-size:9px;line-height:1.7}
.file-limit-presets{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 18px}
.file-limit-presets .btn{font-size:11px;min-height:35px;padding:7px 11px}
#file-settings-content p{line-height:1.7;margin:12px 0}
.file-server-limits{font-size:12px;margin:16px 0}
.file-server-limits>div{display:flex;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line)}
.file-server-limits dt{color:var(--muted);min-width:0;overflow-wrap:anywhere}
.file-server-limits dd{margin:0;text-align:right;flex-shrink:0}
@media(max-width:600px){
 .share-folder-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}
 .share-gallery{gap:12px;grid-template-columns:minmax(0,1fr)}
 .share-thumb{height:165px}.share-preview-panel{padding:13px}.share-uploader{padding:16px}
 .share-file-actions .btn{flex:1}.share-uploader .actions .btn{width:100%;white-space:normal}
 .file-settings-summary{gap:10px}.file-settings-summary>div{padding:14px}.file-settings-summary strong{font-size:24px}
 .share-pdf{height:55vh}.share-folder-info{font-size:11px}
}
