/*
 * 🥚 Easter eggs: Styles (see the README.md of the handbook).
 */

.eggs-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: var(--cd-orange-60, #df7900);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, 0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.eggs-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.eggs-toast.eggs-hidden,
.eggs-overlay.eggs-hidden {
    opacity: 0;
}

.eggs-toast.eggs-hidden {
    transform: translate(-50%, 1rem);
}

/*
 * Footer
 */

.eggs-footer {
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.eggs-footer-icon {
    display: inline-block;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.eggs-footer-tip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.5rem);
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--cd-orange-60, #df7900);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: pre;
    pointer-events: none;
    opacity: 0;
    transform: translateY(0.25rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.eggs-footer.eggs-activated .eggs-footer-icon {
    opacity: 1;
    filter: drop-shadow(0 0 0.4rem var(--cd-orange-60, #df7900));
}

.eggs-footer:hover .eggs-footer-icon,
.eggs-footer:focus-visible .eggs-footer-icon,
.eggs-footer.eggs-open .eggs-footer-icon {
    opacity: 1;
    transform: rotate(-15deg);
}

.eggs-footer.eggs-open .eggs-footer-tip {
    opacity: 1;
    transform: none;
}

/*
 * Rabbit
 */

.eggs-rabbit {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    margin: -1rem 0 0 -1rem;
    font-size: 2rem;
    line-height: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.eggs-rabbit.eggs-hidden {
    opacity: 0;
}

/*
 * Simplicity
 */

html.eggs-simplicity body {
    filter: grayscale(1);
    transition: filter 0.8s ease;
}

html.eggs-simplicity .sidebar-drawer,
html.eggs-simplicity .toc-drawer,
html.eggs-simplicity img,
html.eggs-simplicity .admonition,
html.eggs-simplicity .headerlink {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/*
 * Ugly
 */

html.eggs-ugly,
html.eggs-ugly * {
    font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive !important;
    letter-spacing: 0.05em;
}

html.eggs-ugly h1,
html.eggs-ugly h2,
html.eggs-ugly h3 {
    color: var(--cd-fuchsia-60, #d6239a) !important;
    text-shadow: 3px 3px 0 var(--cd-yellow-60, #e8c400);
    transform: rotate(-2deg);
}

html.eggs-ugly a {
    color: var(--cd-lime-60, #8ab800) !important;
    text-decoration: underline wavy !important;
}

html.eggs-ugly img,
html.eggs-ugly .sidebar-logo {
    filter: hue-rotate(180deg) saturate(3);
}

/*
 * Beautiful
 */

.eggs-aurora {
    background:
        radial-gradient(40% 50% at 20% 30%, var(--cd-orange-60), transparent 70%),
        radial-gradient(40% 50% at 80% 20%, var(--cd-rose-60), transparent 70%),
        radial-gradient(50% 60% at 60% 80%, var(--cd-violet-60), transparent 70%),
        radial-gradient(40% 50% at 30% 90%, var(--cd-azure-60), transparent 70%);
    background-size: 200% 200%;
    filter: blur(60px);
    opacity: 0.4;
    mix-blend-mode: screen;
    animation: eggs-aurora 20s ease-in-out infinite alternate;
}

body[data-theme="light"] .eggs-aurora {
    opacity: 0.25;
    mix-blend-mode: multiply;
}

@media (prefers-color-scheme: light) {
    body:not([data-theme="dark"]) .eggs-aurora {
        opacity: 0.25;
        mix-blend-mode: multiply;
    }
}

html.eggs-beautiful h1,
html.eggs-beautiful h2,
html.eggs-beautiful h3 {
    background: linear-gradient(
        90deg,
        var(--cd-orange-60),
        var(--cd-rose-60),
        var(--cd-violet-60),
        var(--cd-azure-60),
        var(--cd-orange-60)
    );
    background-clip: text;
    background-size: 300% 100%;
    color: transparent;
    animation: eggs-shimmer 8s linear infinite;
}

@keyframes eggs-aurora {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 50% 100%;
    }
}

@keyframes eggs-shimmer {
    to {
        background-position: 300% 0;
    }
}

/*
 * Terminal
 */

.eggs-terminal {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    height: 45vh;
    padding: 1rem 1.5rem;
    background: rgb(10 10 10 / 96%);
    color: #dddddd;
    font-family: var(--theme-font-mono, "Roboto Mono", monospace);
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 60%);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.eggs-terminal.eggs-open {
    transform: none;
}

.eggs-terminal-output {
    flex: 1;
    margin: 0;
    overflow: auto;
    font: inherit;
    white-space: pre-wrap;
}

.eggs-terminal-line {
    display: flex;
    gap: 0.5rem;
}

.eggs-terminal-link {
    color: var(--cd-orange-60, #df7900);
}

.eggs-terminal-prompt {
    color: var(--cd-orange-60, #df7900);
}

.eggs-terminal-input {
    flex: 1;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    outline: none;
}

/*
 * Tic-tac-toe
 */

.eggs-ttt-board {
    display: inline-grid;
    grid-template-columns: repeat(3, 2.5em);
    grid-auto-rows: 2.5em;
    line-height: 1;
}

.eggs-ttt-board > span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #555555;
    border-style: solid;
    border-width: 0 1px 1px 0;
}

.eggs-ttt-board > span:nth-child(3n) {
    border-right-width: 0;
}

.eggs-ttt-board > span:nth-child(n + 7) {
    border-bottom-width: 0;
}
