.sharing-modal { max-width:720px; }
.sharing-modal .modal-body { padding:20px; overflow:auto; }
.sharing-modal form, .sharing-modal fieldset { display:grid; gap:12px; }
.sharing-modal fieldset { padding:14px; border:1px solid var(--border); border-radius:12px; margin:0 0 14px; }
.sharing-modal label { display:grid; gap:6px; margin-bottom:10px; }
.sharing-modal fieldset label { display:flex; gap:10px; align-items:center; margin:0; }
.sharing-modal input:not([type="checkbox"]):not([type="radio"]), .sharing-modal select { width:100%; min-width:0; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--cc-surface-1); color:var(--text); }
.sharing-access { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 0; border-bottom:1px solid var(--border); }
.sharing-access span { flex:1 1 180px; }
.shared-settings-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.shared-qr { width:220px; max-width:100%; height:auto; background:white; }
.shared-cloud #scanAllFilesButton, .shared-cloud #carajilloStableScan,
.shared-cloud [data-online-action="share"],
.shared-cloud #carajilloLocationTrashEntry { display:none !important; }
.shared-cloud[data-share-write="false"] [data-background-action="upload"],
.shared-cloud[data-share-write="false"] [data-background-action="new-file"],


.shared-cloud[data-share-write="false"] #uploadButton,

.shared-cloud[data-share-write="false"] #ccDesktopUploadFab,
.shared-cloud[data-share-write="false"] #ccMobileAddButton,
.shared-cloud[data-share-edit="false"] [data-online-action="edit"],
.shared-cloud[data-share-delete="false"] [data-online-action="delete"],
.shared-cloud[data-share-delete="false"] #deleteSelectedButton { display:none !important; }
.sharing-modal [hidden] { display:none !important; }
.shared-cloud #ccMobileSheetBody [data-cc-action="add-location"],
.shared-cloud #ccMobileSheetBody [data-cc-action="trash"],
.shared-cloud #carajilloStableLocation { display:none !important; }
.shared-cloud[data-share-edit="false"] #editorSave,
.shared-cloud[data-share-edit="false"] #editorSaveClose { display:none !important; }
.shared-cloud #carajilloTrashLocationButton { display:none !important; }
.shared-cloud[data-share-write="false"] #desktopUploadFab,
.shared-cloud[data-share-write="false"] #ccMobileFab,
.shared-cloud[data-share-write="false"] #carajilloStableUpload { display:none !important; }

/* En el acceso compartido no hay papelera fija que reserve espacio sobre los filtros. */

.shared-cloud #locationsList .location-sections { position:static;top:auto;margin-top:0; }
.shared-cloud #locationsList .location-items { min-height:0; }
.shared-cloud #locationsList .location-drag-handle { display:none; }

.sharing-photo-preset {padding:14px;border:1px solid var(--cc-border);border-radius:var(--cc-control-radius);background:var(--cc-surface-1);margin-bottom:16px;}
.sharing-photo-preset p {margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--cc-text-secondary);}
@media(max-width:760px){
 .sharing-modal {width:100%!important;max-width:100%!important;max-height:100dvh!important;min-width:0;}
 .sharing-modal .modal-body {padding:16px;min-width:0;}
 .sharing-modal fieldset {min-width:0;}
 .sharing-modal .sharing-access {align-items:stretch;}
 .sharing-modal .sharing-access span {flex-basis:100%;}
 .sharing-modal input {box-sizing:border-box;}
 .shared-cloud #locationsList .location-sections {margin:0 0 8px!important;top:auto!important;position:static!important;}
}

.shared-cloud[data-share-create="false"] :is([data-background-action="new-folder"],[data-create-kind="folder"],#newFolderButton,#carajilloStableNewFolder),
.shared-cloud[data-share-copy="false"] [data-online-action="copy"],
.shared-cloud[data-share-move="false"] [data-online-action="cut"],
.shared-cloud[data-share-rename="false"] [data-online-action="rename"],
.shared-cloud[data-share-compress="false"] [data-online-action="compress"],
.shared-cloud[data-share-extract="false"] [data-online-action="extract"],
.shared-cloud[data-share-download="false"] :is([data-online-action="download"],[data-media-action="download"],.info-actions a),
.shared-cloud[data-share-copy="false"][data-share-move="false"] :is([data-background-action="paste"],[data-online-action="paste"]) {display:none!important;}
.sharing-rights-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.sharing-modal .sharing-note {font-size:12px;line-height:1.5;color:var(--cc-text-secondary);margin:10px 0 0;}
.sharing-paths-scroll {overflow:auto;max-width:100%;}
.sharing-paths table {width:100%;border-collapse:collapse;font-size:13px;}
.sharing-paths :is(th,td) {text-align:left;padding:9px 6px;border-bottom:1px solid var(--cc-border);vertical-align:middle;}
.sharing-paths td code {white-space:normal;overflow-wrap:anywhere;font:inherit;color:var(--cc-text-secondary);}
.sharing-paths td:last-child {width:38px;}
.sharing-access-paths {display:block;margin-top:5px;color:var(--cc-text-secondary);overflow-wrap:anywhere;}
.sharing-access form {flex:0 0 100%;min-width:0;}
.sharing-picker-navigation {display:flex;align-items:center;gap:8px;min-width:0;}
#sharePickerPath {flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px;}
#shareFolderPicker {padding:12px;border:1px solid var(--cc-border);border-radius:var(--cc-control-radius);}
#shareFolderPicker[hidden] {display:none;}
#sharePickerFolders {display:grid;gap:6px;margin-top:10px;max-height:220px;overflow:auto;}
#sharePickerFolders button {display:flex;justify-content:flex-start;gap:8px;text-align:left;}
.sharing-shared-roots {display:grid;gap:8px;margin-bottom:14px;}
.sharing-dropbox {padding:24px;color:var(--cc-text-secondary);}
.sharing-dropbox h3 {font-size:18px;font-weight:650;color:var(--cc-text);}
@media(max-width:560px){.sharing-rights-grid {grid-template-columns:minmax(0,1fr);}.sharing-picker-navigation {flex-wrap:wrap;}#sharePickerPath {flex-basis:calc(100% - 50px);}}

.shared-cloud[data-share-read="false"] :is(#ccMobileSearch,#ccDesktopSearchToggle,#ccMobileView,#mediaViewControls,#ccMobileClipboardBar) {display:none!important;}

.sharing-path-mount {display:block;margin-top:3px;color:var(--cc-text-muted);font-size:11px;}

.shared-cloud :is([data-original-button-id="carajilloStableLocation"],[data-original-button-id="addMountButton"],[data-original-button-id="addLocationButton"]) {display:none!important;}
.shared-cloud[data-share-create-location="false"] :is([data-background-action="save-location"],[data-tool-extension-id="save-current-folder-as-location"]) {display:none!important;}
.shared-cloud[data-share-compress="false"] :is([data-original-button-id="carajilloStableCompress"],[data-original-button-id="compressSelectedButton"],[data-action="compress"],[data-cc-action="compress"],[data-media-action="compress"]) {display:none!important;}
.shared-cloud[data-share-delete="false"] :is([data-original-button-id="carajilloStableDelete"],[data-original-button-id="deleteSelectedButton"],[data-action="delete"],[data-cc-action="delete"],[data-media-action="delete"]) {display:none!important;}
.shared-cloud[data-share-download="false"] :is([data-action="download"],[data-cc-action="download"],[data-media-action="tab"],[data-media-action="spatial"],[data-online-action="spatial"],[data-quick-action="download"],#viewerDownload,#infoDownloadButton) {display:none!important;}
.shared-cloud[data-share-preview="false"] :is([data-online-action="open"],[data-media-action="open"],[data-cc-action="open"]) {display:none!important;}
.shared-cloud[data-share-rename="false"] :is([data-media-action="rename"],[data-action="rename"]) {display:none!important;}
.shared-cloud[data-share-move="false"] :is([data-media-action="cut"],[data-action="cut"]) {display:none!important;}
.shared-cloud[data-share-copy="false"] :is([data-media-action="copy"],[data-action="copy"]) {display:none!important;}
.shared-cloud [data-media-action="share"],.shared-cloud [data-quick-action="share"] {display:none!important;}

.shared-cloud[data-share-create-location="false"] :is(#carajilloQuickLocationButton,[data-original-button-id="carajilloQuickLocationButton"]) {display:none!important;}
.shared-cloud[data-share-read="false"] [data-cc-action="calculate-sizes"] {display:none!important;}
.shared-cloud[data-share-write="false"][data-share-create="true"] :is(#desktopUploadFab,#ccMobileFab) {display:inline-flex!important;}
