/**************************
 * Emoji Animation Styles *
 **************************/
code.emoji-markdown, code.emoji-unicode {
    padding-top: 2px;
    padding-bottom: 2px;
    white-space: nowrap;
}

img.emoji-img {
    width: 25px;
    vertical-align: bottom;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

img.emoji-img.enlarge {
    transform: scale(1.4);
}

img.emoji-img.shrink {
    transform: scale(0.7);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* This class triggers the animation once */
.pulse-animation {
    animation: pulse 0.4s ease-in-out;
}

.emoji-container {
    position: relative;
    display: inline-block;
}

.copy-banner {
    position: absolute;
    /* top: -25px; /* Positioned above the emoji */
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 999;
    
    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    transition: opacity 2.5s ease, transform 2.5s ease;
    pointer-events: none; /* User can't click the text itself */
}

/* The animation class */
.copy-banner.show {
    visibility: visible;
    animation: fadeUp 2.5s forwards;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        top: -20px;
    }
    20% {
        opacity: 1;
        top: -30px;
    }
    80% {
        opacity: 1;
        top: -30px;
    }
    100% {
        opacity: 0;
        top: -40px;
    }
}


/****************************
 * Table of Contents Styles *
 ****************************/

.toc2 {
    font-size: 14px;
    --rotation: 0deg;
}

#main_content h1 {
    margin-top: 2em;
}

#main_content ul ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}
#main_content ul ul.hidden {
    max-height: 0;
}
#main_content ul ul:not(.hidden) {
    max-height: 2000px;
}
#main_content ul li {
    list-style: none;
    cursor: pointer;
}

#main_content ul li::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 10px;
    background-image: url(../images/bullet.png);
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 5px;
    transition: transform 0.3s ease-in-out;
    transform: rotate(var(--rotation, 0deg));
    transform-origin: center;
    vertical-align: middle;
}

p.breadcrumb {
    text-align: right;
    margin-top: -3em;
    width: 50%;
    float: right;
}

h1, h2 {
    scroll-margin-top: 2em;
}
header {
    padding-bottom: 10px;
}