
.wpf-matrix-checkbox {
  --wpf-matrix-head-bg: transparent;
  --wpf-matrix-row-bg: #f1f3f4;
  --wpf-matrix-row-bg-hover: #eceff1;
  --wpf-matrix-text: #202124;
  --wpf-matrix-muted: #3c4043;
  --wpf-matrix-border: #e0e0e0;
  --wpf-matrix-focus: #1a73e8;
  --wpf-matrix-question-width: 36%;
  --wpf-matrix-option-width: 21.333%;
  margin: 14px 0 24px;
}

.wpf-matrix-title {
  font-weight: 500;
  text-transform: none;
  margin-bottom: 12px;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--wpf-matrix-text);
}

.wpf-matrix-required {
  color: #d93025;
}

.wpf-matrix-table-wrap {
  overflow-x: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wpf-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  min-width: 0;
  table-layout: fixed;
}

.wpf-matrix-table thead th {
  background: var(--wpf-matrix-head-bg);
  color: var(--wpf-matrix-text);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  padding: 0 10px 8px;
  border: 0;
  text-align: center;
  vertical-align: bottom;
}

.wpf-matrix-table thead th:first-child {
  text-align: left;
}

.wpf-matrix-head-label {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 48px;
  padding: 0 4px;
  text-align: center;
}

.wpf-matrix-table tbody td {
  padding: 12px 10px;
  border: 0;
  text-align: center;
  vertical-align: middle;
  background: var(--wpf-matrix-row-bg);
}

.wpf-matrix-table tbody tr:hover td {
  background: var(--wpf-matrix-row-bg-hover);
}

.wpf-matrix-table tbody td:first-child {
  border-radius: 4px 0 0 4px;
}

.wpf-matrix-table tbody td:last-child {
  border-radius: 0 4px 4px 0;
}

.wpf-matrix-question-col,
.wpf-matrix-question {
  text-align: left !important;
  width: var(--wpf-matrix-question-width);
}

.wpf-matrix-question {
  color: var(--wpf-matrix-muted);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

.wpf-matrix-table thead th:not(.wpf-matrix-question-col),
.wpf-matrix-table tbody td:not(.wpf-matrix-question) {
  width: var(--wpf-matrix-option-width);
}

.wpf-matrix-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  position: relative;
}

.wpf-matrix-input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #5f6368;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
  position: relative;
}

.wpf-matrix-input:hover {
  border-color: var(--wpf-matrix-text);
}

.wpf-matrix-input:focus {
  outline: none;
  border-color: var(--wpf-matrix-focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.wpf-matrix-input:checked {
  background: var(--wpf-matrix-focus);
  border-color: var(--wpf-matrix-focus);
}

.wpf-matrix-input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.wpf-matrix-checkbox.is-compact .wpf-matrix-table {
  border-spacing: 0 3px;
}

.wpf-matrix-checkbox.is-compact .wpf-matrix-table thead th {
  padding-bottom: 6px;
}

.wpf-matrix-checkbox.is-compact .wpf-matrix-table tbody td {
  padding: 10px 8px;
}

.wpf-matrix-checkbox.is-compact .wpf-matrix-question {
  font-size: 13px;
  line-height: 1.3;
}

.wpf-matrix-error,
.wpf-matrix-checkbox-error {
  color: #d93025;
  margin-top: 10px;
  font-size: 13px;
}

.wpf-matrix-checkbox.has-error .wpf-matrix-table-wrap {
  border-radius: 8px;
  box-shadow: 0 0 0 1px #d93025;
}

.wpf-matrix-builder-preview .wpf-matrix-table {
  min-width: 0;
}

.wpf-matrix-builder-box {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #5f6368;
  border-radius: 2px;
  background: #fff;
}

@media (max-width: 900px) {
  .wpf-matrix-checkbox {
    --wpf-matrix-question-width: 42%;
  }

  .wpf-matrix-table thead th {
    font-size: 11px;
    padding: 0 6px 6px;
  }

  .wpf-matrix-question {
    font-size: 13px;
  }
}
