:root {
    --popup-bg-color: #555;
    --popup-text-color: #fff;
    --popup-font-size: 13px;
}


.code-clipboard-button {
    position: absolute;
    top: 7.5px;
    right: 11px;
    cursor: pointer;
}

.code-clipboard-icon {
    font-size: 23px;
    opacity: 0.4;
}

/* Show only on hover */
.code-clipboard-container .code-clipboard-button {
    visibility: hidden;
}
.code-clipboard-container:hover .code-clipboard-button {
    visibility: visible;
}


/* === Popup styles and animation === */
/* Source: https://www.w3schools.com/howto/howto_js_popup.asp */

/* The actual popup (appears on top) */
.code-clipboard-button .popuptext {
    font-size: var(--popup-font-size);
    visibility: hidden;
    width: 58px;
    background-color: var(--popup-bg-color);
    color: var(--popup-text-color);
    text-align: center;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -32px;
}
    
/* Popup arrow */
.code-clipboard-button .popuptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--popup-bg-color) transparent transparent transparent;
}
    
/* Toggle this class when clicking on the popup container (hide and show the popup) */
.code-clipboard-button .show-popup {
    visibility: visible;
    -webkit-animation: fadeIn 0.2s;
    animation: fadeIn 0.2s;
}
    
/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}
    
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity:1 ;}
} 