/* Whois — /tools/whois/ (extends ping-tool) */

/* Toolbar — input + buttons in one row */
.wh-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--te-card);
  border: 1px solid var(--te-border);
  border-radius: 12px;
  box-sizing: border-box;
}

.wh-toolbar-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wh-field-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--te-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wh-query-input,
.wh-toolbar-field .te-input,
.wh-toolbar-field .pt-host-input {
  width: 100%;
  max-width: 100%;
  height: 40px;
  box-sizing: border-box;
  min-width: 0;
  font-size: 13px;
  padding: 0 12px;
}

.wh-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wh-toolbar-actions .te-btn {
  height: 40px;
  min-width: 0;
  padding: 0 18px;
  font-size: 13px;
  white-space: nowrap;
}

.wh-btn-copy {
  padding: 0 14px !important;
}

/* Quick examples */
.wh-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.wh-example-btn {
  border: 1px solid var(--te-border);
  background: #fff;
  color: #4356a3;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, 'Cascadia Mono', monospace;
  cursor: pointer;
  direction: ltr;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.wh-example-btn:hover:not(:disabled) {
  border-color: var(--te-accent);
  background: var(--te-accent-dim);
  color: #4356a3;
}

.wh-example-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wh-link-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--te-accent);
  font-family: ui-monospace, 'Cascadia Mono', monospace;
  min-height: 16px;
  direction: ltr;
}

/* Stats */
.wh-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}

.wh-stat {
  text-align: center;
  padding: 12px 4px;
  background: var(--te-card);
  border: 1px solid var(--te-border);
  border-radius: 10px;
  transition: border-color 0.25s, transform 0.25s;
}

.wh-stat--flash {
  animation: wh-stat-flash 0.45s ease;
}

@keyframes wh-stat-flash {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); border-color: var(--te-accent); }
  100% { transform: scale(1); }
}

.wh-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--te-muted);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.wh-stat-value {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--te-text);
  direction: ltr;
}

.wh-stat-value--accent { color: var(--te-accent); }
.wh-stat-value--ok { color: #059669; }

.wh-status-line {
  text-align: center;
  font-size: 13px;
  color: var(--te-muted);
  margin-bottom: 14px;
  min-height: 20px;
  line-height: 1.6;
}

.wh-status-line strong {
  color: var(--te-text);
  font-weight: 800;
}

.wh-status-line code {
  font-size: 12px;
  background: rgba(67, 86, 163, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #4356a3;
}

/* Status tags */
.wh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.wh-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  direction: ltr;
}

.wh-tag--warn {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.25);
  color: #ea580c;
}

/* Sections */
.wh-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.wh-section {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--te-border);
  background: var(--te-card);
  animation: wh-section-in 0.4s ease;
}

@keyframes wh-section-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wh-section-title {
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(67, 86, 163, 0.08), rgba(0, 147, 233, 0.06));
  color: #4356a3;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid var(--te-border);
}

.wh-kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.wh-kv th,
.wh-kv td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--te-border);
  vertical-align: top;
}

.wh-kv th {
  width: 32%;
  background: rgba(67, 86, 163, 0.04);
  color: #4356a3;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
}

.wh-kv td {
  color: var(--te-text);
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, 'Cascadia Mono', monospace;
  font-size: 12px;
  word-break: break-word;
}

.wh-kv tr:last-child th,
.wh-kv tr:last-child td {
  border-bottom: none;
}

.wh-kv tr.wh-row--new {
  animation: wh-row-in 0.3s ease;
}

@keyframes wh-row-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Nameservers */
.wh-ns-block {
  margin-bottom: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--te-card);
  border: 1px solid var(--te-border);
  animation: wh-section-in 0.4s ease;
}

.wh-ns-title {
  font-size: 12px;
  font-weight: 800;
  color: #4356a3;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.wh-ns-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wh-ns-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(67, 86, 163, 0.08);
  border: 1px solid rgba(67, 86, 163, 0.16);
  color: #4356a3;
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, 'Cascadia Mono', monospace;
  direction: ltr;
}

.wh-empty {
  text-align: center;
  padding: 20px;
  color: var(--te-muted);
  font-size: 13px;
  border: 1px dashed var(--te-border);
  border-radius: 12px;
}

@media (max-width: 560px) {
  .wh-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
    padding: 12px;
  }

  .wh-toolbar-field {
    flex: 1 1 100%;
  }

  .wh-toolbar-actions {
    flex: 1 1 100%;
  }

  .wh-toolbar-actions .te-btn {
    flex: 1;
  }

  .wh-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .wh-stat-value {
    font-size: 14px;
  }

  .wh-kv th {
    width: 38%;
    font-size: 11px;
  }
}
