/* NALIDE Domains 品牌外壳与 Whois 美化 —— 注入到 FRED WebWhois（whois.nalide.com）
   与主站 nalide.com 同一套视觉：主色 #005dff、渐变 #ba89ff→#005dff、底 #f5f5f5、
   卡片 #fafafa/白、圆角 18px、胶囊 100px。本文件由 renderer 注入 <link> 加载，
   位于应用自带 CSS 之后，同等权重下覆盖生效。 */

/* ---------- 基础 ---------- */
body {
  background: #f5f5f5 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  color: #3f4147;
}

/* 应用根容器与主站 .wrap 对齐 */
#__nuxt > div {
  max-width: 1120px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* 隐藏应用自带的 CZ.NIC 页眉（由下方 NALIDE 顶栏替代；代价：语言切换钮随之隐藏，
   默认语言为简体中文，en/cs 仍可经浏览器语言协商访问） */
#__nuxt > div > header {
  display: none !important;
}

/* ---------- NALIDE 顶栏（注入） ---------- */
.nl-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid #eeeeee;
  backdrop-filter: blur(6px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}
.nl-topbar *, .nl-footer * { box-sizing: border-box; }
.nl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.nl-topbar .nl-wrap {
  display: flex; align-items: center; gap: 28px; min-height: 64px;
}
.nl-brand {
  display: flex; align-items: baseline; gap: 7px;
  color: #202020; text-decoration: none; white-space: nowrap;
}
.nl-brand:hover { text-decoration: none; }
.nl-brand b { font-size: 23px; font-weight: 800; letter-spacing: .3px; color: #202020; }
.nl-brand span { font-size: 19px; font-weight: 500; color: #005dff; }
.nl-nav { display: flex; gap: 24px; margin-left: auto; flex-wrap: wrap; }
.nl-nav a { color: #202020; font-size: 15px; text-decoration: none; }
.nl-nav a:hover { color: #005dff; text-decoration: none; }
.nl-btn {
  display: inline-block; border: 0; cursor: pointer;
  background: #005dff; color: #fff !important;
  font-size: 15px; font-weight: 600;
  padding: 10px 24px; border-radius: 100px;
  white-space: nowrap; text-decoration: none; transition: opacity .15s ease;
  margin-left: 4px;
}
.nl-btn:hover { opacity: .9; text-decoration: none; }

/* ---------- NALIDE 页脚（注入） ---------- */
.nl-footer {
  border-top: 1px solid #eeeeee;
  padding: 44px 0 32px;
  color: #6b7280; font-size: 14px; line-height: 1.7;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  margin-top: 24px;
}
.nl-footer .nl-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px;
}
.nl-footer h4 { margin: 0 0 10px; color: #202020; font-size: 15px; font-weight: 700; }
.nl-footer p { margin: 0 0 10px; }
.nl-footer .nl-addr { font-size: 13px; }
.nl-footer ul { list-style: none; margin: 0; padding: 0; }
.nl-footer li { margin: 6px 0; }
.nl-footer a { color: #6b7280; text-decoration: none; }
.nl-footer a:hover { color: #005dff; text-decoration: underline; }
.nl-footer .nl-bottom {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid #eeeeee; font-size: 13px;
}

/* ---------- 查询区 ---------- */
/* Hero 区块（h1 的父容器）点阵底，与主站 hero 一致 */
#__nuxt div:has(> h1.tref-search-header) {
  background-image: radial-gradient(#dcdcdc 1.1px, transparent 1.1px);
  background-size: 22px 22px;
}
.tref-search-header {
  font-size: 32px !important;
  color: #202020 !important;
  font-weight: 800 !important;
  letter-spacing: .5px;
  line-height: 1.25 !important;
}

/* 胶囊查询框：白底、整圆、内嵌主色按钮（与主站 .searchbox 同款） */
.tref-requests-searchbar {
  height: 60px !important;
  max-width: 896px !important;
  padding: 5px 5px 5px 24px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 100px !important;
  box-shadow: 0 1px 3px rgba(32, 32, 32, .05) !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}
.tref-requests-searchbar:focus-within {
  border-color: #005dff !important;
  box-shadow: 0 0 0 4px rgba(0, 93, 255, .12) !important;
}
.tref-requests-searchbar input.tref-all-searchbar-input {
  font-size: 17px !important;
  color: #1a1a1a !important;
}
.tref-requests-searchbar input.tref-all-searchbar-input::placeholder {
  color: #9ca3af !important;
}
.tref-requests-searchbar button {
  background: #005dff !important;
  border-radius: 100px !important;
  height: 48px !important;
  padding: 0 20px !important;
  margin-left: 10px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  cursor: pointer;
  flex: none;
  transition: opacity .15s ease;
}
.tref-requests-searchbar button:hover { opacity: .9; }
.tref-requests-searchbar button:disabled { opacity: .5; cursor: not-allowed; }
.tref-requests-searchbar button img {
  filter: brightness(0) invert(1);
  height: 20px !important;
  width: auto !important;
}
.tref-requests-searchbar button::after {
  content: "查询";
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

/* 未查询时的说明区 → 白色卡片 */
.tref-search-inactive-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 28px 34px !important;
  max-width: 896px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px !important;
  line-height: 1.75 !important;
  color: #3f4147 !important;
  box-shadow: 0 8px 24px rgba(32, 32, 32, .05);
}
.tref-search-inactive-container p { margin: 6px 0; }
.tref-search-inactive-container a {
  color: #005dff !important;
  text-decoration: none !important;
}
.tref-search-inactive-container a:hover { text-decoration: underline !important; }

/* ---------- 查询结果 ---------- */
/* 域名大字条 */
.tref-search-domain-fqdn-handle {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 14px 22px !important;
  color: #202020 !important;
  box-shadow: 0 8px 24px rgba(32, 32, 32, .05);
}

/* 顶部四格状态卡（注册时间/上次更新/到期日期/DNSSEC） */
#__nuxt div:has(> .tref-search-domain-fqdn-handle) div.grid > div {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  gap: 6px !important;
}
#__nuxt div:has(> .tref-search-domain-fqdn-handle) div.grid > div > div:first-child {
  color: #6b7280 !important;
  font-size: 14px !important;
}
#__nuxt div:has(> .tref-search-domain-fqdn-handle) div.grid > div > div.font-semibold {
  color: #202020 !important;
  font-size: 21px !important;
}

/* 明细表 → 白色卡片：标签弱化、数值加重（域名/联系人/NS集/注册商详情通用） */
#__nuxt div.overflow-hidden:has(> table) {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(32, 32, 32, .04);
}
#__nuxt div.overflow-hidden > table td {
  font-size: 16px !important;
  line-height: 1.65 !important;
  border-color: #eef0f3 !important;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}
#__nuxt div.overflow-hidden > table td.bg-secondary {
  background: #fafafa !important;
  color: #6b7280 !important;
  font-size: 15px !important;
  font-weight: 500;
  padding-left: 18px !important;
  padding-right: 12px !important;
}
#__nuxt div.overflow-hidden > table td a {
  color: #005dff !important;
  font-weight: 600;
  text-decoration: none !important;
}
#__nuxt div.overflow-hidden > table td a:hover { text-decoration: underline !important; }

/* 下载证明按钮 → 主色描边胶囊 */
#__nuxt .p-button.p-button-outlined {
  border: 1px solid #005dff !important;
  color: #005dff !important;
  background: #fff !important;
  border-radius: 100px !important;
  font-weight: 600;
}
#__nuxt .p-button.p-button-outlined:hover { background: #eef4ff !important; }

/* ---------- 未找到记录 ---------- */
.tref-search-empty-results {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 30px 34px !important;
  max-width: 896px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 8px 24px rgba(32, 32, 32, .05);
}
.tref-search-empty-results h2 { color: #202020 !important; }
.tref-search-not-found-search-key {
  background: #fafafa !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  color: #202020 !important;
  padding: 10px 18px !important;
}
.tref-search-empty-results::after {
  content: "该名称尚未被注册。回到注册局首页查名，即可注册这个域名。";
  color: #6b7280;
  font-size: 15px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .nl-topbar .nl-wrap {
    flex-wrap: wrap; gap: 0 16px; min-height: 0;
    padding-top: 10px; padding-bottom: 10px;
  }
  .nl-topbar .nl-btn { margin-left: auto; flex-shrink: 0; }
  .nl-nav {
    order: 3; flex-basis: 100%; margin-left: 0; margin-top: 8px;
    gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  .nl-nav::-webkit-scrollbar { display: none; }
  .nl-footer .nl-cols { grid-template-columns: 1fr; }
  .tref-search-header { font-size: 28px !important; }
  .tref-requests-searchbar {
    height: 56px !important;
    padding-left: 16px !important;
  }
  .tref-requests-searchbar button {
    height: 44px !important;
    padding: 0 16px !important;
  }
  .tref-requests-searchbar input.tref-all-searchbar-input { font-size: 16px !important; }
  .tref-search-inactive-container { padding: 22px 20px !important; }
  .tref-search-empty-results { padding: 22px 20px !important; }
}
@media (min-width: 768px) {
  .tref-search-header { font-size: 44px !important; }
}
