/* Message chrome only. Received HTML and message-body typography stay intact. */
body.task-mail:is(.action-show, .action-preview) #layout-content > .frame-content:has(> #message-header) {
  padding: 24px;
}

body.task-mail:is(.action-show, .action-preview) #message-header {
  margin: 0 0 24px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--veyra-line, #2b3340);
  color: var(--veyra-text, #f0f2f6);
}

body.task-mail:is(.action-show, .action-preview) #message-header > .subject {
  margin: 0 0 20px;
  padding: 0;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.45px;
  overflow-wrap: anywhere;
  color: var(--veyra-text, #f0f2f6);
}

body.task-mail:is(.action-show, .action-preview) #message-header > .subject a.extwin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 0 0 5px;
  border-radius: 7px;
  color: var(--veyra-muted, #a1abba);
  vertical-align: middle;
}

body.task-mail:is(.action-show, .action-preview) #message-header > .subject a.extwin::before {
  font-size: 14px;
  line-height: 1;
}

body.task-mail:is(.action-show, .action-preview) #message-header > .header {
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.task-mail:is(.action-show, .action-preview) #message-header > .header img.contactphoto {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid var(--veyra-line, #2b3340);
  border-radius: 12px;
  background: var(--veyra-raised, #202630) !important;
  object-fit: cover;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-content {
  min-width: 0;
  min-height: 40px;
  flex: 1 1 auto;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--veyra-muted, #a1abba);
  overflow-wrap: anywhere;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-summary > span {
  max-width: 100%;
  white-space: normal;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-summary a {
  color: var(--veyra-text, #f0f2f6);
  font-weight: 550;
  text-decoration: none;
  overflow-wrap: anywhere;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-headers {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.65;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-headers td {
  padding-top: 3px;
  padding-bottom: 3px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-headers .header-title {
  padding-right: 14px;
  color: var(--veyra-muted, #a1abba);
  font-weight: 450;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-headers a {
  color: var(--veyra-text, #f0f2f6);
  overflow-wrap: anywhere;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 5px;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin: 0;
  padding: 2px 0;
  color: var(--veyra-muted, #a1abba);
  font-size: 11px;
  line-height: 1.5;
  text-decoration: none;
}

body.task-mail:is(.action-show, .action-preview) #message-header .header-links a::before {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin: 0;
  font-size: 11px;
  line-height: 1;
}

body.task-mail:is(.action-show, .action-preview) #message-header a:hover {
  color: var(--veyra-red, #d83b43);
}

body.task-mail:is(.action-show, .action-preview) #message-header a:focus-visible {
  outline: 2px solid var(--veyra-red, #d83b43);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Cards surround attachment controls, never the actual received message HTML. */
body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist:not(:empty) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist > li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid var(--veyra-line, #2b3340);
  border-radius: 9px;
  background: var(--veyra-raised, #202630);
  color: var(--veyra-muted, #a1abba);
  line-height: 1.5;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist > li::before {
  flex: 0 0 auto;
  height: auto;
  font-size: 17px;
  line-height: 1.5;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist a {
  min-height: 30px;
  height: auto;
  color: var(--veyra-text, #f0f2f6);
  line-height: 30px;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist a.filename {
  min-width: 0;
  padding: 0;
  font-size: 12px;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist .attachment-name {
  min-width: 0;
  color: var(--veyra-text, #f0f2f6);
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist .attachment-size {
  flex: 0 0 auto;
  padding-left: 8px;
  color: var(--veyra-muted, #a1abba);
  font-size: 10px;
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist a.dropdown {
  flex: 0 0 28px;
  width: 28px;
  padding: 0;
  border-radius: 5px;
  text-align: center;
  color: var(--veyra-muted, #a1abba);
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist a:hover {
  color: var(--veyra-red, #d83b43);
}

body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist a:focus-visible {
  outline: 2px solid var(--veyra-red, #d83b43);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Framed documents inherit the parent Elastic mode, rather than its narrow pane width. */
html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #layout-content > .frame-content:has(> #message-header) {
  padding: 20px 16px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header {
  margin-bottom: 20px;
  padding-bottom: 18px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header > .subject {
  margin-bottom: 16px;
  font-size: 21px;
  line-height: 1.4;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header > .header {
  gap: 10px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header > .header img.contactphoto {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header .header-summary {
  font-size: 12px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-header .header-links {
  gap: 4px 12px;
}

html:is(.layout-phone, .layout-small) body.task-mail:is(.action-show, .action-preview) #message-content > .leftcol > .attachmentslist:not(:empty) {
  margin-bottom: 20px;
}
