/*
 * NDS Cloud simple-mode UI tweaks.
 * These rules only hide confusing File Browser controls in the web UI.
 * Server-side permissions still decide what users can actually do.
 */

/* Hide "New file"; keeping "New folder" preserves Windows Explorer-like use. */
button[aria-label="New file"],
button[title="New file"],
button[aria-label="Create new file"],
button[title="Create new file"],
button[aria-label="새 파일"],
button[title="새 파일"],
button[aria-label="새로운 파일"],
button[title="새로운 파일"] {
  display: none !important;
}

/* Hide share entry points; team members do not need public share links. */
button[aria-label="Share"],
button[title="Share"],
a[aria-label="Share"],
a[title="Share"],
button[aria-label="공유"],
button[title="공유"],
a[aria-label="공유"],
a[title="공유"] {
  display: none !important;
}

/* Hide web-editor entry points; design files should be edited locally. */
button[aria-label="Edit"],
button[title="Edit"],
a[aria-label="Edit"],
a[title="Edit"],
button[aria-label="편집"],
button[title="편집"],
a[aria-label="편집"],
a[title="편집"],
button[aria-label="파일 편집"],
button[title="파일 편집"],
a[aria-label="파일 편집"],
a[title="파일 편집"] {
  display: none !important;
}

/* If the sidebar exposes a "My files" label, make it read like a shared cloud. */
a[aria-label="My files"] span,
a[title="My files"] span,
a[aria-label="내 파일"] span,
a[title="내 파일"] span {
  font-size: 0 !important;
}

a[aria-label="My files"] span::after,
a[title="My files"] span::after,
a[aria-label="내 파일"] span::after,
a[title="내 파일"] span::after {
  content: "NDS Cloud";
  font-size: 1rem;
}

/* Replace the empty-folder message. */
h2.message:not(.delayed) i.material-icons {
  display: none !important;
}

h2.message:not(.delayed) span {
  font-size: 0 !important;
}

h2.message:not(.delayed) span::after {
  content: "아직 파일이 없어요";
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 500;
}

/* Simplify the admin permission form. */
main div:has(> p:nth-of-type(2) > input[type="checkbox"]):has(> p:nth-of-type(5) > input[type="checkbox"]) > p:nth-of-type(2),
main div:has(> p:nth-of-type(2) > input[type="checkbox"]):has(> p:nth-of-type(5) > input[type="checkbox"]) > p:nth-of-type(6),
main div:has(> p:nth-of-type(2) > input[type="checkbox"]):has(> p:nth-of-type(5) > input[type="checkbox"]) > p:last-of-type {
  display: none !important;
}

/* Stronger empty-folder message replacement. */
.message:has(i.material-icons:first-child) i.material-icons:first-child {
  display: none !important;
}

.message:has(i.material-icons:first-child) span {
  font-size: 0 !important;
}

.message:has(i.material-icons:first-child) span::after {
  content: "아직 파일이 없어요";
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 500;
}
