/* =========================================================================
   通用询盘弹窗（外贸机械站风格）
   品牌绿 #26684a / 深绿 #1c5239 / 点缀黄 #f7ea16
   钩子类名与 id 保持不变，供 inquiry.js 调用
   ========================================================================= */
:root{
  --green:#26684a;
  --green-d:#1c5239;
  --green-l:#eef5f1;
  --yellow:#f7ea16;
  --ink:#1b2733;
  --text:#46525e;
  --muted:#8a96a3;
  --line:#e4ebe7;
  --bg:#f7faf8;
  --red:#c62828;
  --red-bg:#fdecea;
  --green-ok:#2e7d32;
  --green-ok-bg:#eaf6ec;
}

/* ---------------- 遮罩 ---------------- */
#yd-inquiry-box {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(10, 28, 24, .56);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; box-sizing: border-box;
}
#yd-inquiry-box.is-on { display: flex; }
body.yd-modal-open { overflow: hidden; }

/* ---------------- 面板 ---------------- */
.yd-inquiry-panel {
  position: relative; width: 500px; max-width: 94%; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 20px; padding: 0 0 26px;
  box-shadow: 0 30px 70px rgba(8, 30, 25, .35);
  animation: ydInqIn .32s cubic-bezier(.22,.9,.34,1.15);
}
@keyframes ydInqIn{
  from{ opacity:0; transform: translateY(20px) scale(.96); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

/* 顶部品牌色标题区 */
.yd-inq-head {
  position: relative; margin: 0 0 22px; padding: 26px 28px 20px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  border-radius: 20px 20px 0 0;
}
.yd-inq-head::after{
  content:""; position:absolute; left:28px; bottom:0; width:46px; height:3px;
  background: var(--yellow); border-radius:3px;
}
.yd-inq-head h3 {
  font-size: 22px; color: #fff; margin: 0 0 7px; font-weight: 700; letter-spacing: .01em;
  text-transform: uppercase;
}
.yd-inq-head p { font-size: 13px; color: rgba(255,255,255,.85); margin: 0; line-height: 1.6; }

.yd-inq-close {
  position: absolute; top: 18px; right: 18px; width: 34px; height: 34px;
  border: none; background: rgba(255,255,255,.16); border-radius: 50%;
  font-size: 19px; line-height: 1; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .25s ease, transform .25s ease;
}
.yd-inq-close:hover { background: rgba(255,255,255,.3); transform: rotate(90deg); }

/* ---------------- 表单 ---------------- */
#yd-inquiry-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px;
  padding: 0 28px;
}
.yd-field { margin-bottom: 0; }
.yd-field:nth-of-type(5),
.yd-field:nth-of-type(6),
.yd-inq-foot { grid-column: 1 / -1; }

.yd-field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px;
}
.yd-field label i { color: #e03a3a; font-style: normal; margin-left: 2px; }

.yd-field input,
.yd-field select,
.yd-field textarea {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; color: var(--ink); background: var(--bg); outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.yd-field input::placeholder,
.yd-field textarea::placeholder { color: var(--muted); }
.yd-field input:focus,
.yd-field select:focus,
.yd-field textarea:focus {
  border-color: var(--green); background: #fff;
  box-shadow: 0 0 0 3px rgba(38, 104, 74, .13);
}
.yd-field textarea { resize: vertical; min-height: 108px; line-height: 1.6; }

/* ---------------- 提交按钮 ---------------- */
.yd-inq-foot { margin-top: 4px; text-align: center; }
.yd-inq-foot button {
  width: 100%; background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  color: #fff; border: none; border-radius: 500px;
  padding: 14px 30px; font-size: 15px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 12px 24px rgba(38, 104, 74, .3);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.yd-inq-foot button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(38, 104, 74, .38); filter: brightness(1.06); }
.yd-inq-foot button:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.yd-inq-foot small { display: block; margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* ---------------- 提示条 ---------------- */
.yd-inq-success, .yd-inq-error {
  display: none; padding: 12px 15px; border-radius: 10px; font-size: 13px; margin: 0 28px 16px; line-height: 1.6;
}
.yd-inq-success.is-on, .yd-inq-success[style*="block"] { display: block; background: var(--green-ok-bg); color: var(--green-ok); }
.yd-inq-error.is-on, .yd-inq-error[style*="block"] { display: block; background: var(--red-bg); color: var(--red); }

.yd-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 窄屏回退单列 */
@media (max-width: 480px){
  .yd-inquiry-panel{ padding-bottom: 22px; }
  .yd-inq-head{ padding: 22px 22px 18px; }
  #yd-inquiry-form{ grid-template-columns: 1fr; padding: 0 22px; }
  .yd-inq-success, .yd-inq-error{ margin: 0 22px 14px; }
}
