/* Distantec dns page styles. Extracted from index.html for caching and CSP readiness. */
:root {
  --bg: #0a0a0f;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #8b5cf6;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
}

body {
  min-height: 100vh;
  display: block;
  align-items: unset;
  justify-content: unset;
  padding: 0 0 4rem;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(99,102,241,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(139,92,246,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(59,130,246,0.08) 0%, transparent 50%);
  color: var(--text);
}


.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.input-box {
  min-width: 0;
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-box:focus { border-color: #6366f1; }
.input-box::placeholder { color: #4b5563; }

.btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

/* Record type toggles */
.type-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.type-btn,
.select-all {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.select-all {
  font-family: inherit;
  color: #c4b5fd;
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.18);
}

.type-btn:hover,
.select-all:hover { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }

.type-btn.active {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.3);
  color: #a5b4fc;
}

    /* Results */
    .result-area {
      display: none;
      flex-direction: column;
      gap: 1rem;
    }
    .result-area.visible { display: flex; }

    .loading {
      text-align: center;
      padding: 3rem;
      color: #64748b;
    }
    .loading .spinner {
      display: inline-block;
      width: 32px; height: 32px;
      border: 3px solid rgba(255,255,255,0.1);
      border-top-color: #818cf8;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin-bottom: 1rem;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .summary {
      font-size: 0.85rem;
      color: #64748b;
      margin-bottom: 0.5rem;
    }

    /* Record type section */
    .record-section {
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      overflow: hidden;
      animation: fadeIn 0.3s ease;
    }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

    .record-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.9rem 1.25rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      cursor: pointer;
      transition: background 0.2s;
    }
    .record-header:hover { background: rgba(255,255,255,0.02); }

    .record-type-label {
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }

    .type-badge {
      background: rgba(129, 140, 248, 0.15);
      border: 1px solid rgba(129, 140, 248, 0.25);
      color: #a5b4fc;
      padding: 0.2rem 0.6rem;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 700;
      font-family: 'JetBrains Mono', monospace;
      letter-spacing: 0.05em;
    }

    .record-count {
      font-size: 0.8rem;
      color: #64748b;
    }

    .record-chevron {
      color: #4b5563;
      transition: transform 0.2s;
      font-size: 0.8rem;
    }
    .record-section.collapsed .record-chevron { transform: rotate(-90deg); }

    .record-body {
      padding: 0.75rem 1.25rem 1rem;
    }
    .record-section.collapsed .record-body { display: none; }

    /* Record table */
    .record-table {
      width: 100%;
      border-collapse: collapse;
    }

    .record-table th {
      text-align: left;
      font-size: 0.7rem;
      color: #4b5563;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 600;
      padding: 0.4rem 0.6rem;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    .record-table td {
      font-size: 0.85rem;
      color: #cbd5e1;
      padding: 0.5rem 0.6rem;
      font-family: 'JetBrains Mono', 'Consolas', monospace;
      border-bottom: 1px solid rgba(255,255,255,0.02);
      word-break: break-all;
    }

    .record-table tr:last-child td { border-bottom: none; }

    .record-table td.ip { color: #a5b4fc; }
    .record-table td.ttl { color: #64748b; font-size: 0.78rem; }
    .record-table td.target { color: #86efac; }

    .no-records {
      color: #4b5563;
      font-size: 0.85rem;
      font-style: italic;
      padding: 0.5rem 0;
    }

    /* Raw view */
    .view-toggle {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 0.75rem;
      justify-content: flex-end;
    }
    .view-btn {
      padding: 0.3rem 0.7rem;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,0.08);
      background: transparent;
      color: #4b5563;
      font-size: 0.72rem;
      cursor: pointer;
      transition: all 0.2s;
    }
    .view-btn.active { background: rgba(129,140,248,0.1); border-color: rgba(129,140,248,0.2); color: #a5b4fc; }

    .raw-output {
      display: none;
      background: rgba(0,0,0,0.35);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 14px;
      padding: 1.25rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.82rem;
      color: #94a3b8;
      white-space: pre-wrap;
      line-height: 1.7;
      max-height: 500px;
      overflow-y: auto;
    }
    .raw-output.visible { display: block; }


.record-description { color: #94a3b8; font-size: 0.85rem; }
.record-meta { display: flex; align-items: center; gap: 0.75rem; }
.error-box { color: #f87171; padding: 1rem; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); border-radius: 12px; }
.record-table { display: block; overflow-x: auto; }
.record-table thead, .record-table tbody { display: table; width: 100%; }


@media (max-width: 600px) {
  .search-box { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .record-table td, .record-table th { font-size: 0.75rem; padding: 0.35rem 0.4rem; }
}


/* Local visibility utility; avoids stale cached /css/common.css keeping loaders visible. */
.is-hidden { display: none !important; }
