.social-share {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 4px;
}

.social-share--article {
  justify-content: flex-end;
}

.social-share--page,
.social-share--detail {
  justify-content: flex-start;
}

.social-share__trigger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 100%;
  padding: 7px 14px;
  border: 1px solid rgba(0, 79, 152, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #004f98;
  box-shadow: 0 4px 12px rgba(15, 47, 87, .06);
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.2;
  gap: 7px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.social-share__trigger:hover,
.social-share__trigger[aria-expanded="true"] {
  border-color: rgba(0, 79, 152, .44);
  background: #eef7ff;
  color: #003f7a;
  box-shadow: 0 7px 18px rgba(15, 47, 87, .1);
}

.social-share__trigger:active {
  transform: translateY(1px);
}

.social-share__trigger:focus-visible,
.social-share-dialog__close:focus-visible,
.social-share-option:focus-visible {
  outline: 3px solid rgba(0, 79, 152, .28);
  outline-offset: 2px;
}

.social-share__trigger-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.social-share__trigger-label--short {
  display: none;
}

.social-share-layer[hidden] {
  display: none;
}

.social-share-layer {
  position: fixed;
  z-index: 10000;
  inset: 0;
  pointer-events: none;
}

.social-share-layer.is-open {
  pointer-events: auto;
}

.social-share-layer__backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: transparent;
}

.social-share-dialog {
  box-sizing: border-box;
  position: fixed;
  z-index: 1;
  top: var(--share-dialog-top, 50%);
  left: var(--share-dialog-left, 50%);
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(122, 148, 176, .32);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 47, 87, .2);
  transform: translate(-50%, -50%);
}

.social-share-dialog[style*="--share-dialog-left"] {
  transform: none;
}

.social-share-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.social-share-dialog__title {
  margin: 0;
  color: #1f344a;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.35;
}

.social-share-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(122, 148, 176, .3);
  border-radius: 999px;
  background: #fff;
  color: #34465a;
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.social-share-dialog__close:hover {
  border-color: rgba(0, 79, 152, .34);
  background: #eef7ff;
  color: #003f7a;
}

.social-share-dialog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.social-share-option {
  box-sizing: border-box;
  display: grid;
  min-width: 0;
  min-height: 74px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 9px 7px;
  border: 1px solid rgba(0, 79, 152, .18);
  border-radius: 10px;
  background: #fff;
  color: #0f2f57;
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.social-share-option:hover {
  border-color: rgba(0, 79, 152, .36);
  background: #eef7ff;
  color: #003f7a;
  transform: translateY(-1px);
}

.social-share-option[hidden] {
  display: none;
}

.social-share-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(0, 79, 152, .1);
  color: #004f98;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.social-share-option__label {
  max-width: 100%;
  font-size: .77rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.social-share-option--native .social-share-option__icon {
  background: #004f98;
  color: #fff;
}

.social-share-toast {
  position: fixed;
  z-index: 10010;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(0, 79, 152, .22);
  border-radius: 12px;
  background: #0f2f57;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 47, 87, .22);
  font-size: .9rem;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.social-share-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 760px) {
  .social-share-dialog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .social-share {
    margin: 8px 0 2px;
  }

  .social-share--article {
    justify-content: flex-start;
  }

  .social-share__trigger {
    min-height: 36px;
    padding-inline: 12px;
    font-size: .84rem;
  }

  .social-share__trigger-label {
    display: none;
  }

  .social-share__trigger-label--short {
    display: inline;
  }

  .social-share-layer__backdrop {
    background: rgba(15, 47, 87, .18);
  }

  .social-share-dialog {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(78vh, 520px);
    border-radius: 14px;
    transform: none;
  }

  .social-share-dialog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .social-share-option {
    min-height: 68px;
    padding: 8px 5px;
  }

  .social-share-option__label {
    font-size: .72rem;
  }

  .social-share-toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

:root[data-theme="dark"] .social-share__trigger,
:root[data-theme="dark"] .social-share-dialog,
:root[data-theme="dark"] .social-share-dialog__close,
:root[data-theme="dark"] .social-share-option {
  border-color: var(--color-border, #263a52);
  background: var(--color-button-bg, #122238);
  color: var(--color-button-text, #dbeeff);
  box-shadow: none;
}

:root[data-theme="dark"] .social-share__trigger:hover,
:root[data-theme="dark"] .social-share__trigger[aria-expanded="true"],
:root[data-theme="dark"] .social-share-dialog__close:hover,
:root[data-theme="dark"] .social-share-option:hover {
  border-color: rgba(103, 183, 255, .5);
  background: rgba(103, 183, 255, .14);
  color: var(--color-primary, #67b7ff);
}

:root[data-theme="dark"] .social-share-layer__backdrop {
  background: rgba(3, 8, 15, .52);
}

:root[data-theme="dark"] .social-share-dialog__title {
  color: var(--color-text-strong, #f4f8ff);
}

:root[data-theme="dark"] .social-share-option__icon {
  background: rgba(103, 183, 255, .16);
  color: var(--color-primary, #67b7ff);
}

:root[data-theme="dark"] .social-share-option--native .social-share-option__icon {
  background: var(--color-primary, #67b7ff);
  color: #061321;
}
