/* ═══════════════════════════════════════════════════════════════════
   NAMEHUB.IO — Tools Page CSS
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────────────── */
.tools-hero {
  padding: 5rem 0 3rem;
  text-align: center;
}
.tools-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: .75rem;
  line-height: 1.15;
}
.tools-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ── Tool grid ─────────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .875rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1rem 1rem;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  user-select: none;
}
.tool-card:hover {
  border-color: var(--border-hov);
  background: var(--card-hov);
  transform: translateY(-2px);
}
.tool-card.active {
  border-color: var(--p1);
  background: rgba(99,102,241,.08);
  box-shadow: 0 0 0 1px var(--p1);
}
.tool-card.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.tool-icon {
  width: 36px;
  height: 36px;
  background: rgba(99,102,241,.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p3);
}
.tool-icon svg { width: 17px; height: 17px; }

.tool-card h3 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.tool-card-desc {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}

.tool-badge-free {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  background: rgba(16,185,129,.15);
  color: var(--green);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 20px;
  padding: 1px 7px;
  align-self: flex-start;
}
.tool-badge-disabled {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  background: rgba(100,116,139,.1);
  color: var(--dim);
  border: 1px solid rgba(100,116,139,.2);
  border-radius: 20px;
  padding: 1px 7px;
  align-self: flex-start;
}

/* ── Active tool panel ─────────────────────────────────────────────── */
.tool-panel {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  display: none;
  animation: panelIn .2s ease;
}
.tool-panel.open { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.tool-panel-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.tool-panel-icon {
  width: 42px;
  height: 42px;
  background: rgba(99,102,241,.15);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p3);
  flex-shrink: 0;
}
.tool-panel-icon svg { width: 20px; height: 20px; }
.tool-panel-title { font-size: 1.1rem; font-weight: 700; }
.tool-panel-desc  { color: var(--muted); font-size: .85rem; }

.tool-input-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.tool-input-row .tool-field {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: .65rem 1rem;
  font-size: .92rem;
  transition: border-color .2s;
  outline: none;
  min-width: 0;
}
.tool-input-row .tool-field:focus {
  border-color: var(--p1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.tool-input-row textarea.tool-field {
  resize: vertical;
  min-height: 100px;
  font-family: 'Consolas', monospace;
  font-size: .84rem;
  line-height: 1.5;
}
.tool-run-btn {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: .65rem 1.35rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: opacity .2s, transform .1s;
  flex-shrink: 0;
}
.tool-run-btn:hover   { opacity: .9; }
.tool-run-btn:active  { transform: scale(.97); }
.tool-run-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Results ───────────────────────────────────────────────────────── */
.tool-results {
  margin-top: 1.25rem;
  min-height: 0;
}

/* Loading */
.tool-loading {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--muted);
  font-size: .9rem;
  padding: 1rem 0;
}
.tool-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--p1);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.tool-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
  font-size: .88rem;
}

/* Info cards */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}
.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .7rem .9rem;
}
.result-card .rc-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--dim);
  margin-bottom: .25rem;
}
.result-card .rc-value {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.rc-value.ok      { color: var(--green); }
.rc-value.warn    { color: var(--gold); }
.rc-value.danger  { color: var(--red); }

/* Tags / status pills */
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tag-pill {
  display: inline-block;
  font-size: .73rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  background: rgba(99,102,241,.12);
  color: var(--p3);
  border: 1px solid rgba(99,102,241,.25);
}
.tag-pill.green { background: rgba(16,185,129,.12); color: var(--green); border-color: rgba(16,185,129,.25); }
.tag-pill.red   { background: rgba(239,68,68,.1);   color: #f87171;     border-color: rgba(239,68,68,.2); }
.tag-pill.gold  { background: rgba(245,158,11,.1);  color: var(--gold); border-color: rgba(245,158,11,.2); }
.tag-pill.dim   { background: rgba(100,116,139,.1); color: var(--dim);  border-color: rgba(100,116,139,.2); }

/* Table */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.result-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .4rem .75rem;
  border-bottom: 1px solid var(--border);
}
.result-table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text);
  vertical-align: middle;
  word-break: break-all;
}
.result-table tr:last-child td { border-bottom: none; }
.result-table .mono { font-family: 'Consolas', monospace; font-size: .82rem; }

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  flex-shrink: 0;
}
.status-dot.green  { background: var(--green); box-shadow: 0 0 6px rgba(16,185,129,.6); }
.status-dot.red    { background: var(--red);   box-shadow: 0 0 6px rgba(239,68,68,.6); }
.status-dot.gold   { background: var(--gold);  box-shadow: 0 0 6px rgba(245,158,11,.5); }
.status-dot.gray   { background: var(--dim); }

/* Grade badge */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 800;
}
.grade-A { background: rgba(16,185,129,.15); color: var(--green); border: 2px solid rgba(16,185,129,.4); }
.grade-B { background: rgba(6,182,212,.12);  color: var(--cyan);  border: 2px solid rgba(6,182,212,.3); }
.grade-C { background: rgba(245,158,11,.1);  color: var(--gold);  border: 2px solid rgba(245,158,11,.3); }
.grade-F { background: rgba(239,68,68,.1);   color: var(--red);   border: 2px solid rgba(239,68,68,.3); }

/* Expiry urgency bar */
.expiry-bar-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
  margin-bottom: .75rem;
}
.expiry-days-big {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .25rem;
}
.expiry-days-big.ok      { color: var(--green); }
.expiry-days-big.soon    { color: var(--cyan); }
.expiry-days-big.warning { color: var(--gold); }
.expiry-days-big.critical{ color: var(--red); }
.expiry-days-big.expired { color: var(--red); }

/* Propagation resolver list */
.prop-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.prop-row:last-child { border-bottom: none; }
.prop-resolver { min-width: 110px; font-weight: 500; font-size: .88rem; }
.prop-ips  { flex: 1; font-family: 'Consolas', monospace; font-size: .82rem; color: var(--muted); }
.prop-ms   { color: var(--dim); font-size: .78rem; min-width: 50px; text-align: right; }

/* Wayback snapshot list */
.snap-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .45rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.snap-item:last-child { border-bottom: none; }
.snap-date { min-width: 80px; font-size: .83rem; font-weight: 500; }
.snap-link { color: var(--p3); font-size: .8rem; }
.snap-link:hover { text-decoration: underline; }

/* Result section heading */
.result-section {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--dim);
  font-weight: 600;
  margin: 1rem 0 .5rem;
}

/* WHOIS registrant block */
.whois-registrant {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .6rem .9rem;
  font-size: .85rem;
  margin-bottom: .75rem;
}

/* Notice box */
.tool-notice {
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--r-sm);
  padding: .6rem .9rem;
  font-size: .8rem;
  color: var(--muted);
  margin-top: .75rem;
}

/* Response time */
.result-ms {
  font-size: .75rem;
  color: var(--dim);
  text-align: right;
  margin-top: .5rem;
}

/* Availability status inline */
.avail-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.avail-row:last-child { border-bottom: none; }
.avail-domain { flex: 1; font-size: .88rem; font-weight: 500; }
.avail-status { font-size: .8rem; font-weight: 600; }
.avail-status.available { color: var(--green); }
.avail-status.taken     { color: var(--red); }
.avail-status.unknown   { color: var(--dim); }

/* ── Tool card: individual page link ─────────────────────────────────── */
.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: auto;
  font-size: .74rem;
  color: var(--p3);
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s;
}
.tool-card-link:hover { opacity: 1; text-decoration: underline; }

/* ── Single tool page: breadcrumb ────────────────────────────────────── */
.tool-single-breadcrumb {
  margin-bottom: 1.25rem;
}
.tool-single-breadcrumb a {
  color: var(--p3);
  font-size: .85rem;
  text-decoration: none;
}
.tool-single-breadcrumb a:hover { text-decoration: underline; }

/* ── Single tool page: large icon ────────────────────────────────────── */
.tool-single-icon {
  width: 56px;
  height: 56px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.tool-single-icon svg {
  width: 26px;
  height: 26px;
  color: var(--p3);
}

/* ── Recent searches ─────────────────────────────────────────────────── */
.recent-searches {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .6rem 0 .25rem;
}
.recent-label {
  font-size: .74rem;
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.recent-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .2rem .65rem;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.recent-chip:hover {
  border-color: var(--p1);
  color: var(--fg);
}

/* ── Single tool page: SEO content section ───────────────────────────── */
.tool-seo-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.tool-seo-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.tool-seo-section p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.tool-faq { margin-top: 2rem; }
.tool-faq h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.faq-item { margin-bottom: 1.1rem; }
.faq-item h3 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .3rem;
}
.faq-item p {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Other tools grid (on single page) ───────────────────────────────── */
.other-tools {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.other-tools h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-size: .78rem; }
.other-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.other-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .4rem .8rem;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.other-tool-chip:hover { border-color: var(--p1); color: var(--fg); }

/* ── Availability: IDS-style search bar ──────────────────────────── */
.avail-input-row {
  position: relative;
  align-items: center;
}
.avail-search-icon {
  position: absolute;
  left: 1rem;
  width: 17px;
  height: 17px;
  color: var(--dim);
  pointer-events: none;
  flex-shrink: 0;
}
.avail-search-input {
  padding-left: 2.6rem !important;
  font-size: 1rem !important;
  height: 48px;
}
.avail-input-row .tool-run-btn {
  height: 48px;
  padding: 0 1.5rem;
  font-size: .95rem;
}

/* ── Availability: summary bar ───────────────────────────────────── */
.avail-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: .875rem;
  font-size: .82rem;
  font-weight: 500;
  padding: .1rem 0;
}
.avail-sum-avail { color: #22c55e; }
.avail-sum-taken { color: #f87171; }
.avail-sum-unk   { color: var(--dim); }
.avail-sum-avail b,
.avail-sum-taken b,
.avail-sum-unk b { font-weight: 700; }

/* ── Availability: 3-column grid ─────────────────────────────────── */
.avail-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .45rem;
  margin-bottom: .875rem;
}

.avail-card {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .5rem .7rem;
  transition: border-color .15s;
  min-width: 0;
}
.avail-card:hover { border-color: var(--border-hov); }
.avail-card-primary {
  border-color: rgba(99,102,241,.4);
  background: rgba(99,102,241,.05);
}

.avail-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.avail-dot-green { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,.5); }
.avail-dot-red   { background: #f87171; box-shadow: 0 0 5px rgba(248,113,113,.5); }
.avail-dot-gray  { background: var(--dim); }

.avail-card-domain {
  flex: 1;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.avail-card-meta {
  font-size: .7rem;
  color: var(--dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.avail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: .28rem .6rem;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .15s, transform .1s;
  line-height: 1;
}
.avail-btn:hover  { opacity: .85; }
.avail-btn:active { transform: scale(.96); }
.avail-btn-register { background: #16a34a; color: #fff; }
.avail-btn-taken    { background: #dc2626; color: #fff; }
.avail-btn-unknown  { background: rgba(100,116,139,.15); color: var(--dim); border: 1px solid var(--border); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-input-row { flex-direction: column; }
  .tool-run-btn { width: 100%; justify-content: center; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .avail-grid-3col { grid-template-columns: repeat(2, 1fr); }
  .avail-input-row { flex-direction: row !important; }
  .avail-input-row .tool-run-btn { width: auto; }
}
@media (max-width: 420px) {
  .avail-grid-3col { grid-template-columns: 1fr; }
}
