/* Meiqia chat popup — global bottom-right widget */
.norco-meiqia-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.norco-meiqia-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.norco-meiqia-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0C5A38;
  color: #fff;
  flex-shrink: 0;
}

.norco-meiqia-panel-title {
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.norco-meiqia-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.norco-meiqia-panel-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.norco-meiqia-panel-body {
  flex: 1;
  min-height: 0;
  background: #f5f5f5;
}

.norco-meiqia-panel-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.norco-meiqia-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.norco-meiqia-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Standalone FAB when page has no contact bar */
.norco-meiqia-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: #FFDE00;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.norco-meiqia-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  background: #0C5A38;
  color: #fff;
}

.norco-meiqia-fab svg {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .norco-meiqia-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .norco-meiqia-fab {
    right: 10px;
    bottom: 10px;
    padding: 12px;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    justify-content: center;
  }

  .norco-meiqia-fab span {
    display: none;
  }
}
