root {
  --table-width: 700px
}

* {
  margin: 0;
}

/* Table Styles */

.draggable {
  cursor: grab;
}

.keyword-combiner {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin: 1em 0;
}

.combiner-title {
  margin-bottom: 1em;
}

.error {
  color: #bc2929;
  margin: .5em 0 0 0;
}

#results {
  min-height: 20ch;
  width: calc(100% - 8em);
  padding: .2em 1em;
  resize: vertical;
  margin: 2em;

  border: 1px solid black;

  &:focus,
  &:hover {
    outline: none;
    border: 1px solid black;
  }
}


#results::-webkit-scrollbar-track {
  border-left: 1px solid rgba(0, 0, 0, 0.112);
  background-color: white;
}

#results::-webkit-scrollbar {
  width: 10px;
  background-color: #F5F5F5;
}

#results::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  background-color: #31a738;
}


#dialog {
  top: 50%;
  left: 50%;
  translate: -50% -50%;

  width: 350px;
  height: 200px;
}

#dialog[open] {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;
}

#dialog input {
  width: 150px;
  padding: 0.5em 1rem;
  background-color: white;
  border: 0;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
  margin: 10px 0;

  &:focus {
    outline: none;
    box-shadow: 0 2px 2px 0 rgba(49, 167, 57, 0.56), 0 0 0 1px rgba(49, 167, 57, 0.28);
  }
}


#dialog .options {
  display: flex;
  width: calc(150px + 2rem);
  justify-content: space-between;
}

.table-wrapper {
  width: 100%;
  margin: 10px 0 3rem 0;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.btn {
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
  background-color: #31a738;
  border: none;
  color: white;
  padding: .5em 1em;
  cursor: pointer;
}

.table {
  border-radius: 5px;
  font-size: 16px;
  font-weight: normal;
  border: none;
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  background-color: white;
}

.table td, .table th {
  text-align: center;
  padding: 8px;
}

.table td {
  border-right: 1px solid #f8f8f8;
  font-size: 16px;
}

.cellContent {
  display: flex;
  align-items: center;

  .btn {
    margin-left: auto;
  }

  & p {
    margin-right: 10px;
    max-width: 20ch;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.table thead th {
  color: #ffffff;
  background: #31a738;
}

.thContent {
  display: flex;
  justify-content: center;
  gap: 1em;
  align-items: center;
  padding: 0 1em;

  .buttons-wrapper {
    margin-left: auto;
    display: flex;
  }

  .btn {
    color: white;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }
}

.table thead th:nth-child(odd) {
  color: #ffffff;
  background: #3156a7;
}

.table tr:nth-child(even) {
  background: #F8F8F8;
}

/* Responsive */

.table-wrapper.rows {
  .table {
    display: block;
    width: 100%;
  }

  .table-wrapper:before {
    content: "Scroll horizontally >";
    display: block;
    text-align: right;
    font-size: 15px;
    color: black;
    padding: 0 10px 10px;
  }

  .table thead, .table tbody, .table thead th {
    display: block;
  }

  .table thead th:last-child {
    border-bottom: none;
  }

  .table thead {
    float: left;
  }

  .table tbody {
    width: auto;
    position: relative;
    overflow-x: auto;
  }

  .table td, .table th {
    height: 45px;
    vertical-align: middle;
    box-sizing: border-box;
    font-size: 13px;
  }

  .table thead th {
    text-align: left;
    border-bottom: 1px solid #f7f7f9;
  }

  .table tbody tr {
    display: table-cell;
  }

  .table tbody tr:nth-child(odd) {
    background: none;
  }

  .table tr:nth-child(even) {
    background: transparent;
  }

  .table tr td:nth-child(odd) {
    background: #F8F8F8;
    border-right: 1px solid #E6E4E4;
  }

  .table tr td:nth-child(even) {
    border-right: 1px solid #E6E4E4;
  }

  .table tbody td {
    display: block;
    text-align: center;
  }