.CodeBlock { border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.23); position: relative; overflow: hidden; } .copied { background-color: #1a63a3; width: 100%; height: 100%; position: absolute; top: 0; bottom: 0; right: 0; left: 0; transition: 0.6s all ease; opacity: 0; display: flex; justify-content: center; align-items: center; z-index: -1; } .copy__button { position: absolute; top: 0; right: 0; border: none; outline: none; color: #efefef; background-color: #1e6caf; border-bottom-left-radius: 6px; } .copy__button:hover { background-color: #1a63a3; cursor: pointer; } .copied.show { transition: 0.6s all ease; opacity: 1; z-index: 1; } .copied__text { color: white; display: none; font-family: Roboto; letter-spacing: 1.4; font-weight: 500; } .copied.show .copied__text { display: block; }