trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none; }

trix-toolbar * {
  box-sizing: border-box; }

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto; }

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px; }
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 1.5vw; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0; } }

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button-group-spacer {
      display: none; } }

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent; }
  trix-toolbar .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-toolbar .trix-button.trix-active {
    background: #cbeefa;
    color: black; }
  trix-toolbar .trix-button:not(:disabled) {
    cursor: pointer; }
  trix-toolbar .trix-button:disabled {
    color: rgba(0, 0, 0, 0.125); }
  @media (max-width: 768px) {
    trix-toolbar .trix-button {
      letter-spacing: -0.01em;
      padding: 0 0.3em; } }

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button--icon {
      height: 2em;
      max-width: calc(0.8em + 3.5vw); } }
  trix-toolbar .trix-button--icon::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button--icon::before {
        right: 6%;
        left: 6%; } }
  trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1; }
  trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.125; }

trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%; }

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-dialogs {
  position: relative; }

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5; }

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }
  trix-toolbar .trix-input--dialog.validate:invalid {
    box-shadow: #F00 0px 0px 1.5px 1px; }

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none; }

trix-toolbar .trix-dialog--link {
  max-width: 600px; }

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline; }
  trix-toolbar .trix-dialog__link-fields .trix-input {
    flex: 1; }
  trix-toolbar .trix-dialog__link-fields .trix-button-group {
    flex: 0 0 content;
    margin: 0; }

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; }

trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
  background: none; }

trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {
  background: none; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
  background: highlight; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
  background: highlight; }

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent; }

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight; }

trix-editor .attachment {
  position: relative; }
  trix-editor .attachment:hover {
    cursor: default; }

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text; }

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in; }
  trix-editor .attachment__progress[value="100"] {
    opacity: 0; }

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center; }

trix-editor .trix-button-group {
  display: inline-flex; }

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent; }
  trix-editor .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-editor .trix-button.trix-active {
    background: #cbeefa; }
  trix-editor .trix-button:not(:disabled) {
    cursor: pointer; }

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
  trix-editor .trix-button--remove::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.7;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%; }
  trix-editor .trix-button--remove:hover {
    border-color: #333; }
    trix-editor .trix-button--remove:hover::before {
      opacity: 1; }

trix-editor .attachment__metadata-container {
  position: relative; }

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px; }
  trix-editor .attachment__metadata .attachment__name {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  trix-editor .attachment__metadata .attachment__size {
    margin-left: 0.2em;
    white-space: nowrap; }

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word; }
  .trix-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }
  .trix-content h1 {
    font-size: 1.2em;
    line-height: 1.2; }
  .trix-content blockquote {
    border: 0 solid #ccc;
    border-left-width: 0.3em;
    margin-left: 0.3em;
    padding-left: 0.6em; }
  .trix-content [dir=rtl] blockquote,
  .trix-content blockquote[dir=rtl] {
    border-width: 0;
    border-right-width: 0.3em;
    margin-right: 0.3em;
    padding-right: 0.6em; }
  .trix-content li {
    margin-left: 1em; }
  .trix-content [dir=rtl] li {
    margin-right: 1em; }
  .trix-content pre {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.5em;
    white-space: pre;
    background-color: #eee;
    overflow-x: auto; }
  .trix-content img {
    max-width: 100%;
    height: auto; }
  .trix-content .attachment {
    display: inline-block;
    position: relative;
    max-width: 100%; }
    .trix-content .attachment a {
      color: inherit;
      text-decoration: none; }
      .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
        color: inherit; }
  .trix-content .attachment__caption {
    text-align: center; }
    .trix-content .attachment__caption .attachment__name + .attachment__size::before {
      content: ' \2022 '; }
  .trix-content .attachment--preview {
    width: 100%;
    text-align: center; }
    .trix-content .attachment--preview .attachment__caption {
      color: #666;
      font-size: 0.9em;
      line-height: 1.2; }
  .trix-content .attachment--file {
    color: #333;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid #bbb;
    border-radius: 5px; }
  .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    position: relative; }
    .trix-content .attachment-gallery .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%; }
    .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
      flex-basis: 50%;
      max-width: 50%; }
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content {
  .attachment-gallery {
    & > action-text-attachment,
    & > .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%;
    }
    &.attachment-gallery--2,
    &.attachment-gallery--4 {
      & > action-text-attachment,
      & > .attachment {
        flex-basis: 50%;
        max-width: 50%;
      }
    }
  }
  action-text-attachment {
    .attachment {
      padding: 0 !important;
      max-width: 100% !important;
    }
  }
}
body.administrations {
  grid-table {
    form {
      @apply contents;
    }
    grid-template-columns: min-content repeat(3, minmax(0, 1fr));
    &.has-favorites {
      grid-template-columns: min-content min-content repeat(3, minmax(0, 1fr));
    }
  }

  .contents main {
    @apply flex flex-col flex-1;

    .main-info {
    }
    .additional-info {
      @apply w-full flex flex-row;

      .address {
        @apply flex-1;
      }
      .entity-information {
        @apply flex-1;
      }
    }
  }
}
.alert-wrapper {
  @apply fixed inset-x-0 top-0 flex items-end justify-end px-4 py-6 sm:p-6 z-30 pointer-events-none;
  .alert {
    @apply max-w-sm w-full shadow-lg px-4 py-3 rounded-sm relative text-white pointer-events-auto border-l-4 border-gray-300;
    &.info {
      @apply bg-gray-400 border-[#1F2937CC];
    }
    &.danger {
      @apply bg-red-400 border-[#991B1BCC];
    }
    main {
      @apply flex items-start;
      .message {
        @apply w-0 flex-1 pt-0.5;
        p {
          @apply text-sm leading-5 font-medium;
        }
      }
    }
    .close {
      @apply ml-4 flex-shrink-0 flex;
      button {
        @apply inline-flex text-white focus:outline-none focus:text-gray-300 transition ease-in-out duration-150;
      }
    }
  }
}
:root {
  --animation-duration: 1s;
  --animation-delay: 1s;
  --animation-repeat: 1;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes rotate-border {
  0% {
    background-position:
      left top,
      right bottom,
      left bottom,
      right top;
  }

  100% {
    background-position:
      left 15px top,
      right 15px bottom,
      left bottom 15px,
      right top 15px;
  }
}
@keyframes bounce-up {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes bounce-down {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes flash {
  0% {
  }
  50% {
    background: #fff085;
  }
  to {
  }
}

.flash {
  animation: flash 0.75s 2;
}

@keyframes highlight {
  0% {
    background-color: #0075ff2b;
    outline-color: #0075ff;
    transform: scale(1);
  }

  14% {
    transform: scale(1.3);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.3);
  }

  70% {
    transform: scale(1);
  }
  99.99% {
    background-color: #0075ff2b;
    outline-color: #0075ff;
  }
}

.highlight {
  animation-duration: calc(var(--animation-duration) * 2);
  animation-fill-mode: both;
  animation-name: highlight;
  animation-timing-function: ease-in-out;
}
body.auth {
  .login-container,
  .password-container {
    @apply flex flex-1 min-h-full items-center justify-center py-12 px-4 sm:px-6 lg:px-8;
  }
  .login-panel,
  .password-panel {
    @apply w-full max-w-md space-y-8;
    & > div {
      & > h2 {
        @apply mt-6 text-center text-3xl font-bold tracking-tight text-gray-900;
      }
      & > p {
        @apply mt-2 text-center text-sm text-gray-600;
      }
      & > p a {
        @apply font-medium text-indigo-600 hover:text-indigo-500;
      }
    }
    form {
      @apply mt-8 space-y-6;

      div.fields {
        @apply -space-y-px rounded-md shadow-sm;
      }
      input.input {
        @apply relative block w-full appearance-none rounded-none border border-gray-300 px-3 py-2 text-gray-900 placeholder-gray-500 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm;
      }
      .btn-submit {
        @apply w-full;
      }
    }
  }
  .login-panel form {
    input.email {
      @apply rounded-t-md;
    }
    input.password {
      @apply rounded-b-md;
    }
    input.remember {
      @apply h-4 w-4 rounded-sm border-gray-300 text-indigo-600 focus:ring-indigo-500;
    }
    .remember-label {
      @apply ml-2 block text-sm text-gray-900;
    }
    .new-password-link {
      @apply text-sm font-medium text-indigo-600 hover:text-indigo-500;
    }
    .btn-submit .btn-icon {
      @apply absolute inset-y-0 left-0 flex items-center pl-3;
    }
  }
  .password-panel form {
    .actions {
    }
    input.email {
      @apply rounded-md;
    }
  }
}
body.batches {
  #batches-table table {
    @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;
    thead tr th {
      @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
      letter-spacing: 0.02em;
    }
    tbody tr td {
      @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 text-md font-normal;
      letter-spacing: 0.01em;
    }
    tbody tr {
      &:hover,
      &:has(td input:checked) {
        @apply bg-gray-100;
      }
    }
  }
  .upload-form {
    .toolbar {
      &:not(.hidden) {
        @apply flex rounded-t-md bg-[#1F2937D9] px-4 text-white items-center gap-4 divide-x divide-[#FFFFFF33];
      }
      .actions {
      }
      .submit {
        @apply flex py-1 flex-1 justify-end;
      }
    }
    .dropzone {
      @apply flex flex-col w-full min-h-64 bg-white text-sm font-medium text-gray-700 rounded-md border border-hw-gray;
      &.no-files {
        @apply border-2 border-dashed items-center justify-center;
      }
      .dz-message {
        &:not(.hidden) {
          @apply w-56 flex flex-col items-center text-center;
        }
        .dz-button {
          @apply mt-5;
        }
      }
      &:not(.no-files) .table-header {
        display: flex;
      }
      .table-header {
        @apply font-semibold;
        display: none;
      }
      .table-header,
      .dz-preview {
        @apply border-b border-hw-gray text-md text-gray-900;
        & > div:nth-child(1) {
          @apply w-16 px-5 py-4;
        }
        & > div:nth-child(2) {
          @apply flex-1 px-8 py-4;
        }
        & > div:nth-child(3) {
          @apply w-52 px-8 py-4;
        }
        & > div:nth-child(4) {
          @apply w-40 px-8 py-4;
        }
      }
      .dz-preview {
        @apply flex;
        .progress {
          @apply flex;
          .dz-progress {
            @apply flex-1 h-1.5 mt-1.5 bg-gray-200 rounded-full;
          }
          .dz-upload {
            @apply block h-1.5 bg-indigo-600 rounded-full;
          }
        }
        &.dz-error .progress .dz-upload {
          @apply bg-[#DD2222];
        }
        &.dz-success .progress .dz-upload {
          @apply bg-[#0BCA13];
        }
        .dz-filename ul {
          @apply text-md list-inside;
          li {
            @apply flex pt-2.5 ml-5 items-center;
            svg {
              @apply text-[#90CDFF] mr-1.5;
            }
          }
        }
        span[data-dz-name] {
          @apply flex;
          svg {
            @apply mr-1.5;
          }
          &.folder svg {
            @apply text-[#008CFF];
          }
          &.file svg {
            @apply text-[#90CDFF];
          }
        }
      }
    }
  }
  .batch-container {
    @apply flex-1;
    & > main {
      @apply pl-6 flex-1;
      & > div.batch {
        @apply w-full flex;
        height: calc(100vh - 228px);
      }
      & > div.batch .document-container > div {
        height: calc(100vh - 284px);
      }
      & > nav.breadcrumb {
        @apply mb-4;
      }
    }
  }
  .thumbnails {
    @apply max-w-[330px] flex flex-col text-black bg-[#D2D7E1];
    .list {
      @apply overflow-y-scroll px-3.5 py-5;
    }
    & > header {
      @apply bg-[#1F2937CC] px-5 flex rounded-tl-md flex-row text-white;
      min-height: 50px;
      div {
        @apply flex items-center gap-3;
        &.page-tools {
          @apply gap-3.5 flex-1;
        }
      }
      .disabled {
        @apply text-white/50 cursor-default;
      }
    }
    .merge {
      @apply h-4 flex items-center flex-col text-[#4F46E5] cursor-pointer;
      transition: height 0.4s;
      hr {
        @apply w-full border-dashed border border-[#4F46E5];
      }
      svg {
        &.down {
          @apply mb-2;
        }
        &.up {
          @apply mt-2;
        }
      }
      &:hover {
        @apply h-[50px];
        svg {
          @apply inline;
          &.down {
            animation: bounce-down 1.5s ease-in-out infinite;
          }
          &.up {
            animation: bounce-up 1.5s ease-in-out infinite;
          }
        }
        hr {
          @apply block;
        }
      }
    }
    .group {
      @apply bg-[#7888A1] flex flex-col rounded-md border-[#7888A1] text-white text-xs font-semibold;
      & > header {
        @apply flex py-1.5 px-2.5;
        .title {
          @apply flex-1 overflow-hidden whitespace-nowrap;
          span {
            @apply text-ellipsis overflow-hidden block;
          }
          input {
            @apply rounded-sm bg-transparent text-xs p-0 font-normal w-full;
          }
          input,
          &.edit span {
            display: none;
          }
          &.edit input {
            display: block;
          }
        }
        .tools {
          @apply flex gap-0.5;
        }
      }
      .thumbs {
        @apply flex bg-[#9BA7B6] rounded-md m-1 flex-col;
        .thumb {
          @apply py-1.5 px-2.5;
          /* &:first-child { @apply pt-1.5; } */
          /* &:last-child { @apply pb-1.5; } */
          .image {
            @apply h-20 w-16 rounded-sm flex items-center justify-center;
            img {
              @apply max-w-full max-h-full;
            }
          }
          &.dragging {
            @apply bg-[#847EE7];
          }
          &.selected {
            @apply bg-[#847EE7];
          }
        }
      }
      &.selected {
        @apply bg-[#4F46E5] border-[#4F46E5];
      }
    }
    .split {
      @apply my-0 min-h-3 flex items-center relative cursor-pointer;
      transition: min-height 0.4s;
      margin-top: -6px;
      margin-bottom: -6px;
      hr {
        @apply w-full border-dashed border border-[#D2D7E1];
      }
      svg {
        @apply absolute;
        transform: translateX(32px);
      }
      &:hover {
        @apply min-h-5;
        hr {
          @apply block;
        }
        svg {
          @apply block;
        }
      }
    }
  }
  .document-container > header {
    @apply rounded-tl-none;
    .actions {
      @apply p-0 flex flex-1 justify-end;
      .btn-submit:hover svg {
        animation: spin 2.5s linear infinite;
      }
    }
  }
}

@keyframes cut {
  0% {
    transform: translateX(32px);
  }
  100% {
    transform: translateX(260px);
  }
}
@keyframes scissor-top {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-15deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes scissor-bottom {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
  0% {
    transform: rotate(0deg);
  }
}

.cut {
  .top {
    animation: 1s ease-in-out infinite scissor-top;
    transform-origin: bottom left;
  }
  .bottom {
    animation: 1s ease-in-out infinite scissor-bottom;
    transform-origin: top left;
  }
}
.breadcrumbs {
  @apply flex-1 items-center grid grid-flow-col auto-cols-max gap-2.5
    text-gray-700 text-sm font-medium bg-white p-1.5 px-[25px]
    shadow-sm border-b border-hw-gray;

  span {
    @apply capitalize;
  }
  .arrow {
    @apply text-gray-400;
  }
}
body.invoices,
body.contacts {
  .comments-list {
    @apply p-5 flex flex-col gap-2;
  }
  .comment {
    @apply bg-gray-50 p-4 rounded-md flex flex-col gap-3;
    box-shadow: 0px 1px 2px 0px #0000001a;
    .header {
      @apply flex gap-2;
      .avatar {
        @apply w-8 h-8 rounded-full;
        /* rounded-full border-indigo-500 border-2 w-7 h-7 */
      }
      .info {
        @apply flex flex-col gap-0.5 flex-1;
        .author {
          @apply font-semibold text-md;
        }
        time {
          @apply font-medium text-xxs text-[#AAB0B9];
        }
      }
      .actions {
        @apply flex gap-2 text-[#AAB0B9];
      }
    }
    .comment-body {
      @apply text-md font-normal;
      .mention {
        @apply font-semibold text-indigo-600;
      }
    }
  }

  .comment-input-wrapper {
    @apply bg-gray-200 px-2 py-2.5;
    .comment-input {
      @apply rounded-3xl w-full border-2 flex bg-white px-3 py-2 font-medium text-md text-gray-400;
      trix-mentions {
        @apply contents;
      }
      &:has(trix-editor:focus) {
        @apply border-2 border-indigo-500;
      }
      trix-toolbar {
        @apply hidden;
      }
      trix-editor {
        @apply flex-1 outline-none border-0 overflow-x-hidden max-h-32 overflow-y-auto whitespace-pre-wrap min-h-4 p-0;
        scrollbar-width: thin;
        &:not(.condensed) {
          @apply min-h-32;
        }
        figure.attachment {
          @apply inline-block whitespace-normal;
          .mention {
            @apply font-semibold text-indigo-600;
          }
        }
      }
      .mentions-popover {
        @apply absolute text-sm bg-white shadow-lg rounded-sm border border-gray-300 overflow-hidden;
        ul {
          li {
            @apply flex flex-1 gap-1.5 px-4 py-2 text-sm text-gray-700 items-center cursor-pointer;
            &[aria-selected="true"],
            &:hover,
            &:focus {
              @apply bg-gray-100;
            }
          }
        }
      }
      .actions {
        @apply flex gap-0.5 ml-2.5;
        &.condensed {
          .condense {
            display: none;
          }
        }
        &:not(.condensed) {
          .expand {
            display: none;
          }
        }
      }
    }
  }
}
body.contacts {
  turbo-frame#pagination {
    height: 0;
    display: block;
  }

  #contacts-table {
    tfoot,
    tfoot * {
      max-height: 1px;
      opacity: 0;
      padding: 0;
      border: none;
      /* visibility: hidden; might break lazy loading... */
    }

    table {
      @apply border-x border-gray-200 font-normal rounded-sm mt-3;

      input[type="checkbox"]:not(:checked) {
        @apply bg-transparent;
      }
      .avatar {
        @apply flex items-center justify-center bg-[#787878] text-white w-10 h-10;

        &.company {
          @apply rounded-full;
        }
        &.employee {
          @apply rounded-lg;
        }
      }
      thead tr th {
        @apply bg-[#1F2937CC] p-2 text-white text-left;

        &:first-child {
          @apply rounded-tl text-center;
        }
        &:last-child {
          @apply rounded-tr text-right;
        }
      }
    }
    .contact-list-section-header tr {
      &.contact-row {
        @apply cursor-pointer;
        &:hover td {
          @apply bg-gray-100;
        }
      }
      &:first-child th {
        @apply bg-[#F7F7F9] text-gray-700 capitalize text-left font-medium text-sm p-2;

        &:first-child,
        &:last-child {
          @apply text-center;
        }
      }
      td {
        @apply bg-white py-5 px-2 border-y text-left text-gray-700 text-md border-gray-200;

        &:first-child,
        &:last-child {
          @apply text-center;
        }

        p.name {
          @apply font-semibold text-sm;
          .icon {
            @apply w-4 h-4;
            &:first-child {
              @apply ml-0;
            }
          }

          svg {
            @apply ml-1.5;
          }
        }
        p.phone svg,
        p.email svg {
          @apply mr-1;
        }
      }
    }
  }
  #sidebar {
    @apply bg-white p-5 mt-3 w-[565px] border border-gray-200 rounded-sm;

    & section {
      @apply flex gap-2 items-center mb-3.5;

      &.header {
        contact {
          @apply inline-block;

          p {
            @apply flex gap-2;

            span {
              @apply flex gap-1 items-center;
            }
          }
        }
        &.company contact {
          .name {
            @apply font-semibold text-sm text-gray-700;
            .icon {
              @apply w-4 h-4;
            }
          }
          .info {
            @apply font-normal text-md text-gray-500;
          }
        }
        &.employee {
          @apply items-start bg-black text-white rounded-lg p-5 flex gap-3.5;

          contact {
            @apply flex flex-col flex-1;
          }
          .name {
            @apply text-lg font-semibold;
          }
          .title {
            @apply text-sm font-normal;
          }
          .identification {
            @apply flex items-center gap-2 text-gray-400 text-md font-normal;
          }
        }
      }
      &.contact-info {
        @apply grid grid-cols-2 gap-1.5;

        & > div {
          @apply flex items-center gap-1.5 p-2.5 bg-[#F7F7F9] font-normal text-sm text-gray-700;
        }
      }
      &.company-info {
        @apply flex;

        dl {
          @apply flex flex-1 flex-col rounded-sm border border-gray-200;
        }
        dt {
          @apply text-xs font-semibold text-gray-900;
        }
        dd {
          @apply text-sm font-medium;
        }
        .row {
          @apply flex border-gray-200;

          &:not(:last-child) {
            @apply border-b;
          }
          .field {
            @apply p-3 border-gray-200;

            &:nth-child(2) {
              @apply border-l;
            }
          }
        }
        address {
          @apply not-italic text-sm font-medium;
        }
      }
    }
    .avatar {
      @apply text-white;

      &.company {
        @apply flex items-center justify-center bg-[#787878] rounded-lg w-[34px] h-[34px];
      }
      &.employee {
        @apply flex items-center justify-center bg-white text-black rounded-full w-[70px] h-[70px];
      }
    }
  }
}
body.cost-centres {
  .new-cost-centre {
    @apply mb-2;
  }
  .cost-centre-main {
    @apply flex gap-6;

    #cost-centres-table {
      @apply flex-1;

      table {
        @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;

        thead tr th {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
          letter-spacing: 0.02em;
        }
        tbody tr td {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 text-md font-normal;
          letter-spacing: 0.01em;
        }
      }
    }
  }
  .cost-centre-sidebar {
    @apply min-w-[440px];

    .sidebar {
      @apply overflow-y-scroll rounded-sm border border-gray-200;
    }
    .panel {
      @apply py-3;

      .row {
        .field {
          @apply border-gray-200 border-t border-r p-3 flex text-sm;

          &:first-child {
            @apply border-l;
          }
        }
        &:first-child .field {
          &:first-child {
            @apply rounded-tl;
          }
          &:last-child {
            @apply rounded-tr;
          }
        }
        &:last-child .field {
          @apply border-b;

          &:first-child {
            @apply rounded-bl;
          }
          &:last-child {
            @apply rounded-br;
          }
        }
      }
    }
    section {
      &.totals {
        @apply px-3 pb-4 bg-white;

        .panel {
          .totals .field:first-child {
            @apply flex flex-row justify-end;
          }
          .row {
            @apply grid;
            grid-template-columns: 1fr 2fr;

            .field .value {
              @apply flex flex-1 justify-end;
            }
            &.total .field {
              @apply font-bold;
            }
          }
        }
      }
      &.filter {
        @apply px-3 pb-4 bg-white flex;
        form {
          @apply flex flex-1;
          .input-group {
            @apply flex flex-1;
            input {
              @apply flex-1;
            }
          }
        }
      }
      &.line-items {
        @apply bg-[#DFEDF0];
        & > header {
          @apply px-3 py-1.5 bg-[#9AC0C8] font-semibold text-sm flex;
          span {
            @apply flex-1 flex items-center;
            svg {
              @apply mr-1.5;
            }
          }
          .actions {
            @apply flex items-center gap-1;
            a {
              @apply flex items-center;
            }
            svg {
              @apply cursor-pointer;
              &.close {
                @apply -rotate-90;
              }
            }
          }
        }
        & > main {
          @apply flex flex-col divide-y divide-dashed divide-[#00000033];

          .panel {
            @apply px-3;
          }
        }
      }
    }
    .line-item .row {
      @apply flex;

      .field {
        @apply bg-white flex flex-col;
      }
      .label {
        @apply font-semibold text-xs;
      }
      .value {
        @apply font-medium text-sm;
      }
    }
  }
}
.flash-notification-wrapper {
  @apply fixed inset-x-0 top-0 flex flex-col gap-1 items-end px-4 py-6 sm:p-6 justify-end z-30 pointer-events-none;
  .flash-notification {
    @apply max-w-sm w-full shadow-lg px-4 py-3 rounded relative  border-l-4 pointer-events-auto
    bg-gray-200 border-gray-800 text-black;

    &.info {
      @apply bg-gray-400 border-[#1F2937CC];
    }
    &.danger {
      @apply bg-red-400 border-[#991B1BCC] text-white;
      .close button {
        @apply text-white;
      }
    }

    .message-wrapper {
      @apply ml-3 w-0 flex-1 pt-0.5;
      .message {
        @apply text-sm leading-5 font-medium;
      }
    }

    .close {
      @apply ml-4 flex-shrink-0 flex;
      button {
        @apply inline-flex text-black focus:outline-none focus:text-gray-300 transition ease-in-out duration-150;
      }
    }
  }
}
.btn-submit {
  @apply relative justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm
    inline-block
    bg-indigo-600 text-white
    hover:bg-indigo-700
    focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2;

  &:disabled {
    @apply bg-indigo-300;
  }
  kbd {
    @apply bg-indigo-500 px-1 py-0.5 rounded-sm tracking-[.25em];
  }
}

.btn-generic {
  @apply relative justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm ring-1 ring-inset ring-gray-300
    inline-block
    bg-white text-gray-900
    hover:bg-gray-50
    focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2;

  &:disabled {
    @apply opacity-50 cursor-not-allowed;
  }
}

.btn-group {
  @apply grid grid-flow-col auto-cols-max bg-white border border-gray-200 rounded-sm shadow-sm divide-x divide-gray-200;

  & > * {
    @apply p-1.5;
  }
  svg {
    @apply text-gray-400;
  }
}

.btn-condensed {
  @apply px-3 py-1;
}
.btn-iconized {
  @apply flex gap-1.5;
}
.btn-dropdown {
  @apply bg-white border rounded-sm w-full px-[8.25px] py-2.5 shadow-sm flex gap-1 items-center cursor-pointer border-gray-200;

  &.round {
    @apply rounded-full;
  }
  &.semi-condensed {
    @apply px-3 py-1;
  }
  &.condensed {
    @apply p-0.5;
  }
  .icon {
    @apply text-gray-400 mr-1.5 w-4 h-4;
  }
}

[type="checkbox"]:checked,
[type="radio"]:checked {
  background-color: currentColor;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-color: transparent;
}
[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E");
}

input[type="checkbox"] {
  @apply appearance-none
    border-1 border-gray-300
    text-indigo-600 shadow-sm
    focus:ring focus:ring-offset-0 focus:ring-indigo-200/50
    w-[1rem] h-[1rem];
}
input[multiple],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
select,
textarea {
  @apply rounded-sm border border-gray-300 py-1 px-2;
}
input[type="checkbox"],
input[type="radio"],
select {
  @apply rounded-sm;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  @apply bg-indigo-600;
}

input[multiple]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="email"]:focus,
input[type="month"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="week"]:focus,
select:focus,
textarea:focus {
  @apply ring-indigo-600 ring-1;
}

input[type="checkbox"]:checked:focus,
input[type="checkbox"]:checked:hover,
input[type="checkbox"]:indeterminate,
input[type="radio"]:checked:focus,
input[type="radio"]:checked:hover {
  @apply bg-indigo-500 ring-indigo-600 ring-1;
}
input[type="checkbox"]:disabled {
  @apply opacity-50 cursor-not-allowed;
}
select.no-arrow {
  background-image: none;
}
*[data-controller*="check-availability"] {
  &.available {
    input {
      @apply border-2 border-green-700 ring-green-700;
    }
    .availability-result {
      display: none;
    }
  }
  &.unavailable {
    input {
      @apply border-2 border-red-700 ring-red-700;
    }
    .availability-result {
      @apply text-red-700;
    }
  }
}
.input-group {
  @apply flex;
}
.input-group input {
  @apply border border-r-0 border-gray-300 rounded-l rounded-r-none;
}
.input-group input + .append {
  @apply border border-l-0 border-gray-300 rounded-r;
}
.input-group .prepend,
.input-group .append {
  @apply px-2 bg-gray-100;
}
.input-group .prepend + input {
  @apply border border-gray-300 rounded-l-none rounded-r;
}
.input-group input:focus,
.input-group .prepend:focus,
.input-group .append:focus {
  @apply ring-0 outline-none border-gray-300;
}
.input-group:has(input:focus),
.input-group:has(.prepend:focus),
.input-group:has(.append:focus) {
  @apply rounded ring-indigo-600 ring-1;
}
body > header {
  @apply shadow-sm border-b border-hw-gray;

  .top-nav {
    @apply mx-auto flex items-center justify-between px-[25px];

    .aux-nav {
      @apply items-center gap-3 lg:flex lg:flex-1 lg:justify-end;

      .notifications {
        @apply text-gray-500;
      }
    }
  }
  &:has(+ .breadcrumbs) {
    @apply !shadow-none;
    border-color: #e5e7eb;
  }
  .company {
    @apply flex items-center content-center ml-8 border-b-2 border-[#4F46E5] py-4 h-[66px];
    border-bottom-width: 3px;

    .inner {
      @apply flex gap-2;

      span {
        @apply flex items-center text-sm font-semibold;
      }
    }
  }
}

.pill {
  @apply rounded-full gap-1 p-1 px-2.5 items-center leading-none;
  &:not(.hidden) {
    @apply inline-flex;
  }
  &.md {
    @apply px-2;
  }
  &.default {
    @apply border border-gray-200 text-gray-600;
  }
  &.info {
    @apply bg-blue-700 text-white;
  }
  &.warning {
    @apply bg-[#FF5C00] text-white;
  }
  &.danger {
    @apply bg-red-700 text-white;
  }
}

.multi-toggle {
  @apply flex rounded-md bg-gray-200 p-1;

  &.round {
    @apply rounded-full;

    label {
      @apply rounded-full;
    }
  }
  input[type="radio"] {
    display: none;
  }
  label {
    @apply flex flex-1 items-center rounded-sm px-3.5 py-1 text-gray-400 text-md font-semibold select-none;

    .icon {
      @apply mr-2.5;
    }
    &:has(> input[type="radio"]:checked) {
      @apply text-black bg-white drop-shadow;
    }
    &:not(:has(> input[type="radio"]:disabled)) {
      @apply cursor-pointer;

      &:not(:has(> input[type="radio"]:checked)):hover {
        @apply bg-gray-100;
      }
    }
  }
}

.avatar {
  @apply select-none;
}

.avatar-group {
  @apply flex items-center justify-center;

  .wrapper {
    @apply flex flex-row-reverse;

    .avatar {
      @apply flex items-center justify-center bg-gray-500 text-white rounded-full w-[32px] h-[32px] border text-sm;

      img {
        @apply rounded-full;
      }
      &:not(:first-child) {
        @apply mr-[-8px];
      }
    }
  }
}

.dropdown {
  @apply inline-block relative;
  svg,
  img {
    @apply cursor-pointer;
  }
  .menu {
    @apply absolute top-4 right-0 z-10 mt-6 w-screen max-w-max bg-white;
    &.tight {
      @apply mt-2;
    }

    .inner-menu {
      @apply text-sm bg-white shadow-lg rounded-sm border border-gray-300 overflow-hidden;

      .menu-item {
        @apply flex;
        a,
        span {
          @apply flex flex-1 gap-1.5 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 focus:bg-gray-100 items-center;
        }
        &.disabled {
          @apply cursor-not-allowed;
          a,
          span {
            @apply text-gray-400;
          }
        }
      }
    }
  }
}

table {
  tbody tr {
    &:hover,
    &:has(td:first-child input:checked) {
      @apply bg-gray-100;
    }
    &:focus {
      @apply outline-offset-2 outline-1 outline-indigo-600 rounded-sm;
    }
  }
}

.alert {
  @apply p-3 border rounded-sm ml-auto mr-auto w-96 block mt-2;
}
.alert-error {
  @apply bg-red-300 border-red-900;
}

.star-input {
  @apply cursor-pointer;
  input {
    display: none;
    & + svg {
      @apply stroke-indigo-600 transition-all;
    }
    &:checked + svg {
      @apply fill-indigo-600;
    }
  }
}

.comment {
  .comment-header {
    @apply flex justify-between;

    .datetime {
      @apply text-gray-500 text-xs;
    }
  }
  .comment-body {
  }
}
@utility grid-table-* {
  grid-template-columns: repeat(--value(integer), minmax(0, 1fr));
}

grid-table {
  @apply grid border border-gray-200 rounded-sm w-full bg-white;
  grid-table-header,
  grid-table-body {
    @apply contents;
  }
  grid-table-row {
    @apply grid grid-cols-subgrid;
    grid-column: 1 / -1;
    .no-results {
      grid-column: 1 / -1;
    }
  }
  grid-table-header {
    & > * {
      @apply border-b border-gray-200 py-3 px-3 text-gray-900 font-semibold text-left text-md flex items-center gap-1;
      letter-spacing: 0.02em;
    }
  }
  grid-table-body {
    grid-table-row {
      & > * {
        @apply border-b border-gray-200 py-3 px-3 text-gray-900 text-md font-normal;
        letter-spacing: 0.01em;
      }
      &:has(> *:first-child input:checked) > * {
        @apply bg-gray-100;
      }
      &:focus {
        @apply outline-offset-2 outline-1 outline-indigo-600 rounded-sm;
      }
      &:hover > * {
        @apply bg-gray-100;
      }
    }
  }
  .dropdown.filter {
    &.active svg {
      @apply fill-indigo-600 stroke-indigo-600;
    }
    .inner-menu {
      @apply p-3;
      input {
        @apply font-normal;
      }
    }
  }
}
body.integrations {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .integrations-content {
    @apply flex;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium bg-white;
        }
      }
    }
    .dropdown {
      @apply cursor-pointer;
      .menu {
        @apply max-w-full;
      }
    }
    #integrations-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(2, 1fr);
      .integration-row {
        @apply contents;
        &.no-integrations div {
          grid-column: span 4;
          @apply flex items-center p-3;
        }
        & > a {
          @apply contents;
        }
        .check,
        .name,
        .status,
        .actions {
          @apply flex items-center p-3 border-b border-gray-200;
        }
        &:last-child {
          & > .check,
          & > .name,
          & > .status,
          & > .actions,
          & > a {
            @apply border-b-0;
          }
        }
        &:hover {
          & > .check,
          & > .name,
          & > .status,
          & > .actions,
          & > a {
            @apply bg-gray-100;
          }
        }
        button {
          @apply cursor-pointer;
        }
      }
    }
    .form {
      .row {
        .field {
          .redirect-uri {
            .icon {
              @apply cursor-pointer w-5 h-5;
            }
          }
          .status {
            .icon {
              @apply cursor-help w-5 h-5;
            }
          }
        }
      }
    }
  }
}
.side-menu {
  @apply flex-none w-[212px] flex flex-col gap-1 text-gray-700 font-semibold text-md transition-all;

  svg {
    @apply stroke-gray-400 mr-1;
  }

  .item {
    @apply p-2 flex items-center;

    &:hover {
      @apply bg-gray-100;
    }
    &:not(.active) .arrow {
      @apply -rotate-90;
    }
    a {
      @apply flex-1;
    }
    &.active,
    &.active svg {
      @apply text-indigo-600 stroke-indigo-600 bg-gray-100;
    }
    &.indent-16.active {
      @apply bg-inherit;
    }
  }

  .favorites:not(.show),
  .specific-purchases:not(.show),
  .specific-sales:not(.show),
  .specific-cost-centres:not(.show),
  .specific-settings:not(.show) {
    display: none;
  }

  &.collapsed {
    @apply w-[40px];

    .indent-8,
    .indent-16,
    a span {
      display: none;
    }
  }
}

body.invoices {
  grid-table {
    form {
      @apply contents;
    }
    grid-template-columns: min-content min-content repeat(9, minmax(min-content, 1fr));
  }
  svg.icon {
    @apply w-5 h-5 mr-1;
    &.currency {
      @apply w-2 h-2 inline-block align-top cursor-help;
    }
  }

  #exchange-popover {
    @apply backdrop:bg-black/80 bg-white rounded-sm border border-gray-200;

    .exchange-inner {
      @apply p-2 flex flex-col gap-2.5;

      header {
        @apply flex justify-end;
      }
      main {
        @apply flex gap-1.5 items-center;

        select {
          @apply rounded border-gray-400 text-sm;
        }
      }
      footer {
        @apply flex justify-end;
      }
    }
  }
  /* EDIT FORM */
  .left {
    @apply flex-1 flex gap-2.5 flex-col;

    & > header {
      @apply flex-none flex;

      .title {
        @apply flex flex-1 items-center text-gray-700 text-sm font-medium;
      }
      .actions {
        @apply flex flex-row gap-2.5 items-center;
        label {
          @apply cursor-pointer;
          &:has(input:checked) {
            @apply bg-hw-gray;
            box-shadow: 0px 0px 6px 0px #00000040 inset;
          }
        }
      }
    }
    & > main {
      @apply flex-1;
    }
  }

  .right {
    @apply flex-none w-[428px] flex gap-2.5 flex-col;

    & > main {
      @apply flex-1 bg-white flex;

      .panel {
        @apply pb-4;
        &#vendor-panel,
        &#customer-panel {
          .title {
            svg.icon {
              @apply w-6 h-6;
            }
          }
        }

        &:not(:first-child) {
          @apply pt-4;
        }
        &.totals-panel {
          @apply sticky bg-white top-[-1rem] z-[1] !border-b;
        }
      }
      #invoice-page,
      #activity-page {
        @apply relative;
      }
      .pages .page {
        @apply overflow-y-scroll;
        height: calc(100vh - var(--right-top-height));
      }
      .comments-tab {
        @apply flex-1;
        grid-template-rows: 1fr auto;
        &:not(.hidden) {
          @apply grid;
        }
        height: calc(100vh - var(--right-top-height));
        .comments-list {
          @apply overflow-y-scroll max-h-full h-full;
        }
      }
    }
  }

  .form {
    @apply flex-1 flex flex-col rounded-sm text-gray-900 bg-white;

    .row {
      @apply flex-1 flex;

      &:last-of-type .field {
        @apply border-b;

        &:first-child {
          @apply rounded-bl;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-bl;
          }
        }
        &:last-child {
          @apply rounded-br;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-br;
          }
        }
      }
      &:first-child .field {
        &:first-child {
          @apply rounded-tl;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-tl;
          }
        }
        &:last-child {
          @apply rounded-tr;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-tr;
          }
        }
      }

      .field {
        @apply border-gray-200 border-t border-r p-3 flex flex-col text-sm;

        &:first-child {
          @apply border-l;
        }

        &.horizontal {
          @apply flex-row items-center;

          label {
            @apply m-0;
          }
          input {
            @apply w-4 mr-2;
          }
        }
        label {
          @apply text-xs flex mb-0.5 font-semibold select-none relative;
          span {
            @apply flex-1;
          }
          button {
            @apply relative size-4 ml-1;
            &:not(.hidden) {
              @apply flex;
              svg.ping {
                animation: ping 1s cubic-bezier(0, 0, 0.2, 1) 4;
              }
            }
            svg.ping {
              @apply absolute inline-flex h-full w-full rounded-full opacity-75;
            }
            svg {
              @apply text-gray-200 cursor-pointer relative inline-flex size-4;
            }
          }
          button[popovertarget]:has(+ [popover]:popover-open) svg {
            @apply text-gray-400;
          }
          [popover] {
            @apply absolute backdrop:bg-gray-800/50 rounded-sm min-h-[88px] max-h-[264px] w-80;
            .loader {
              @apply min-h-[88px];
            }
            /*
            ideally we want to use `right: anchor(left)` here, without the transform and the fixed width/height
            but that's currently not working, even with a polyfill
            setting top and left here doesn't work when reapplying the polyfill
            these styles have to be inlined as well
            */
            /* top: anchor(bottom);
            left: anchor(right); */
            transform: translateX(-100%);
            .pages,
            .page {
              height: auto;
            }
            .tab {
              .headers {
                @apply top-0 sticky;
              }
              .pages {
                .page {
                  @apply p-0 m-0 overflow-y-visible;
                  & > .changes {
                    @apply p-0 m-0;
                    header {
                      @apply top-7;
                    }
                  }
                }
              }
            }
            .changes {
              @apply flex flex-col gap-0.5 rounded-sm;
              .no-change {
                @apply p-2 font-normal text-sm;
              }
              header {
                @apply py-1 px-2 justify-end font-medium text-sm bg-gray-300 sticky top-0 border-l-4 border-gray-600;
              }
              .change {
                @apply flex p-2.5 flex-col gap-1 border-l-4 border-gray-600 hover:bg-gray-100;
                .meta {
                  @apply flex gap-1 items-center;
                  .icon {
                    @apply flex-initial w-4 h-4 text-gray-900;
                  }
                  .user {
                    @apply font-semibold text-xs flex-initial py-1 text-black;
                  }
                  .action {
                    @apply font-normal text-xs flex-1 py-1 text-gray-900;
                  }
                  .date {
                    @apply flex-initial flex gap-1.5 items-center border border-gray-300 py-1 px-2 rounded-sm text-gray-500;
                    line-height: 0.83125rem;
                    font-size: 0.6875rem;
                    time {
                    }
                  }
                }
                .input {
                  @apply flex gap-1 border border-black rounded-xs p-2.5 font-normal text-xs text-black;
                  & > span {
                    @apply flex-1 font-normal text-xs min-h-4;
                  }
                  & > svg {
                    @apply hidden;
                  }
                  &:hover > svg {
                    @apply h-4 w-4 cursor-pointer inline;
                  }
                }
              }
            }
          }
        }
        span,
        input,
        select {
          @apply text-sm block font-medium rounded-sm;
          &.small {
            @apply text-xs;
          }
        }
        input,
        select {
          @apply border-0 p-0 w-full;
        }
        select.currency,
        select.currency + input {
          @apply w-[4.2rem] inline-block max-w-[48%];
        }
        &:has(input:focus),
        &:has(select:focus),
        &:has([popover]:popover-open) {
          @apply outline-2 outline-indigo-600 outline-offset-[-2px] z-10;
        }
        &:has([popover]:popover-open) {
          @apply bg-yellow-200;
        }
        input:focus,
        select:focus,
        input:focus-visible,
        select:focus-visible {
          @apply ring-0 border-0 outline-0;
        }
      }
      .action {
        @apply flex items-center pl-2.5 text-gray-400;

        &.spacer {
          @apply w-[50px];
        }
      }
    }
    /* Totals section */
    &.totals .row {
      .field {
        @apply flex flex-row justify-end;

        &.amount {
          @apply flex flex-row;

          *:last-child {
            @apply flex-1 text-right;
          }
        }
        label {
          @apply text-sm font-normal;
        }
      }
      &:first-child .field:nth-last-child(2) {
        @apply rounded-tr;
      }
      &:last-child .field {
        /* @apply border-0 !important; */
        @apply !border-0;
      }
      &:nth-last-child(2) .field {
        @apply border-b;

        &:first-child {
          @apply rounded-bl;
        }
        &:nth-last-child(2) {
          @apply rounded-br;
        }
      }
      &.vat .field:first-child {
        @apply flex;

        input {
          @apply text-right flex-1 mr-[1px];
        }
      }
      &.total .field,
      &.total .field span {
        @apply font-bold;
      }
    }
  }

  .currency {
    @apply whitespace-nowrap;
    span {
      /* @apply inline-block !important; */
      @apply !inline-block;
    }
  }

  /* Totals section */

  .line-item {
    @apply bg-[#DFEDF0];
  }

  /* Activity section */
  #activity-page {
    @apply px-4 gap-6 divide-none;

    .period {
      @apply flex flex-col;

      & > header {
        @apply flex flex-row items-center mb-2 gap-1.5;

        .icon {
          @apply font-semibold;
        }
        .section {
          @apply font-semibold flex-1 text-sm;
        }
        .date {
          @apply border border-gray-300 rounded-sm text-gray-500 px-2 py-1 text-xs;
        }
      }
      & > main {
        @apply ml-1.5;

        & > .activity {
          &:not(.hidden) {
            @apply flex flex-col text-xs leading-[15px] gap-2.5 border-l-2 border-gray-200 pl-1.5 pb-2.5;
          }
          & > header {
            @apply flex flex-row gap-1.5 items-center;

            .icon {
              @apply font-semibold;
            }
            .user {
              @apply font-semibold;
            }
            .action {
            }
            .property {
              @apply flex-1 font-semibold capitalize;

              &.create {
                @apply text-green-600;
              }
              &.destroy {
                @apply text-red-600;
              }
            }
            .time {
              @apply text-gray-500;
            }
          }
          & > main {
            @apply flex flex-row gap-1.5 pl-2.5;

            .value {
              @apply border rounded-sm py-0.5 px-2 flex-1 font-semibold text-center;
            }
            .from {
              @apply text-gray-400 border-gray-400;
            }
            .to {
              @apply text-black border-black;
            }
            .create {
              @apply bg-green-50 border-green-600;
            }
            .destroy {
              @apply bg-red-50 border-red-600;
            }
          }
        }
      }
    }
  }
}

.current-version-date {
  @apply text-md font-semibold;
}
body.journals {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .journals-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #journals-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(5, 1fr);
      .journal-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
.notifications {
  .bell {
    @apply grid place-content-center;
    svg,
    #notification-pill {
      grid-area: 1/1;
    }
    #notification-pill {
      @apply text-[0.5rem] p-1 place-self-end mb-[-0.25rem] mr-[-0.25rem];
    }
  }
  .menu {
    .inner-menu {
      @apply max-h-[65vh] overflow-scroll;
      li {
        @apply bg-gray-100;
        &.unread {
          @apply bg-white;
        }
        .notication {
          @apply flex flex-row p-4 gap-1;
          .user {
            @apply flex;
          }
          .message {
            @apply flex flex-col flex-1 gap-2 max-w-[25vw];
            .preview {
              @apply border border-gray-300 rounded-sm whitespace-normal p-2;
              .text {
                @apply line-clamp-2;
              }
            }
          }
        }
      }
    }
  }
}
.panel {
  @apply flex-col gap-2 w-full;

  .panel(:not.hidden) {
    @apply flex;
  }

  main {
  }

  header {
    @apply flex cursor-pointer;

    .title {
      @apply flex-1 flex items-center text-gray-900 font-semibold text-md;

      .icon {
        @apply mr-2;
      }
      .name {
        @apply flex-1;
      }
    }
    .toggle {
    }
    & > .summary {
      @apply invisible text-gray-900 font-semibold text-md;
    }
    &:has(+ main.hidden) {
      .toggle {
        @apply -rotate-90;
      }
      .summary {
        @apply visible flex items-center;
      }
      .actions {
        display: none;
      }
    }
  }
}
body.payment-conditions {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .payment-conditions-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #payment-conditions-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(5, 1fr);
      .payment-condition-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
body.roles {
  #roles-table {
    table {
      @apply border-collapse border rounded-sm w-full bg-white;
      thead tr th {
        @apply border-b border-gray-200 py-3 px-2 text-gray-900 font-semibold  text-md whitespace-nowrap;
        letter-spacing: 0.02em;
      }
      tbody tr td {
        @apply border-b border-gray-200 py-3 px-2 text-gray-900 text-md text-center font-normal;
        letter-spacing: 0.01em;
      }
    }
  }
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .role-grid {
    @apply grid text-sm h-[80vh] overflow-scroll;
    form:not(.hidden) {
      @apply contents;
    }
    form:not(.hidden) + .swap {
      display: none;
    }
    .header {
      @apply border-t sticky top-0 bg-white flex flex-col gap-0.5;
      grid-row: 1;
      z-index: 1;
      &:not(.permission) {
        @apply w-36;
      }
      .actions {
        @apply text-xs font-semibold text-gray-500 flex;
        span {
          @apply flex-1;
        }
        svg {
          @apply cursor-pointer;
        }
        .dropdown .menu {
          @apply mt-1 text-sm font-normal py-1 rounded-sm border border-gray-200 shadow text-gray-600;
          ul {
            @apply flex flex-col;
            li {
              @apply flex gap-2 items-center hover:bg-gray-100 py-1 px-3 cursor-pointer;
              a {
                @apply flex gap-2 items-center;
              }
            }
          }
        }
      }
    }
  }
}
body.rubrics {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .rubrics-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #rubrics-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(5, 1fr);
      .rubric-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
.searchbox,
.searchbar {
  @apply relative;
}

.searchbox .search-results {
  @apply absolute w-full left-0 right-0 z-10 mt-2 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none divide-y divide-gray-100;

  ul {
  }
  ul li {
    @apply block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer;
  }
  li.empty {
    @apply flex items-center gap-1.5;
  }
}
.searchbar {
  &:has(.searchbox.options) {
    @apply relative w-80 inline-block;
  }
  .icon {
    @apply absolute text-gray-300 top-[6px];
  }
  .searchbox {
    @apply pl-11 text-gray-500 border border-gray-200 rounded-md text-sm p-[5px] transition-all w-44;

    &.options {
      @apply w-full;

      & + .icon + .icon {
        @apply block;
      }
    }
    &::placeholder {
      @apply text-gray-300;
    }
    &:focus {
      @apply w-72;

      & + .icon {
        @apply text-gray-500;
      }
    }
    & + .icon {
      @apply left-[12px];

      & + .icon {
        @apply right-[12px];
        display: none;
      }
    }
  }
}
body.settings {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .tiles {
    @apply flex flex-wrap gap-6;
    .tile {
      @apply flex flex-col gap-4 border rounded-sm border-gray-300 bg-white justify-center items-center p-4 min-w-36 min-h-36 font-semibold;
    }
    .tile svg {
      @apply w-12 h-12 text-gray-600;
    }
  }
}
body.roles,
body.users {
  .role-grid {
    .field,
    .col-span-1,
    .header {
      @apply py-1.5 px-2 border-b border-gray-200;
    }
    .field:not(.section),
    .col-span-1:not(.section),
    .header {
      @apply border-r;
    }
    .col-span-1,
    .header {
      @apply border-l;
    }
    .permission {
      @apply sticky left-0 bg-white;
      grid-column: 1;
      z-index: 2;
      &.header.col-span-1 {
        z-index: 3;
      }
      &.section {
        @apply flex gap-1 items-center cursor-pointer;
      }
      &.close svg {
        @apply -rotate-90;
      }
      &:not(:first-child) {
        top: 35px;
      }
    }
    .section {
      @apply bg-indigo-600 font-semibold text-white;
    }
    .field {
      @apply text-center;
    }
  }
}
.company-header {
  @apply flex gap-4 mb-4;

  .avatar {
    @apply bg-black rounded-sm;
  }
  .info {
    @apply flex flex-col gap-1;

    .name {
      @apply flex text-black font-semibold text-lg;
    }
    .location {
      @apply flex items-center text-gray-700 text-xs;

      svg {
        @apply stroke-gray-400 fill-gray-400;
      }
    }
  }
}

.toast-container {
  @apply absolute w-full bottom-5 flex justify-center z-10 select-none invisible;

  &.show {
    @apply visible;
    animation:
      fade-in 0.7s,
      fade-out 0.7s 2.5s;
  }
  .toast {
    @apply py-2.5 px-5 bg-[#37414E] rounded-md text-md shadow-sm text-white;

    span {
      @apply inline-block;

      &:first-letter {
        @apply capitalize;
      }
    }
  }
}

.loader {
  @apply flex h-full items-center justify-center;
  svg {
    @apply size-7 animate-spin text-indigo-600;
  }
}

nav.breadcrumb.extended {
  @apply flex bg-white drop-shadow-sm rounded-md h-16 border border-gray-200;

  .step {
    @apply flex text-gray-200 flex-1;

    &.active {
      box-shadow: 0 2px 0px 0px #4f46e5;

      .inner {
        @apply text-[#4F46E5];

        .number {
          @apply border-[#4F46E5];
        }
      }
    }
    &.completed .inner {
      @apply text-gray-900;

      .number {
        @apply border-[#4F46E5] bg-[#4F46E5] text-white;
      }
    }
    .inner {
      @apply flex items-center flex-1 px-5 py-2.5 text-[#6C727F];

      .number {
        @apply h-[43px] w-[43px] border-2 rounded-full flex items-center justify-center mr-3;
      }
    }
    .divider {
      @apply h-full;
    }
  }
}

.document-container {
  @apply bg-hw-gray rounded-t-md text-white text-md relative;

  & > header {
    @apply bg-[#1F2937CC] px-5 flex divide-x divide-white/20 rounded-t-md;

    div {
      @apply flex items-center gap-3 py-3 px-5;
    }
    div.page-nav {
      @apply gap-3.5;

      .current-page {
        @apply bg-[#00000033] px-3 py-1 rounded-sm border-0 text-center text-md;
        -webkit-appearance: none;
        margin: 0;
        -moz-appearance: textfield;
      }
      .total-pages {
        @apply px-3 py-1;
      }
    }
    .disabled {
      @apply text-white/50 cursor-default;
    }
    .very-disabled {
      @apply text-white/10 cursor-default;
    }
  }
  & > div {
    @apply overflow-y-scroll;
    height: calc(100vh - var(--middle-top-height));
  }
  main {
    @apply origin-top-left; /* h-svh  */

    section {
      @apply px-7 py-4;

      img {
        box-shadow: 0px 0px 8px 0px #00000033;
      }
    }
  }
}

.preview-modal.invoice {
  @apply backdrop:bg-black/80 bg-transparent w-lvw h-lvh m-0 p-0 overflow-hidden max-w-full max-h-full;

  & > header {
    @apply flex items-center bg-[#00000066] text-white font-medium text-[15px] p-4 fixed w-full top-0;

    .title {
      @apply flex-1 ml-2.5;
    }
    .actions {
      @apply flex items-center gap-4;

      .btn-dropdown {
        @apply bg-transparent border-gray-200 border-2 text-white;

        .icon {
          @apply text-white w-3 h-3;
        }
      }
      .dropdown .avatar {
        @apply w-5.5 h-5.5;
      }
    }
    svg {
      @apply cursor-pointer;
    }
  }
  & > main {
    @apply flex items-center mt-[70px] pointer-events-none;
    height: calc(100% - 70px);

    .previous,
    .pages,
    .next {
      @apply flex-1;
    }
    .previous,
    .next {
      @apply flex px-5 pointer-events-auto;

      a {
        @apply flex items-center justify-center bg-[#000000B2] rounded-full p-2.5 text-white w-9 h-9;
      }
    }
    .previous {
      @apply justify-start;
    }
    .next {
      @apply justify-end;
    }
    .pages {
      @apply items-center overflow-y-scroll max-h-full flex flex-col gap-5 mt-5 pointer-events-auto;
    }
  }
}

.participants {
  @apply bg-white rounded-sm shadow border border-gray-200 w-[400px];

  header,
  footer {
    @apply p-3 text-gray-700 font-normal flex text-md;

    span {
      @apply flex-1;
    }
  }
  header {
    @apply font-semibold text-sm;
  }
  footer .icon {
    @apply text-slate-900 mr-1.5;
  }
  main {
    @apply border-gray-200 border-y flex p-3 flex-col gap-2.5;

    .menu-item {
      @apply flex text-sm gap-1.5;

      .avatar {
        @apply flex items-center justify-center bg-gray-500 text-white rounded-full w-6 h-6 border text-xs;

        img {
          @apply rounded-full;
        }
      }
      .name {
        @apply flex-1 text-gray-700;
      }
      .time {
        @apply text-hw-gray;
      }
    }
  }
}
.tab {
  @apply flex flex-col border border-gray-200 rounded-sm;

  .headers {
    @apply grid grid-flow-col auto-cols-auto bg-gray-200 rounded-t;

    .header {
      @apply flex items-center px-6 py-2.5 text-md text-gray-700 font-semibold cursor-pointer  overflow-hidden;
      &.condensed {
        @apply px-3 py-1 text-xs;
      }

      svg {
        @apply mr-2;
      }
      &.active {
        @apply bg-white border-gray-200 rounded-t text-gray-900;

        &:not(:last-child) {
          @apply border-r;
          box-shadow: 4px 0 5px -4px rgba(0, 0, 0, 0.1);
        }
        &:last-child {
          box-shadow: -4px 0 5px -4px rgba(0, 0, 0, 0.1);
        }
      }
      &:not(.active) .action {
        display: none;
      }
      span {
        @apply flex-1 select-none text-nowrap text-ellipsis overflow-hidden;
      }
    }
  }

  .pages {
    @apply flex-1 flex;

    .page {
      @apply flex-1 px-0 py-4 flex-col divide-y divide-dashed divide-gray-200;

      & > * {
        @apply px-3;
      }
      &:not(.hidden) {
        @apply flex;
      }
    }
  }

  &.condensed .headers .header {
    @apply py-[3px];
  }

  &.centered .headers .header {
    @apply justify-center;
  }

  &.toggle {
    @apply border-none;

    .headers {
      @apply mb-5 rounded-sm p-0.5;

      .header {
        @apply rounded-sm text-gray-400;

        &:hover {
          @apply bg-gray-100;
        }
        &.active {
          @apply bg-white text-gray-900 drop-shadow;
        }
      }
    }
  }
}
body.teams {
  .teams-main {
    @apply flex gap-6;

    #teams-table {
      @apply flex-1;

      table {
        @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;

        thead tr th {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
          letter-spacing: 0.02em;
        }
        tbody tr td {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 text-md font-normal;
          letter-spacing: 0.01em;
        }
      }
    }
  }
}
.container {
  @apply relative;

  #text-block-canvas {
    @apply w-full h-full absolute top-0 left-0;
  }

  .text-block-canvas {
    @apply w-full h-full absolute top-0 left-0;

    .text-block {
      @apply absolute bg-amber-100/15 outline-2 outline-amber-200/40 rounded-sm cursor-pointer;

      &:hover {
        @apply bg-amber-300/20 outline-amber-500/40;
      }
      &.selected {
        @apply bg-[#0075FF2B] outline-[#0075FF];
      }
      &.active {
        .popover {
          @apply visible;
        }
      }
      &.linked {
        @apply outline-lime-400;
      }
      .popover {
        @apply absolute left-2/4 translate-x-[-50%] bottom-6 w-max bg-[#0075FF] rounded-sm invisible flex-col p-px;

        header {
          @apply text-xs font-semibold py-1.5 px-2.5 flex;

          span {
            @apply flex-1;
          }
        }
        input {
          @apply text-sm rounded-sm bg-[#C9E2FF] text-gray-900 p-1.5;
        }
        &::after {
          @apply content-[""] absolute top-full left-1/2 ml-[-10px] border-[10px] rotate-180 border-transparent border-b-[#0075FF];
        }
      }
    }
    .selection {
      @apply absolute bg-gray-400/10 rounded-sm;
      background-image:
        linear-gradient(90deg, #1f293766 50%, transparent 50%), linear-gradient(90deg, #1f293766 50%, transparent 50%),
        linear-gradient(0deg, #1f293766 50%, transparent 50%), linear-gradient(0deg, #1f293766 50%, transparent 50%);
      background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
      background-size:
        15px 2px,
        15px 2px,
        2px 15px,
        2px 15px;
      background-position:
        left top,
        right bottom,
        left bottom,
        right top;
      /* border-2 border-gray-800/40 border-dashed */

      &.loading {
        animation: rotate-border 0.8s infinite linear;
      }
    }
  }
}
body.users {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .users-content {
    @apply flex;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium bg-white;
        }
      }
    }
    #users-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(3, 1fr);
      .user-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
        .info {
          @apply flex p-3 items-center border-b border-gray-200;
          .avatar {
            @apply flex items-center justify-center bg-[#787878] text-white w-10 h-10 rounded-lg mr-2;
          }
        }
        .administrations {
          @apply flex p-3 items-start justify-start border-b border-gray-200;
        }
        .roles {
          @apply flex p-3 items-start justify-start border-b border-gray-200;
          .pill {
            @apply text-sm px-2 p-1 mr-1;
          }
          .dropdown {
            .dropdown-text {
              @apply overflow-hidden w-0 max-w-0 transition-all duration-300;
            }
            &:hover .dropdown-text {
              @apply w-auto max-w-40;
            }
            .dropdown-menu {
              @apply absolute top-4 right-0 z-10 mt-3 w-screen max-w-max;
              .dropdown-contents {
                @apply text-sm bg-white shadow-lg rounded-sm border overflow-hidden w-32;
                form {
                  @apply flex flex-col gap-1;
                  label {
                    @apply px-2 py-1 hover:bg-gray-200 cursor-pointer;
                  }
                }
              }
            }
          }
        }
        &:last-child {
          & > .check,
          & > a,
          & > a > .info,
          & > .administrations,
          & > .roles {
            @apply border-b-0;
          }
        }
        &:hover {
          & > .check,
          & > a,
          & > a > .info,
          & > .administrations,
          & > .roles {
            @apply bg-gray-100;
          }
        }
      }
    }
    #user-detail {
      @apply border rounded-sm bg-white border-gray-200 font-normal p-3 w-[350px];
      .user-card {
        @apply items-start bg-black text-white rounded-lg p-5 flex gap-3.5;
        contact {
          @apply flex flex-col flex-1;
          .name {
            @apply text-lg font-semibold;
          }
          .type {
            @apply text-sm font-normal;
          }
          .email {
            @apply flex items-center gap-1.5 text-gray-400 text-md font-normal;
          }
        }
        .avatar {
          @apply flex items-center justify-center bg-white text-black rounded-full w-[70px] h-[70px];
        }
      }
      ul {
        @apply list-disc list-inside;
        a {
          @apply text-indigo-600;
        }
      }
      h2 {
        @apply text-lg font-semibold mt-3;
      }
      .permissions {
        select {
          @apply rounded-sm border border-gray-300 py-1 mb-2;
        }
      }
    }
  }
}
:root {
  --middle-top-height: 250px;
  --right-top-height: 243px;
}
@theme {
  /* using --color-* makes utilities like bg-*, text-*, border-*, and fill-* work */
  --color-hw-gray: #c1c6d1;
}
body.vat-codes {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .vat-codes-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #vat-codes-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(7, 1fr);
      .vat-code-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
