/**
 * cb 全站询盘弹窗（layui layer 内容样式 + 触发按钮）
 * 说明：不依赖 Tailwind 编译，独立引入，避免新增 utility class 被 purge 掉。
 * 触发来源：① 按钮式 CTA（href 指向 /page/contactus.html 且 class 含 inline-flex）
 *          ② Header「Get a Quote」、移动端菜单按钮  ③ 右侧悬浮 fa-comment-dots
 */

:root {
  --inq-red: #dc2626;
  --inq-red-dark: #b91c1c;
  --inq-ink: #111827;
  --inq-body: #4b5563;
  --inq-muted: #6b7280;
  --inq-line: #e5e7eb;
  --inq-soft: #f9fafb;
  --inq-radius: 16px;
}

/* 未打开时隐藏（layer 会把它搬进弹层，关闭后恢复隐藏） */
.inq-hidden {
  display: none !important;
}

/* ===================== 触发按钮 ===================== */
.inq-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--inq-red);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.inq-cta:hover {
  background: var(--inq-red-dark);
  box-shadow: 0 8px 18px -8px rgba(220, 38, 38, .65);
}

.inq-cta:focus-visible {
  outline: 2px solid var(--inq-red);
  outline-offset: 2px;
}

/* Header 按钮：宽屏显示（< 1280px 收起，改由汉堡菜单里的按钮承担，避免挤压导航） */
.inq-cta--header {
  display: none;
}

@media (min-width: 1280px) {
  .inq-cta--header {
    display: inline-flex;
    margin-right: 8px;
  }
}

/* 移动端菜单内的通栏按钮（右侧留出 44px，避免被固定悬浮工具条压住） */
.inq-cta--menu {
  display: flex;
  width: calc(100% - 44px);
  margin-top: 16px;
  padding: 13px 20px;
  border-radius: 12px;
}

/* ===================== Header 导航微调 =====================
   新增「Get a Quote」按钮后，导航可用宽度变窄，需要：
   ① 导航文字不换行（避免 "About us" 折成两行）
   ② 收紧项间距（!important 覆盖 tailwind 的 space-x-8 = 2rem）
   ================================================================= */
.site-nav a {
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .site-nav > * + * {
    margin-left: 1.25rem !important;
  }
}

@media (min-width: 1536px) {
  .site-nav > * + * {
    margin-left: 2rem !important;
  }
}

/* ===================== 弹层外壳 ===================== */
.layui-layer.inq-layer {
  border-radius: 18px !important;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45), 0 0 0 1px rgba(15, 23, 42, .04) !important;
}

.layui-layer.inq-layer .layui-layer-content {
  padding: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ===================== 弹窗内容 ===================== */
.inq-panel {
  position: relative;
  padding: 34px 34px 30px;
  background: #fff;
  font-family: inherit;
  color: var(--inq-body);
  text-align: left;
}

.inq-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--inq-line);
  border-radius: 50%;
  background: #fff;
  color: var(--inq-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.inq-close:hover {
  color: var(--inq-red);
  border-color: rgba(220, 38, 38, .45);
  background: #fef2f2;
}

.inq-head {
  padding: 0 24px;
  text-align: center;
}

.inq-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--inq-ink);
  letter-spacing: -.2px;
}

.inq-sub {
  margin: 0 auto 24px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--inq-muted);
}

/* 表单卡片 */
.inq-form {
  padding: 24px;
  border: 1px solid #eef0f3;
  border-radius: var(--inq-radius);
  background: var(--inq-soft);
}

.inq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.inq-field {
  margin-bottom: 18px;
}

.inq-grid .inq-field {
  margin-bottom: 0;
}

.inq-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--inq-body);
  letter-spacing: .1px;
}

.inq-label .inq-req {
  color: var(--inq-red);
  margin-left: 2px;
}

.inq-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid var(--inq-line);
  border-radius: 10px;
  background: #fff;
  color: var(--inq-ink);
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.inq-input::placeholder {
  color: #9ca3af;
}

.inq-input:hover {
  border-color: #d1d5db;
}

.inq-input:focus {
  outline: none;
  border-color: var(--inq-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.inq-textarea {
  min-height: 112px;
  resize: vertical;
}

/* 提交按钮 */
.inq-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 22px;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--inq-red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.inq-submit:hover {
  background: var(--inq-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(220, 38, 38, .8);
}

.inq-submit:active {
  transform: translateY(0);
}

.inq-submit:disabled {
  opacity: .72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 状态提示（空时不占位） */
.inq-msg {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--inq-muted);
}

.inq-msg:empty {
  display: none;
}

.inq-msg.is-error {
  color: var(--inq-red);
}

.inq-msg.is-ok {
  color: #16a34a;
}

/* ===================== 响应式 ===================== */
@media (max-width: 767px) {
  .inq-panel {
    padding: 28px 20px 22px;
  }

  .inq-head {
    padding: 0 16px;
  }

  .inq-title {
    font-size: 22px;
  }

  .inq-sub {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .inq-form {
    padding: 18px;
  }

  .inq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 0;
  }

  .inq-grid .inq-field {
    margin-bottom: 16px;
  }

  .inq-field {
    margin-bottom: 16px;
  }
}
