/* MOISEI Файлы — custom File Browser branding. */
:root {
  --blue: #2c7a56;
  --dark-blue: #216548;
  --icon-blue: #2c7a56;
  --background: #f6f8f5;
  --surfacePrimary: #fff;
  --surfaceSecondary: #eef3ee;
  --textPrimary: #607368;
  --textSecondary: #22362b;
  --borderPrimary: #dce7dd;
  --borderSecondary: #c9d8cb;
  --divider: #e5ece5;
  --hover: #e8f2e9;
  --iconPrimary: #2c7a56;
}
:root.dark {
  --blue: #9bd4ae;
  --dark-blue: #76bf91;
  --icon-blue: #9bd4ae;
  --background: #171f1a;
  --surfacePrimary: #222d25;
  --surfaceSecondary: #2b3a30;
  --textPrimary: #a9beb0;
  --textSecondary: #eff5ee;
  --borderPrimary: #34473a;
  --borderSecondary: #45604d;
  --divider: #34473a;
  --hover: #334639;
  --iconPrimary: #9bd4ae;
  --iconTertiary: #a9beb0;
}

body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
header {
  height: 4.5em;
  padding-inline: 1.15em;
  border-bottom: 1px solid var(--borderPrimary);
  box-shadow: none;
}
header img { border-radius: 11px; }
header > div:first-child::after {
  content: "MOISEI Файлы";
  display: inline-block;
  margin-right: 1.25em;
  color: var(--textSecondary);
  font-size: .95em;
  font-weight: 800;
  letter-spacing: -.035em;
  white-space: nowrap;
}
header .action {
  border-radius: 9px;
  transition: background .15s ease;
}
header .action:hover { background: var(--hover); }
#search { max-width: 30em; }
#search #input {
  border: 1px solid var(--borderSecondary);
  border-radius: 10px;
  background: var(--background);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#search #input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(101,166,117,.16);
}

nav {
  top: 4.5em;
  height: calc(100vh - 4.5em);
  padding: 1em .65em;
  border-right: 1px solid var(--borderPrimary);
  background: var(--surfacePrimary);
}
nav > div { border-top-color: var(--divider); }
nav .action {
  width: 100%;
  margin: .12em 0;
  padding: .7em .75em;
  border-radius: 9px;
  font-size: 1em;
  transition: background .15s ease, color .15s ease;
}
nav .action:hover, nav .action.active { background: var(--hover); color: var(--blue); }
nav .files { padding: 0 .7em; }

main { padding-top: .7em; }
.breadcrumbs {
  top: 4.5em;
  height: 3.4em;
  margin-bottom: .8em;
  border-bottom-color: var(--borderPrimary);
  background: var(--background);
}
.breadcrumbs a { border-radius: 7px; }
.breadcrumbs a:hover { background: var(--hover); }

#listing.list .item.header {
  margin: 0 0 .6em;
  padding: .9em 1.05em;
  border: 0;
  border-bottom: 1px solid var(--borderPrimary);
  background: var(--background);
  color: var(--textPrimary);
  font-size: .87em;
  font-weight: 650;
}
#listing.list .item:not(.header) {
  min-height: 4.3em;
  margin: .38em 0;
  padding: .9em 1.05em;
  border: 1px solid var(--borderPrimary);
  border-radius: 11px;
  background: var(--surfacePrimary);
  color: var(--textSecondary);
  transition: border-color .15s ease, background .15s ease;
}
#listing.list .item:not(.header):hover {
  border-color: var(--borderSecondary);
  background: var(--hover);
}
#listing.list .item:not(.header) .name { font-weight: 600; }
#listing.list .item:not(.header) .modified,
#listing.list .item:not(.header) .size { color: var(--textPrimary); font-size: .9em; }
#listing.list .item div:first-of-type i { color: var(--iconPrimary); }
#listing.mosaic .item {
  margin: .35em;
  border: 1px solid var(--borderPrimary);
  border-radius: 12px;
  background: var(--surfacePrimary);
  overflow: hidden;
}
#listing.mosaic .item:hover { border-color: var(--borderSecondary); }

.button { border-radius: 8px; }
.button:hover { filter: brightness(1.08); }
input, select, textarea { border-radius: 8px; }
.context-menu { border-radius: 10px; overflow: hidden; }
.context-menu .action:hover { background: var(--hover); }

@media (max-width: 736px) {
  header > div:first-child::after { display: none; }
  nav {
    top: 0;
    height: 100vh;
    padding-top: 1em;
    border-right: 0;
  }
  main { padding-top: 0; }
  .breadcrumbs { top: 4.5em; }
  #listing.list .item:not(.header) { min-height: 3.8em; padding: .8em .65em; }
  #listing.list .item.header { padding-inline: .65em; }
}
