/* ========== style.css ========== */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #121212;
  color: #f0f0f0;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: auto;
  background: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.table-grid {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
}

/*
.table-section {
  flex: 1 1 300px;
  min-width: 280px;
}

.table-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
*/

.table-section table {
  margin: 0 !important;
}

.table-section {
  border-top: 1px solid transparent;
  padding-top: 8px;    /* если нужен отступ над заголовком таблицы */
}

thead th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  background-color: #1b1b1b;
  color: #aaa;
  padding: 8px 10px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #333;
  text-align: left;
  white-space: nowrap;
}

td:nth-child(2),
th:nth-child(2) {
  width: 140px;
  max-width: 140px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
}

.flag-icon {
  width: 20px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #00000033;
}

.ping-ok {
  color: #00ff88;
}

.ping-fail {
  color: #ff4d4d;
}

.ping-pending {
  color: #cccccc;
  font-style: italic;
}

#pingDetails {
  position: absolute;
  background: #1a1a1a;
  color: #ccc;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: pre-line;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  visibility: hidden;
}

#pingDetails.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

@media (max-width: 768px) {
  .table-grid {
    flex-direction: column;
    gap: 0;            /* flex-gap в колонках убираем */
    align-items: flex-start;
  }

  /* Между всеми секциями, кроме последней, по 40px */
  .table-section:not(:last-child) {
    margin-bottom: 40px;
  }
}
