/* ============================================================================
   diffview.css - Diff table styling for side-by-side comparison
   ============================================================================
   Loaded by:  webdev-tools/simple-diff-checker.php
   Purpose:    Styles the <table class="diff"> rendered by diffview.js.
   Colors:     Green = inserted, Red = deleted, Yellow = changed, Gray = skip
   ============================================================================ */

.diff {
  width: 100%;
  border-collapse: collapse;
  font-family: Consolas, Menlo, Courier New, monospace;
  font-size: 14px;
  table-layout: fixed;
  word-wrap: break-word;
  margin: 10px 0;
}

.diff thead th {
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  color: #333;
}

.diff thead th.texttitle {
  background-color: #e8e8e8;
}

.diff thead th.linenum {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}

.diff tbody tr td,
.diff tbody tr th {
  border: 1px solid #ddd;
  padding: 4px 10px;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff tbody tr th {
  width: 40px;
  min-width: 40px;
  text-align: right;
  background-color: #f7f7f7;
  color: #999;
  font-size: 12px;
  font-weight: 400;
  border-right: 1px solid #ddd;
}

.diff tbody tr td {
  width: 46%;
}

/* Line type colors */
.diff tbody tr td.insert {
  background-color: #b6d7a8;
}

.diff tbody tr td.delete {
  background-color: #ea9999;
}

.diff tbody tr td.replace {
  background-color: #ffe599;
}

.diff tbody tr td.equal {
  background-color: #fff;
}

.diff tbody tr td.skip {
  background-color: #f1f1f1;
  text-align: center;
  color: #999;
  font-style: italic;
}

.diff tbody tr td.empty {
  background-color: #f1f1f1;
  width: 10px;
  min-width: 10px;
}

/* Responsive */
@media only screen and (max-width: 768px) {
  .diff {
    font-size: 12px;
    display: block;
    overflow-x: auto;
  }

  .diff tbody tr td,
  .diff tbody tr th {
    padding: 3px 6px;
  }
}
