/*
 * Content written in the admin editor (TinyMCE): services, articles, static pages, about, team, products.
 * Tables are often pasted from Word with border="0", fixed pixel widths and <p> in every cell,
 * so the attributes are overridden here.
 */

.editor-content table {
  width: 100% !important;
  max-width: 100%;
  margin: 24px 0 32px;
  border-collapse: collapse;
  border: 1px solid #e3e6ea;
  background-color: var(--gt-white, #fff);
  font-size: 15px;
  line-height: 1.5;
}

.editor-content table td,
.editor-content table th {
  width: auto;
  padding: 12px 16px;
  border: 1px solid #e3e6ea;
  vertical-align: middle;
  color: var(--gt-text, #595D63);
}

/* Cells pasted from Word wrap their text in <p>. */
.editor-content table td p,
.editor-content table th p {
  margin: 0 !important;
  text-align: inherit;
}

/* Header rows: <thead> or <th>, whether the editor used <td> or <th>. */
.editor-content table thead td,
.editor-content table thead th,
.editor-content table th {
  background-color: var(--gt-theme, #00376d);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--gt-white, #fff);
  font-weight: 600;
  text-align: center;
}

.editor-content table thead td *,
.editor-content table th * {
  color: inherit !important;
}

.editor-content table tbody tr:nth-child(even) td {
  background-color: var(--gt-bg2, #F8F8F8);
}

.editor-content table tbody tr:hover td {
  background-color: #eef3f8;
}

/* First column = event / label. */
.editor-content table tbody td:first-child {
  color: var(--gt-header, #1D2229);
  font-weight: 500;
}

/* Value columns. */
.editor-content table tbody td:not(:first-child) {
  text-align: center;
}

.editor-content table tbody td:not(:first-child) p {
  text-align: center !important;
}

/* Small screens: let wide tables scroll sideways instead of squeezing the columns. */
@media (max-width: 767px) {
  .editor-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
  }

  .editor-content table td,
  .editor-content table th {
    padding: 10px 12px;
    min-width: 120px;
  }
}
