#shrareLink {
    display: inline-block;
    background: url(./share-btn.svg) no-repeat;
    height: 48px;
    width: 48px;
    background-size: 48px;
    background-position: center;
    position: absolute;
    right: 8px;
    top: 3px;
    /* 헤더(999)·브레드크럼(998) 위, 목차 오버레이(1001)·패널(1002) 아래 — 목차를 열면 닫기(X)를 가리지 않게 */
    z-index: 1000;
    cursor: pointer;
    transition: var(--ease-1s);
}

/* 본문 페이지: 브레드크럼 줄의 목차(≡) 버튼 바로 왼쪽에 둔다.
   ≡ 를 담은 nav 는 최대 1024px 가운데 정렬 → ≡ 오른쪽 끝 = max(0, (100% - 1024px) / 2) + 15px,
   여기에 ≡ 폭 24px + 간격 8px 을 더한 값. 미디어쿼리·:has() 없이 모든 너비에서 ≡ 를 따라간다. */
body.wh_topic_page #shrareLink {
    right: 47px; /* max() 미지원 엔진 폴백 */
    right: calc(max(0px, (100% - 1024px) / 2) + 47px);
}

/* ≡ 가 없는 본문(QRG)은 오른쪽 끝으로 되돌린다. :has() 미지원 엔진은 이 규칙만 무시(위 배치 유지). */
body.wh_topic_page:not(:has(a.btn_nav)) #shrareLink {
    right: 8px;
}

/* 브레드크럼이 ≡ 왼쪽의 공유 버튼(간격 8px + 폭 48px) 밑으로 들어가지 않게 자리를 비운다.
   브레드크럼은 원래대로 줄바꿈된다(콘텐츠 스타일은 webresources 가 아니라 여기서 덮어씀). */
body.wh_topic_page .wh_tools_cs .wh_breadcrumb {
    margin-right: 60px;
}

/* QRG 헤더: 콘텐츠(csh-qrg.css)가 .wh_search_input 에 padding-inline: 14px 0 !important 를 줘
   공유 버튼 쪽 여백이 0 → 좁은 화면에서 제목이 버튼 밑으로 들어간다. 끝쪽에 버튼 자리를 비운다.
   논리 속성이라 RTL 에서는 왼쪽에 적용된다. */
header.wh_header .wh_search_input {
    padding-inline-end: 56px !important;
}

/* RTL(아랍어 등): 로고·브레드크럼이 오른쪽, 목차(≡)가 왼쪽으로 뒤집히므로 공유 버튼도 좌우를 뒤집는다.
   rtl 에서는 left·right 를 함께 주면 left 가 무시되므로 right: auto 로 풀어 준다. */
[dir='rtl'] #shrareLink {
    right: auto;
    left: 8px;
}

[dir='rtl'] body.wh_topic_page #shrareLink {
    right: auto;
    left: 47px; /* max() 미지원 엔진 폴백 */
    left: calc(max(0px, (100% - 1024px) / 2) + 47px);
}

[dir='rtl'] body.wh_topic_page:not(:has(a.btn_nav)) #shrareLink {
    right: auto;
    left: 8px;
}

[dir='rtl'] body.wh_topic_page .wh_tools_cs .wh_breadcrumb {
    margin-right: 0;
    margin-left: 60px;
}

/* 배경 전체 오버레이 */
.modal__share-link {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
  .share-link__share {
    background: white;
    width: 360px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
  }

  .share-group {
      position: relative;
      padding: 15px 15px 25px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0px 20px 20px 20px;
  }
  
  .share__close-box {
    position: absolute;
    top: 16px;
    right: 12px;
    cursor: pointer;
  }
  
  .share__close-box a::before {
    content: '×';
    font-size: 24px;
    color: #333;
  }
  
  .share__title-box {
    padding: 20px 15px 16px 20px;
  }

  .share__title-box h3 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
  }
  
  #share-btn {
    margin-bottom: 0;
  }
  
  #share-btn img {
    width: 32px;
    height: 32px;
  }
  
  .share-link__copy-link {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .share-link__copy-link-url {
    display: block;
    padding: 10px;
    background-color: #f5f5f5;
    color: #555;
    font-size: 14px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    word-break: break-all;
    overflow-y: auto;
  }
  
  .bTnshare-link__copy {
    background-color: #000;
    color: #fff;
    width: 100%;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* webhelp Bootstrap 의 p { margin-bottom: 1rem } 이 버튼 안에도 걸려 글자가 위로 쏠리던 것 제거 */
  .bTnshare-link__copy p {
    margin: 0;
  }

  .bTnshare-link__copy:hover {
    background-color: #333;
  }