.date-range-control {
  width: auto;
}

.result-limit-control {
  min-width: 100px;
  width: auto;
}

.sortable {
  cursor: pointer;
  position: relative;
}

.domain-thumbnail {
  height: 55px;
  width: auto;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 3px;
  transition: all 0.3s ease;
  position: relative;
}

.thumbnail-container {
  position: relative;
  display: inline-block;
}

.thumbnail-container:hover .full-size-image {
  display: block;
}

.full-size-image {
  display: none;
  position: absolute;
  top: -10px;
  left: 30px;
  height: 240px;
  width: auto;
  z-index: 100;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background-color: white;
}

#resultsTable {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border: 1px solid #dee2e6;
  background-color: #fff;
}

#resultsTable td,
#resultsTable th {
  border: none;
  border-right: 1px solid #e9ecef;
}

#resultsTable td:last-child,
#resultsTable th:last-child {
  border-right: none;
}

#resultsTable thead {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

#resultsTable thead th {
  color: #495057;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
}

#resultsTable tbody tr {
  transition: background-color 0.2s ease;
  background-color: #fff;
}

#resultsTable tbody tr:nth-child(odd) {
  background-color: #f8f9fa;
}

#resultsTable tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.03);
}

#resultsTable tbody tr:nth-child(1) {
  background-color: rgba(255, 215, 0, 0.05);
}

#resultsTable tbody tr:nth-child(2) {
  background-color: rgba(192, 192, 192, 0.05);
}

#resultsTable tbody tr:nth-child(3) {
  background-color: rgba(205, 127, 50, 0.03);
}

#resultsTable tbody tr:nth-child(1):hover,
#resultsTable tbody tr:nth-child(2):hover,
#resultsTable tbody tr:nth-child(3):hover {
  background-color: rgba(0, 123, 255, 0.03);
}

#resultsTable td {
  padding: 12px 10px;
  vertical-align: middle;
  border-top: 1px solid #e9ecef;
}

#resultsTable td:first-child {
  font-weight: 600;
  text-align: center;
  color: #495057;
  width: 60px;
  background-color: #f8f9fa;
  border-right: 1px solid #e9ecef;
}

#resultsTable thead th:first-child {
  text-align: center;
  width: 60px;
  background-color: #e9ecef;
}

#resultsTable th.domain-col,
#resultsTable td.domain-col {
  min-width: 180px;
}

#resultsTable th.name-col,
#resultsTable td.name-col {
  min-width: 120px;
}

#resultsTable .domain-col a {
  color: #0366d6;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

#resultsTable .domain-col a:hover {
  color: #0056b3;
  text-decoration: underline;
}

#resultsTable .score-col {
  text-align: right;
  color: #212529;
  min-width: 100px;
}

#resultsTable thead th.score-col {
  text-align: right;
  font-weight: 700;
}

#resultsTable .bio-col,
#resultsTable .topics-col {
  max-width: 250px;
}

.date-form-container {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
}

.date-form-container select,
.date-form-container input[type="date"] {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 8px;
  height: 34px;
  background-color: white;
  transition: border-color 0.15s ease-in-out;
  width: auto;
  font-size: 0.9rem;
}

#time-choose {
  min-width: 160px;
}

.date-form-container select:hover,
.date-form-container input[type="date"]:hover {
  border-color: #adb5bd;
}

.date-form-container select:focus,
.date-form-container input[type="date"]:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.date-form-container label {
  font-weight: 500;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  color: #495057;
  font-size: 0.95rem;
}

input[type="date"] {
  position: relative;
  min-width: 140px;
}

#result-limit {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  height: 38px;
  background-color: white;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

#result-limit:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: 0;
}

@media screen and (max-width: 768px) {
  .domain-col {
    min-width: 20ch;
    max-width: 30ch;
  }

  tbody .domain-col {
    word-break: break-word;
    overflow-wrap: break-word;
    padding-right: 1ch;
  }

  .name-col {
    max-width: 10ch;
  }

  .bio-col,
  .topics-col {
    max-width: 15ch;
  }

  .domain-thumbnail {
    margin-left: 0;
    margin-top: 1rem;
    display: block;
    height: 100px;
  }

  .thumbnail-container {
    display: block;
  }
}

.sortable:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.active-sort {
  font-weight: bold;
  color: #0d6efd;
}

.active-sort::after {
  content: " ↓";
  font-size: 0.8em;
  vertical-align: middle;
}

.highlighted-domain-row td {
  background-color: rgba(255, 193, 7, 0.25) !important;
  transition: background-color 0.3s ease;
}

.highlighted-domain-row:hover td {
  background-color: rgba(255, 193, 7, 0.4) !important;
}
