.attachmentVisual {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 8px;
  height: 58px;
  margin-right: 1px;
}

.attachmentVisual.plain { min-width: 0; }
.attachmentVisual.chain5 { min-width: 58px; }
.attachmentVisual.chain10 { min-width: 105px; }
.attachmentVisual.keyring,
.attachmentVisual.clasp { min-width: 88px; }

.ballChain {
  display: flex;
  align-items: center;
  transform: translateY(1px) rotate(-4deg);
}

.ballChain i {
  width: 9px;
  height: 9px;
  margin-right: 1px;
  border: 1px solid #777b82;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 12%, #cfd2d6 28%, #777c83 72%, #42464c 100%);
  box-shadow: 0 2px 2px rgb(0 0 0 / 20%);
}

.keyRing {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  margin-right: 5px;
  border: 6px double #858a91;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 1px 1px #fff, 0 2px 3px rgb(0 0 0 / 22%);
}

.chainClasp {
  position: relative;
  width: 31px;
  height: 18px;
  margin-right: 6px;
  border: 2px solid #686d74;
  border-radius: 8px 3px 3px 8px;
  background: linear-gradient(#eceef0, #91969d);
  box-shadow: 0 2px 3px rgb(0 0 0 / 22%);
}

.chainClasp::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 4px;
  width: 8px;
  height: 7px;
  border: 2px solid #70757b;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}

.firstBlock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  z-index: 3;
  width: 7px;
  height: 7px;
  border: 2px solid #b7bac0;
  border-radius: 50%;
  background: #51555b;
  box-shadow:
    inset 1px 1px 2px #181a1d,
    0 0 0 2px #eef0f3,
    0 58px 0 #51555b,
    0 58px 0 2px #eef0f3;
  transform: translateX(-50%);
}

@media (max-width: 740px) {
  .attachmentVisual { height: 52px; }
  .attachmentVisual.chain5 { min-width: 50px; }
  .attachmentVisual.chain10 { min-width: 88px; }
  .ballChain i { width: 8px; height: 8px; }
}

/* De ball chain loopt als een open lus van boven naar onder langs het eerste blokje. */
.attachmentVisual:not(.plain) {
  height: 82px;
  align-self: center;
}

.attachmentVisual.chain5 { min-width: 74px; }
.attachmentVisual.chain10 { min-width: 126px; }
.attachmentVisual.keyring,
.attachmentVisual.clasp { min-width: 112px; }

.attachmentVisual .ballChain {
  position: absolute;
  right: -34px;
  top: 50%;
  z-index: 0;
  display: block;
  width: 70px;
  height: 76px;
  border: 6px dotted #858a91;
  border-right-color: transparent;
  border-radius: 52% 0 0 52%;
  transform: translateY(-50%);
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / 22%));
}

.attachmentVisual.chain10 .ballChain {
  width: 122px;
  border-radius: 50% 0 0 50%;
}

/* De linkerbocht van de ketting loopt zichtbaar door de sleutelring. */
.attachmentVisual.keyring .ballChain {
  width: 108px;
}

.attachmentVisual .ballChain i { display: none; }

.attachmentVisual .keyRing,
.attachmentVisual .chainClasp {
  position: absolute;
  left: 7px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.attachmentVisual .keyRing { left: 4px; }

@media (max-width: 740px) {
  .attachmentVisual:not(.plain) { height: 76px; }
  .attachmentVisual.chain5 { min-width: 64px; }
  .attachmentVisual.chain10 { min-width: 104px; }
  .attachmentVisual.keyring,
  .attachmentVisual.clasp { min-width: 98px; }
  .attachmentVisual .ballChain { width: 60px; height: 70px; }
  .attachmentVisual.chain10 .ballChain { width: 100px; }
  .attachmentVisual.keyring .ballChain { width: 96px; }
  .attachmentVisual .ballChain { right: -31px; }

  .attachmentVisual .keyRing {
    left: 2px;
    width: 44px;
    height: 44px;
  }

  .firstBlock::before {
    box-shadow:
      inset 1px 1px 2px #181a1d,
      0 0 0 2px #eef0f3,
      0 52px 0 #51555b,
      0 52px 0 2px #eef0f3;
  }
}
