.whois-query-form {
  display: grid;
  gap: 16px;
}

.whois-loading-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 96px 24px 24px;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(4px);
  z-index: 120;
}

.whois-loading-overlay[hidden] {
  display: none;
}

.whois-loading-card {
  min-width: min(88vw, 280px);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(22, 93, 255, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.whois-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(22, 93, 255, 0.16);
  border-top-color: #165dff;
  animation: whois-spinner-rotate 0.9s linear infinite;
}

.whois-loading-text {
  text-align: center;
}

.whois-loading-title {
  display: block;
  color: #165dff;
  font-size: 1rem;
  font-weight: var(--weight-bold);
  line-height: 1.4;
}

.whois-loading-desc {
  display: block;
  margin-top: 4px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

@keyframes whois-spinner-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.whois-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.whois-input {
  min-height: 52px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(217, 225, 236, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.whois-input:focus {
  outline: none;
  border-color: rgba(22, 93, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.08);
}

.whois-input-help {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.whois-source-grid,
.whois-field-grid {
  display: grid;
  gap: 14px;
}

.whois-source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whois-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.whois-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217, 225, 236, 0.92);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

@keyframes whois-active-pulse {
  0%,
  100% {
    box-shadow: 0 18px 40px rgba(22, 93, 255, 0.08);
  }

  50% {
    box-shadow: 0 20px 48px rgba(22, 93, 255, 0.14);
  }
}

.whois-card-label {
  margin: 0 0 10px;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.whois-card-value {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--weight-semibold);
  line-height: 1.6;
  color: var(--color-text);
  word-break: break-word;
}

.whois-card-value.is-mono {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.whois-card-note {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.whois-card.is-active {
  border-color: rgba(22, 93, 255, 0.28);
  background: rgba(239, 246, 255, 0.9);
  box-shadow: 0 18px 40px rgba(22, 93, 255, 0.08);
  animation: whois-active-pulse 1.7s ease-in-out infinite;
}

.whois-card.is-active .whois-card-label,
.whois-card.is-active .whois-card-note {
  color: #1d4ed8;
}

.whois-card.is-active .whois-card-value {
  color: var(--color-primary);
}

.whois-card.is-success {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(240, 253, 244, 0.92);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.whois-card.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.94);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.whois-card.is-danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.94);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.whois-card.is-success .whois-card-label,
.whois-card.is-success .whois-card-note {
  color: #166534;
}

.whois-card.is-success .whois-card-value {
  color: #15803d;
}

.whois-card.is-warning .whois-card-label,
.whois-card.is-warning .whois-card-note {
  color: #92400e;
}

.whois-card.is-warning .whois-card-value {
  color: #b45309;
}

.whois-card.is-danger .whois-card-label,
.whois-card.is-danger .whois-card-note {
  color: #991b1b;
}

.whois-card.is-danger .whois-card-value {
  color: #b91c1c;
}

.whois-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whois-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(238, 242, 247, 0.9);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.whois-tag.is-active {
  background: rgba(22, 93, 255, 0.12);
  color: var(--color-primary);
  animation: whois-active-pulse 1.7s ease-in-out infinite;
}

.whois-tag.is-active::before {
  content: '...';
  margin-right: 6px;
  font-weight: 700;
  letter-spacing: 1px;
}

.whois-tag.is-success {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.whois-tag.is-success::before {
  content: 'OK';
  margin-right: 6px;
  font-weight: 700;
}

.whois-tag.is-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.whois-tag.is-warning::before {
  content: '!';
  margin-right: 6px;
  font-weight: 700;
}

.whois-tag.is-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.whois-tag.is-danger::before {
  content: 'X';
  margin-right: 6px;
  font-weight: 700;
}

.whois-raw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.whois-raw-source {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.whois-raw-box {
  min-height: 320px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(217, 225, 236, 0.92);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.whois-raw-box.is-active {
  border-color: rgba(22, 93, 255, 0.28);
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 18px 40px rgba(22, 93, 255, 0.08);
  color: var(--color-primary);
  animation: whois-active-pulse 1.7s ease-in-out infinite;
}

.whois-raw-box.is-success {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(240, 253, 244, 0.94);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
  color: #166534;
}

.whois-raw-box.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.96);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
  color: #92400e;
}

.whois-raw-box.is-danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.96);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
  color: #991b1b;
}

@media (max-width: 960px) {
  .whois-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .whois-query-row,
  .whois-source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .whois-field-grid {
    grid-template-columns: 1fr;
  }

  .whois-raw-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
