/* src/components/prosemirror/tables/tables.css */
.ProseMirror table {
  border-collapse: collapse;
  table-layout: fixed;
  background: none;
  width: 100%;
  margin: 1em 0;
}

.ProseMirror td, .ProseMirror th {
  border: 1px solid;
  border-color: inherit;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
  background: none;
  min-width: 3em;
  padding: .5em .75em;
}

.prose .ProseMirror td, .prose .ProseMirror th {
  border-color: var(--tw-prose-td-borders, currentColor);
}

.ProseMirror th {
  text-align: left;
  background: #80808014;
  font-weight: 600;
}

.ProseMirror td[style*="text-align: center"], .ProseMirror th[style*="text-align: center"] {
  text-align: center;
}

.ProseMirror td[style*="text-align: right"], .ProseMirror th[style*="text-align: right"] {
  text-align: right;
}

.ProseMirror td[style*="text-align: left"], .ProseMirror th[style*="text-align: left"] {
  text-align: left;
}

.ProseMirror .selectedCell {
  background-color: #3b82f626 !important;
}

.ProseMirror .selectedCell:after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
  background: #3b82f61a;
  inset: 0;
}

.ProseMirror .column-resize-handle {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  background-color: #3b82f699;
  width: 4px;
  top: 0;
  bottom: -1px;
  right: -2px;
}

.ProseMirror.resize-cursor {
  cursor: col-resize;
}

.ProseMirror .tableWrapper {
  overflow-x: auto;
  margin: 1em 0;
}

.ProseMirror .tableWrapper table {
  margin: 0;
}

.ProseMirror td:empty:before, .ProseMirror th:empty:before {
  content: " ";
  color: #0000;
}

.ProseMirror td:not(.selectedCell):hover, .ProseMirror th:not(.selectedCell):hover {
  background: #8080800d;
}

.ProseMirror th:not(.selectedCell):hover {
  background: #8080801f;
}

@media print {
  .ProseMirror table {
    page-break-inside: avoid;
  }

  .ProseMirror td, .ProseMirror th {
    border-color: #000;
  }
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
  border-top: 1px solid;
  width: 20px;
  top: -2px;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}

.ProseMirror td, .ProseMirror th {
  cursor: text;
}

.ProseMirror table {
  border-spacing: 0;
}
