.jh-popup-source { display: none !important; }

.layui-layer.jh-domain-popup {
  display: flex;
  width: min(360px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 24px);
  box-sizing: border-box;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe1f7;
  border-radius: 18px !important;
  box-shadow: 0 22px 60px rgba(27, 49, 89, 0.22) !important;
}

.jh-domain-popup .layui-layer-title {
  height: 52px;
  padding: 0 50px 0 18px;
  overflow: hidden;
  color: #1b3159;
  font-size: 15px;
  font-weight: 750;
  line-height: 52px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(135deg, #f7f8ff, #eef1ff);
  border-bottom: 1px solid #e2e6f5;
}

.jh-domain-popup .layui-layer-setwin {
  top: 11px;
  right: 12px;
  width: 30px;
  height: 30px;
}

.jh-domain-popup .layui-layer-setwin .layui-layer-close1 {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  background: #fff !important;
  border: 1px solid #dce2f7;
  border-radius: 50%;
  opacity: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.jh-domain-popup .layui-layer-setwin .layui-layer-close1::before,
.jh-domain-popup .layui-layer-setwin .layui-layer-close1::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  background: #7f8da8;
  border-radius: 2px;
  content: "";
}

.jh-domain-popup .layui-layer-setwin .layui-layer-close1::before { transform: rotate(45deg); }
.jh-domain-popup .layui-layer-setwin .layui-layer-close1::after { transform: rotate(-45deg); }

.jh-domain-popup .layui-layer-setwin .layui-layer-close1:hover {
  background: #eef1ff !important;
  border-color: #bdc8f5;
  transform: rotate(6deg);
}

.jh-domain-popup .layui-layer-content {
  min-height: 0;
  padding: 0 !important;
  flex: 1 1 auto;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  color: #43577d;
  font-size: 13px;
  line-height: 1.5;
}

.jh-popup-card { padding: 16px 16px 10px; }

.jh-popup-hero {
  display: flex;
  margin-bottom: 13px;
  padding: 12px;
  align-items: center;
  gap: 11px;
  background: linear-gradient(135deg, #f1f4ff, #fafbff);
  border: 1px solid #e1e6fb;
  border-radius: 13px;
}

.jh-popup-logo {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  background: linear-gradient(145deg, #8497ee, #6579df);
  border-radius: 13px;
  box-shadow: 0 7px 16px rgba(101, 121, 223, 0.22);
}

.jh-popup-hero div { min-width: 0; }

.jh-popup-hero strong {
  display: block;
  overflow: hidden;
  color: #1b3159;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jh-popup-hero p { margin: 3px 0 0; color: #7d8ba7; font-size: 10px; }
.jh-popup-routes { display: grid; gap: 7px; }

.jh-popup-routes > a {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  color: #1b3159;
  text-decoration: none !important;
  background: #fbfcff;
  border: 1px solid #e2e6f5;
  border-radius: 11px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.jh-popup-routes > a:hover {
  color: #6579df;
  border-color: #bdc8f5;
  box-shadow: 0 6px 16px rgba(65, 84, 154, 0.08);
  transform: translateY(-1px);
}

.jh-popup-route-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  color: #6579df;
  font-size: 13px;
  background: #edf0ff;
  border-radius: 10px;
}

.jh-popup-route-copy { display: block; min-width: 0; flex: 1 1 auto; }
.jh-popup-route-copy small, .jh-popup-route-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-popup-route-copy small { color: #8490a8; font-size: 9px; line-height: 1.25; }
.jh-popup-route-copy strong { margin-top: 2px; color: inherit; font-size: 13px; font-weight: 700; }
.jh-popup-route-arrow { flex: 0 0 auto; color: #a5aec2; font-size: 10px; }

.jh-popup-notes {
  display: flex;
  margin-top: 10px;
  padding: 10px 11px;
  align-items: flex-start;
  gap: 9px;
  color: #6d5b31;
  background: #fffaf0;
  border: 1px solid #f0dfb8;
  border-radius: 10px;
}

.jh-popup-notes > i {
  margin-top: 2px;
  flex: 0 0 auto;
  color: #d7a338;
  font-size: 11px;
}

.jh-popup-notes > div {
  min-width: 0;
}

.jh-popup-notes p {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
}

.jh-popup-notes p:last-child { margin-bottom: 0; }

.jh-popup-safe {
  display: flex;
  margin-top: 11px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7b89a4;
  font-size: 10px;
}

.jh-popup-safe i { color: #6579df; }
.jh-popup-message { padding: 14px; color: #43577d; background: #fafbff; border: 1px solid #e2e6f5; border-radius: 11px; }

.jh-domain-popup .layui-layer-btn {
  flex: 0 0 auto;
  padding: 4px 16px 16px !important;
  text-align: center;
  border-top: 0 !important;
}

.jh-domain-popup .layui-layer-btn a {
  display: inline-flex;
  min-width: 128px;
  height: 38px;
  margin: 0 !important;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 13px;
  font-weight: 650;
  line-height: 38px;
  background: linear-gradient(135deg, #8497ee, #6579df) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 16px rgba(101, 121, 223, 0.22);
}

@media (max-width: 420px) {
  .layui-layer.jh-domain-popup { width: calc(100vw - 24px) !important; border-radius: 16px !important; }
  .jh-domain-popup .layui-layer-title { height: 48px; padding-left: 15px; font-size: 14px; line-height: 48px; }
  .jh-domain-popup .layui-layer-setwin { top: 9px; right: 10px; }
  .jh-popup-card { padding: 13px 13px 8px; }
  .jh-popup-hero { margin-bottom: 10px; padding: 10px; }
  .jh-popup-routes > a { min-height: 50px; padding: 7px 9px; }
  .jh-popup-route-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .jh-domain-popup .layui-layer-btn { padding-bottom: 13px !important; }
  .jh-domain-popup .layui-layer-btn a { width: 100%; height: 38px; }
}
