/* 在线留言组件 —— 浮动按钮 + 弹窗表单 */
/* 本组件按 border-box 设计，需显式声明以覆盖 legacy.css 的 content-box 还原 */
.msg-launcher,.msg-launcher *,.msg-panel,.msg-panel *{box-sizing:border-box;}

.msg-launcher{position:fixed;right:18px;bottom:22px;z-index:9000;display:inline-flex;align-items:center;gap:7px;
  padding:11px 18px;border:0;border-radius:999px;cursor:pointer;
  background:#E37B01;color:#fff;font-size:14px;font-weight:600;line-height:1;
  box-shadow:0 6px 18px rgba(83,6,0,.32);transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;}
.msg-launcher:hover{transform:translateY(-2px);box-shadow:0 9px 22px rgba(83,6,0,.4);}
.msg-launcher:active{transform:translateY(0);}
.msg-launcher.is-hidden{opacity:0;pointer-events:none;transform:translateY(10px);}
.msg-launcher-ico{font-size:15px;}
.msg-launcher-txt{white-space:nowrap;}

.msg-panel{position:fixed;right:18px;bottom:22px;z-index:9100;width:360px;max-width:calc(100vw - 24px);
  max-height:calc(100vh - 44px);overflow-y:auto;
  background:#fffaf0;border:1px solid #e6cfae;border-radius:14px;padding:18px 18px 16px;
  box-shadow:0 18px 48px rgba(83,6,0,.28);
  opacity:0;visibility:hidden;transform:translateY(14px) scale(.98);
  transition:opacity .2s ease,transform .2s ease,visibility .2s;}
.msg-panel.is-open{opacity:1;visibility:visible;transform:translateY(0) scale(1);}
body.msg-locked{overflow:hidden;}

.msg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px;}
.msg-title{font-size:17px;font-weight:700;color:#530600;}
.msg-close{background:none;border:0;font-size:24px;line-height:1;color:#9b8272;cursor:pointer;padding:0 2px;}
.msg-close:hover{color:#530600;}
.msg-sub{margin:0 0 14px;font-size:12px;line-height:1.7;color:#7a6255;}

.msg-field{margin-bottom:11px;}
.msg-label{display:block;margin-bottom:5px;font-size:12px;font-weight:600;color:#5b1b00;}
.msg-input,.msg-textarea{width:100%;box-sizing:border-box;padding:9px 11px;
  border:1px solid #e0c9a8;border-radius:8px;background:#fff;
  font:13px/1.5 Arial,"Helvetica Neue",Helvetica,"PingFang SC","Microsoft YaHei",sans-serif;color:#3a2a22;}
.msg-textarea{resize:vertical;min-height:84px;}
.msg-input:focus,.msg-textarea:focus{outline:0;border-color:#E37B01;box-shadow:0 0 0 3px rgba(227,123,1,.14);}

.msg-tip{font-size:12px;line-height:1.6;min-height:18px;margin:2px 0 8px;color:#7a6255;}
.msg-tip.is-bad{color:#c0392b;}
.msg-tip.is-ok{color:#1e7c3a;font-weight:600;}

.msg-actions{display:flex;gap:9px;justify-content:flex-end;}
.msg-submit,.msg-cancel{border:0;border-radius:8px;padding:9px 18px;font-size:13px;font-weight:600;cursor:pointer;}
.msg-submit{background:#E37B01;color:#fff;}
.msg-submit:hover{background:#c96b01;}
.msg-submit:disabled{background:#d8c3a5;cursor:not-allowed;}
.msg-cancel{background:#f2e4cd;color:#6b5240;}
.msg-cancel:hover{background:#e8d6b8;}

@media (max-width:640px){
  .msg-launcher{right:12px;bottom:14px;padding:10px 15px;font-size:13px;}
  .msg-panel{right:0;left:0;bottom:0;width:100%;max-width:100%;max-height:88vh;
    border-radius:16px 16px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));}
  .msg-actions{justify-content:stretch;}
  .msg-submit,.msg-cancel{flex:1;text-align:center;}
}
