/* MOK toolbars + attachment tiles. Loaded after mok.css. */

html.mok-skin #layout-content > .header,
html.mok-skin #layout-list > .header,
html.mok-skin #messagelist-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px !important;
  background: var(--surface) !important;
}

html.mok-skin #layout-content > .header > .header-title,
html.mok-skin #layout-list > .header > .header-title,
html.mok-skin #messagelist-header > .header-title {
  flex: 1 1 auto;
  min-width: 0;
}

/* Elastic JS turns .header > .menu into #toolbar-menu / #toolbar-list-menu */
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-menu,
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-list-menu,
html.mok-skin:not(.layout-phone):not(.layout-small) .header > ul.menu.toolbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  position: static !important;
  inset: auto !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-menu > li,
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-list-menu > li,
html.mok-skin:not(.layout-phone):not(.layout-small) .header > ul.menu.toolbar > li {
  display: flex !important;
  align-items: center;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  line-height: 1 !important;
}

html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-menu > li:before,
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-list-menu > li:before,
html.mok-skin:not(.layout-phone):not(.layout-small) .header > ul.menu.toolbar > li:before {
  display: none !important;
  content: none !important;
}

html.mok-skin #mailtoolbar,
html.mok-skin #messagetoolbar,
html.mok-skin #addressbooktoolbar,
html.mok-skin .header > .toolbar,
html.mok-skin .header > .toolbar.menu {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow: auto hidden;
  float: none !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
}

html.mok-skin #mailtoolbar > .spacer,
html.mok-skin #messagetoolbar > .spacer,
html.mok-skin #addressbooktoolbar > .spacer,
html.mok-skin .header > .toolbar > .spacer {
  width: 8px !important;
  min-width: 8px;
  flex: 0 0 8px;
}

html.mok-skin #mailtoolbar a span.inner,
html.mok-skin #messagetoolbar a span.inner,
html.mok-skin #addressbooktoolbar a span.inner,
html.mok-skin .header > .toolbar a span.inner,
html.mok-skin #toolbar-menu a span.inner,
html.mok-skin #toolbar-list-menu a span.inner,
html.mok-skin #messagelist-header > a span.inner,
html.mok-skin #layout-list > .header > a.button span.inner,
html.mok-skin #layout-content > .header > a.button span.inner {
  display: none !important;
}

html.mok-skin a.mok-reply-template span.inner,
html.mok-skin .toolbar a.mok-reply-template span.inner,
html.mok-skin #toolbar-menu a.mok-reply-template span.inner,
html.mok-skin #messagetoolbar a.responses span.inner {
  display: inline !important;
}

html.mok-skin #mailtoolbar a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #messagetoolbar a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #addressbooktoolbar a:not(.dropdown):not(.mok-reply-template),
html.mok-skin .header > .toolbar a:not(.dropdown):not(.mok-reply-template),
html.mok-skin #toolbar-menu a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #toolbar-list-menu a:not(.dropdown),
html.mok-skin #messagelist-header > a.button:not(.task-menu-button):not(.back-sidebar-button):not(.toolbar-menu-button):not(.toolbar-list-button),
html.mok-skin #messagelist-header > a.refresh,
html.mok-skin #layout-list > .header > a.button.icon:not(.task-menu-button):not(.back-sidebar-button):not(.toolbar-menu-button),
html.mok-skin #layout-content > .header > a.button.icon:not(.back-list-button):not(.toolbar-menu-button) {
  box-sizing: border-box !important;
  display: inline-grid !important;
  place-items: center !important;
  float: none !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--surface) !important;
  color: var(--text-2) !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

html.mok-skin #mailtoolbar a:not(.dropdown):not(.mok-reply-template):hover,
html.mok-skin #messagetoolbar a:not(.dropdown):not(.mok-reply-template):hover,
html.mok-skin #addressbooktoolbar a:not(.dropdown):hover,
html.mok-skin .header > .toolbar a:not(.dropdown):not(.mok-reply-template):hover,
html.mok-skin #toolbar-menu a:not(.dropdown):not(.mok-reply-template):hover,
html.mok-skin #toolbar-list-menu a:not(.dropdown):hover,
html.mok-skin #messagelist-header > a.button:hover,
html.mok-skin #layout-list > .header > a.button.icon:hover,
html.mok-skin #layout-content > .header > a.button.icon:hover {
  background: var(--hover) !important;
  color: var(--accent) !important;
  border-color: #c7d2fe !important;
}

html.mok-skin #mailtoolbar a.disabled,
html.mok-skin #messagetoolbar a.disabled,
html.mok-skin #addressbooktoolbar a.disabled,
html.mok-skin .header > .toolbar a.disabled,
html.mok-skin #toolbar-menu a.disabled,
html.mok-skin #toolbar-list-menu a.disabled {
  opacity: .38;
}

html.mok-skin #mailtoolbar a:before,
html.mok-skin #messagetoolbar a:before,
html.mok-skin #addressbooktoolbar a:before,
html.mok-skin .header > .toolbar a:before,
html.mok-skin #toolbar-menu a:before,
html.mok-skin #toolbar-list-menu a:before,
html.mok-skin #messagelist-header > a.button:before,
html.mok-skin #layout-list > .header > a.button.icon:before,
html.mok-skin #layout-content > .header > a.button.icon:before {
  float: none !important;
  display: block !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

html.mok-skin #mailtoolbar .dropbutton,
html.mok-skin #messagetoolbar .dropbutton,
html.mok-skin #addressbooktoolbar .dropbutton,
html.mok-skin .header > .toolbar .dropbutton,
html.mok-skin #toolbar-menu .dropbutton,
html.mok-skin #toolbar-list-menu .dropbutton {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--surface) !important;
  overflow: hidden !important;
}

html.mok-skin #mailtoolbar .dropbutton > a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #messagetoolbar .dropbutton > a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #addressbooktoolbar .dropbutton > a:not(.dropdown):not(.mok-reply-template),
html.mok-skin .header > .toolbar .dropbutton > a:not(.dropdown):not(.mok-reply-template),
html.mok-skin #toolbar-menu span.dropbutton > a:not(.dropdown):not(.mok-reply-template):not(.responses),
html.mok-skin #toolbar-list-menu span.dropbutton > a:not(.dropdown):not(.mok-reply-template):not(.responses) {
  border: 0 !important;
  border-radius: 0 !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.mok-skin:not(.layout-phone):not(.layout-small) #mailtoolbar .dropbutton a.dropdown,
html.mok-skin:not(.layout-phone):not(.layout-small) #messagetoolbar .dropbutton a.dropdown,
html.mok-skin:not(.layout-phone):not(.layout-small) #addressbooktoolbar .dropbutton a.dropdown,
html.mok-skin:not(.layout-phone):not(.layout-small) .header > .toolbar .dropbutton a.dropdown,
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-menu .dropbutton a.dropdown,
html.mok-skin:not(.layout-phone):not(.layout-small) #toolbar-list-menu .dropbutton a.dropdown {
  display: none !important;
}

html.mok-skin #mailtoolbar a.compose.hidden,
html.mok-skin #messagetoolbar a.compose.hidden,
html.mok-skin #toolbar-menu a.compose.hidden,
html.mok-skin #toolbar-menu li:has(a.compose.hidden) {
  display: none !important;
}

html.mok-skin:not(.layout-phone):not(.layout-small) #messagelist-header > a.task-menu-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-list > .header > a.task-menu-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-list > .header > a.back-sidebar-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #messagelist-header > a.back-sidebar-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-list > .header > a.toolbar-menu-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content > .header > a.toolbar-menu-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-list > .header > a.toolbar-list-button,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content > .header > a.back-list-button {
  display: none !important;
}

html.mok-skin a.mok-reply-template,
html.mok-skin .toolbar a.mok-reply-template,
html.mok-skin #toolbar-menu a.mok-reply-template,
html.mok-skin #messagetoolbar a.responses {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 36px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

html.mok-skin a.mok-reply-template:before,
html.mok-skin #messagetoolbar a.responses:before {
  display: none !important;
  content: none !important;
}

html.mok-skin a.mok-reply-template:hover,
html.mok-skin #messagetoolbar a.responses:hover {
  background: var(--hover) !important;
  color: var(--accent) !important;
  border-color: #c7d2fe !important;
}

/* ---- Attachment tiles ---- */
html.mok-skin .attachmentslist,
html.mok-skin #attachment-list,
html.mok-skin #compose-attachments .attachmentslist {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

html.mok-skin .attachmentslist li,
html.mok-skin #attachment-list li,
html.mok-skin #compose-attachments li {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  width: 112px !important;
  min-height: 118px;
  height: auto !important;
  max-width: 112px;
  padding: 10px 8px 12px !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--canvas-2) !important;
  list-style: none;
  text-align: center;
  position: relative;
  line-height: 1.3 !important;
  color: var(--text-2);
}

html.mok-skin .attachmentslist li:hover,
html.mok-skin #attachment-list li:hover,
html.mok-skin #compose-attachments li:hover {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

html.mok-skin .attachmentslist li:before {
  display: none !important;
  content: none !important;
}

html.mok-skin .attachmentslist li a.filename,
html.mok-skin .attachmentslist li > a:not(.delete):not(.cancel):not(.drop) {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.mok-skin .attachmentslist .attachment-size,
html.mok-skin .attachmentslist .mok-file-size {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

html.mok-skin .attachmentslist li a.delete,
html.mok-skin .attachmentslist li a.cancel {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 14px;
  line-height: 1;
}

html.mok-skin .attachmentslist li a.delete span.inner,
html.mok-skin .attachmentslist li a.cancel span.inner {
  display: none !important;
}

html.mok-skin .mok-glyph {
  width: 56px;
  height: 64px;
  margin: 2px auto 8px;
  display: grid;
  place-items: center;
}

html.mok-skin .mok-sheet {
  width: 40px;
  height: 50px;
  background: var(--surface);
  border: 1.6px solid currentColor;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 0 6px;
  position: relative;
  box-shadow: 0 6px 12px -8px rgb(15 23 42 / 0.35);
}

html.mok-skin .mok-sheet .fold {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--canvas-2) 49%, currentColor 50%);
  border-bottom-left-radius: 2px;
}

html.mok-skin .mok-sheet .ln {
  width: 20px;
  height: 2px;
  background: currentColor;
  opacity: .32;
  margin-bottom: 3px;
  border-radius: 2px;
}

html.mok-skin .mok-sheet .grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  width: 20px;
  height: 14px;
  margin-bottom: 5px;
}

html.mok-skin .mok-sheet .grid i {
  background: currentColor;
  opacity: .4;
  border-radius: 1px;
}

html.mok-skin .mok-sheet .pic {
  width: 20px;
  height: 14px;
  margin-bottom: 5px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
  position: relative;
  opacity: .7;
}

html.mok-skin .mok-sheet .pic:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

html.mok-skin .mok-sheet .pic:after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  border-left: 6px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid currentColor;
}

html.mok-skin .mok-sheet b {
  font-size: 8.5px;
  letter-spacing: .04em;
  font-weight: 800;
}

html.mok-skin .attachmentslist li.pdf,
html.mok-skin .attachmentslist li.application-pdf,
html.mok-skin #attachment-list li.pdf,
html.mok-skin #attachment-list li.application-pdf,
html.mok-skin #compose-attachments li.pdf,
html.mok-skin #compose-attachments li.application-pdf { color: #b91c1c; }
html.mok-skin .attachmentslist li.doc,
html.mok-skin .attachmentslist li.docx,
html.mok-skin .attachmentslist li.rtf,
html.mok-skin .attachmentslist li.odt,
html.mok-skin .attachmentslist li.msword,
html.mok-skin #attachment-list li.doc,
html.mok-skin #attachment-list li.docx,
html.mok-skin #attachment-list li.msword,
html.mok-skin #compose-attachments li.doc,
html.mok-skin #compose-attachments li.docx,
html.mok-skin #compose-attachments li.msword { color: #3730a3; }
html.mok-skin .attachmentslist li.xls,
html.mok-skin .attachmentslist li.xlsx,
html.mok-skin .attachmentslist li.csv,
html.mok-skin .attachmentslist li.ods,
html.mok-skin .attachmentslist li.msexcel,
html.mok-skin #attachment-list li.xls,
html.mok-skin #attachment-list li.xlsx,
html.mok-skin #attachment-list li.csv,
html.mok-skin #compose-attachments li.xls,
html.mok-skin #compose-attachments li.xlsx,
html.mok-skin #compose-attachments li.csv { color: #15803d; }
html.mok-skin .attachmentslist li.ppt,
html.mok-skin .attachmentslist li.pptx,
html.mok-skin .attachmentslist li.odp,
html.mok-skin #attachment-list li.ppt,
html.mok-skin #attachment-list li.pptx,
html.mok-skin #compose-attachments li.ppt,
html.mok-skin #compose-attachments li.pptx { color: #c2410c; }
html.mok-skin .attachmentslist li.jpg,
html.mok-skin .attachmentslist li.jpeg,
html.mok-skin .attachmentslist li.png,
html.mok-skin .attachmentslist li.gif,
html.mok-skin .attachmentslist li.webp,
html.mok-skin .attachmentslist li.svg,
html.mok-skin .attachmentslist li.image,
html.mok-skin #attachment-list li.jpg,
html.mok-skin #attachment-list li.jpeg,
html.mok-skin #attachment-list li.png,
html.mok-skin #attachment-list li.image,
html.mok-skin #compose-attachments li.jpg,
html.mok-skin #compose-attachments li.jpeg,
html.mok-skin #compose-attachments li.png,
html.mok-skin #compose-attachments li.image { color: #1d4ed8; }
html.mok-skin .attachmentslist li.zip,
html.mok-skin .attachmentslist li.rar,
html.mok-skin .attachmentslist li.gz,
html.mok-skin .attachmentslist li.7z,
html.mok-skin #attachment-list li.zip,
html.mok-skin #compose-attachments li.zip { color: #a16207; }
html.mok-skin .attachmentslist li.txt,
html.mok-skin .attachmentslist li.eml,
html.mok-skin .attachmentslist li.html,
html.mok-skin #attachment-list li.txt,
html.mok-skin #attachment-list li.eml,
html.mok-skin #compose-attachments li.eml,
html.mok-skin #compose-attachments li.txt { color: #475569; }
html.mok-skin .attachmentslist li.mp3,
html.mok-skin .attachmentslist li.wav,
html.mok-skin .attachmentslist li.audio { color: #0f766e; }
html.mok-skin .attachmentslist li.mp4,
html.mok-skin .attachmentslist li.mov,
html.mok-skin .attachmentslist li.video { color: #6d28d9; }

html.mok-skin .attachmentslist:empty,
html.mok-skin .mok-attach-block:has(.attachmentslist:empty) {
  display: none !important;
}

html.mok-skin.layout-large #messagelist-header a.task-menu-button,
html.mok-skin.layout-normal #messagelist-header a.task-menu-button,
html.mok-skin.layout-large #layout-list > .header a.task-menu-button,
html.mok-skin.layout-normal #layout-list > .header a.task-menu-button,
html.mok-skin.layout-large #layout-list > .header a.back-sidebar-button,
html.mok-skin.layout-normal #layout-list > .header a.back-sidebar-button,
html.mok-skin.layout-large #messagelist-header a.back-sidebar-button,
html.mok-skin.layout-normal #messagelist-header a.back-sidebar-button,
html.mok-skin.layout-large a.toolbar-menu-button,
html.mok-skin.layout-normal a.toolbar-menu-button,
html.mok-skin.layout-large a.toolbar-list-button,
html.mok-skin.layout-normal a.toolbar-list-button,
html.mok-skin.layout-large #layout-content > .header a.back-list-button,
html.mok-skin.layout-normal #layout-content > .header a.back-list-button {
  display: none !important;
}

/* Elastic clones list-only controls into the letter toolbar for the mobile menu. */
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.hidden-big),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.hidden-large),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.select),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.selection),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.options),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.threads),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu > li:has(> a.dropbutton),
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.hidden-big,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.hidden-large,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.select,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.selection,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.options,
html.mok-skin:not(.layout-phone):not(.layout-small) #layout-content #toolbar-menu a.threads {
  display: none !important;
}
