/* The ONE picker of smileys (src/views/emoPicker.ts, public/js/emo.js; the same in INTECHI CRM and INTECHI SMART): the round logos of the
   firms of the group first, then the classic smileys. Closed until a click; the panel lies over the page under its button. */
html.sd .emo-pick {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
html.sd .emo-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--sd-radius-lg, 10px);
  box-shadow: var(--sd-panel-shadow, 0 6px 20px rgb(0 0 0 / 18%));
}
html.sd .emo-pop[hidden] {
  display: none;
}
/* the panel of a field near the right edge opens to the left (public/js/emo.js) */
html.sd .emo-pop.emo-left {
  left: auto;
  right: 0;
}
html.sd .emo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 36px);
  justify-content: center;
  justify-items: center;
  gap: 4px;
}
html.sd .emo-pop .emo-panel {
  width: min(320px, calc(100vw - 48px));
}
/* many smileys: the grid scrolls inside the panel, the buttons and the words stay under it */
html.sd .emo-pop .emo-grid {
  max-height: 228px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.sd .emo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
html.sd .emo:hover,
html.sd .emo:focus-visible {
  background: var(--sd-action-neutral-bg);
  border-color: var(--line);
}
html.sd .emo-firm img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}
/* {logo} = the firm the e-mail is sent from: a circle in the colour of the firm of the page (in the e-mail the logo of the firm of the e-mail) */
html.sd .emo-own span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand, #2f86ee);
  color: #fff;
  font-size: 11px;
}
/* the head of a group of the panel (the words of the template, the buttons of the e-mail, the smileys) */
html.sd .emo-head-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 700;
}
html.sd .emo-head-row:first-child {
  margin-top: 0;
}
html.sd .emo-head-row > i {
  color: var(--accent);
}
/* the buttons of the e-mail (a small preview, as in the e-mail: white, a frame and the words in the colour of the firm) and the words of the
   template, under the smileys */
html.sd .emo-btns,
html.sd .emo-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html.sd .emo-mailbtn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent, #2f86ee);
  border-radius: 8px;
  background: #fff;
  color: var(--accent, #2f86ee);
  font:
    700 13px/1 Arial,
    Helvetica,
    sans-serif;
  cursor: pointer;
}
html.sd .emo-word {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--sd-action-neutral-bg);
  color: inherit;
  font-size: 13px;
  cursor: pointer;
}
html.sd .emo-mailbtn:hover,
html.sd .emo-mailbtn:focus-visible,
html.sd .emo-word:hover,
html.sd .emo-word:focus-visible {
  outline: 2px solid var(--sd-action-focus, var(--accent));
  outline-offset: 1px;
}
/* a logo in a text of the page (a note, a chat, a preview): as high as the letters, like the bullets of the e-mails */
html.sd .emo-logo {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  border: 0;
}
/* the field and its button on one line (the button on the right of the field) */
html.sd .emo-field {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
html.sd .emo-field > input,
html.sd .emo-field > textarea {
  flex: 1 1 auto;
  min-width: 0;
}
@media (pointer: coarse), (max-width: 640px) {
  html.sd .emo {
    width: 44px;
    min-height: 44px;
  }
  html.sd .emo-grid {
    grid-template-columns: repeat(auto-fill, 44px);
  }
  html.sd .emo-mailbtn,
  html.sd .emo-word {
    min-height: 44px;
  }
}
