/* Remove default focus ring. Closed-state fill/opacity are locked via
   [aria-expanded="false"] below so :focus cannot leave a solid white button. */
.share-toggle:focus {
  outline: none;
}

/* Only show focus affordance for keyboard navigation */
.share-toggle:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}

/* Remove mobile tap highlight (iOS/Android) */
.share-toggle {
  -webkit-tap-highlight-color: transparent;
}

.share-container{
  position: relative;
  z-index:1200;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  font-family:inherit;
  width: 48px;
  margin-left: auto;
  margin-right: 110px;
}

@media (min-width: 880px) and (max-width: 1299px) {
  .share-container{
   margin-right: 95px;
  }
}

@media (max-width: 879px){
  .share-container{
   margin-right: 16px;
  }
}
.share-toggle{
  position: absolute;
  width:48px;
  height:48px;
  border-radius:50%;
  background: #fff url("../icons/icon_share.svg") center/55% no-repeat;
  border: 1px solid #E2E2E2;
  box-shadow: 0px 0.5px 4px rgba(0,0,0,0.12);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  opacity:0.8;
  transform: translateZ(0);
  backface-visibility: hidden;
  z-index: 2;
}
/* :focus must not change fill, opacity, or box-shadow — those caused solid
   white after close and hid the :focus-visible keyboard ring. */
.share-toggle:focus {
  border: 1px solid #E2E2E2;
}

/* Lock the closed (default) appearance. Beats sticky :hover/:focus so the
   button cannot stay solid white after the popover closes.
   Do not set box-shadow here — :focus-visible must keep the keyboard ring. */
.share-toggle[aria-expanded="false"] {
  background-color: #fff;
  opacity: 0.8;
}

.share-toggle[aria-expanded="false"]:not(:focus-visible) {
  box-shadow: 0px 0.5px 4px rgba(0,0,0,0.12);
}

/* Hover gray only on fine-pointer devices, and only while closed. */
@media (hover: hover) and (pointer: fine) {
  .share-toggle[aria-expanded="false"]:hover {
    background-color: #EDEDED;
    box-shadow: none;
    opacity: 1;
  }
}

/* Source of truth for open/active visual state */
.share-toggle[aria-expanded="true"] {
  background-color: #EDEDED;
  box-shadow: none;
  opacity: 1;
}
.share-popover{
  position:absolute;
  bottom:calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width:auto;
  padding:3px;
  border-radius: 32px;
  background:#fff;
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  border:1px solid #E2E2E2;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1;
}
.share-popover[hidden] {
  display: none !important;
}
.share-popover:focus,
.share-popover:focus-visible {
  outline: none;
  box-shadow: none;
}
.share-popover[aria-hidden="false"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  animation:share-popover-fade-in 300ms ease;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.share-popover.share-popover--closing{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  animation:none;
}
.share-popover .placeholder {
  width:auto;
  height:auto;
}

.share-popover .placeholder .share-widget {
    float: none;
    margin: 0;
    padding: 0;
}

.share-popover .placeholder .share-widget .custom_images {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.share-widget .js-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 50%;
  background-color: #fff;
  transition: background-color 120ms ease;
}

.share-widget .js-share-link:focus {
  outline: none;
  box-shadow: none;
}

.share-widget .share-image-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.share-widget .share-image-link {
  width: 48px;
  height: 48px;
}

.share-widget .share-image-link .share-image-icon {
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  filter: none;
}

.share-widget .js-share-link:hover,
.share-widget .js-share-link:active {
  background-color: #EDEDED;
}

.share-widget .share-text-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d7d7d7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #333;
  background-color: #fafafa;
  letter-spacing: 0.2px;
}

.share-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 4px;
  border-radius: 4px;
  background: #222;
  box-shadow: 0px 0.5px 4px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #FFF;
  font-family: "ff-zwo-web-pro", "Franklin Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 2500;
}

.share-toast.share-toast--visible {
  opacity: 1;
  visibility: visible;
}

.share-toast.share-toast--copied {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: left;
  white-space: nowrap;
  width: 7.1rem;
  padding: 4px;
}

.share-toast.share-toast--email {
  display: block;
  text-align: left;
  white-space: normal;
  width: max-content;
  max-width: min(50vw, 460px);
  padding: 8px 10px;
  box-sizing: border-box;
}

@media (max-width: 37.4375em) {
  .share-toast.share-toast--email {
    font-size: 14px;
    line-height: 1.35;
    padding: 6px 8px;
  }
}

.share-toast__icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 auto;
}

@keyframes share-popover-fade-in{
  from{ opacity:0; }
  to{ opacity:1; }
}
/* small responsive tweak */
@media (max-width:37.4375em){
  .article-storyline-wrap{
    position: relative;
    z-index: 10;
  }

  .share-container{
    position: relative;
    margin-right:12px;
  }

  .share-container.share-container--floating{
    position: fixed;
    right: 12px;
    margin-right: 0;
    width: 48px;
    height: 48px;
    /* top is set in JS (66px + safe-area) to avoid bottom/top mode switching near footer */
  }

  .share-container.share-container--at-end{
    margin-right: 0;
  }
}
