/* Rakkatak easter egg */

#tt-egg-peek {
    position: fixed;
    right: 0;
    top: 42vh;
    z-index: 900;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    /* Show only the hat brim by default; slide out on hover / scroll nudge. */
    transform: translateX(calc(100% - 34px));
    transition: transform .35s ease;
    line-height: 0;
}
#tt-egg-peek img {
    height: 150px;
    width: auto;
    display: block;
    /* Mirror the drawing so he peeks in from the right. */
    transform: scaleX(-1);
    filter: drop-shadow(-2px 2px 3px rgba(0, 0, 0, .25));
    pointer-events: none;
}
#tt-egg-peek:hover,
#tt-egg-peek:focus-visible,
#tt-egg-peek.tt-egg-nudge {
    transform: translateX(calc(100% - 86px));
}
#tt-egg-peek:focus-visible {
    outline: 2px dashed #444;
    outline-offset: 2px;
}

/* ---- panel ---- */
#tt-egg-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 18, .55);
    padding: 16px;
}
#tt-egg-overlay.tt-egg-open { display: flex; }

#tt-egg-panel {
    position: relative;
    background: #f7f6f2;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    padding: 22px 26px 20px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    font-family: inherit;
}
#tt-egg-close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
}
#tt-egg-close:hover { color: #000; }

#tt-egg-face {
    max-width: 260px;
    max-height: 300px;
    width: auto;
    height: auto;
    display: block;
    margin: 4px auto 14px;
}

#tt-egg-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
#tt-egg-buttons button {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    transition: transform .12s ease;
}
#tt-egg-buttons button:hover,
#tt-egg-buttons button:focus-visible { transform: scale(1.06) rotate(-1.5deg); }
#tt-egg-buttons button:focus-visible { outline: 2px dashed #444; outline-offset: 3px; }
#tt-egg-buttons img { height: 52px; width: auto; display: block; }

/* ---- results ---- */
#tt-egg-result { display: none; margin-top: 6px; }
#tt-egg-result.tt-egg-show { display: block; }
#tt-egg-verdict {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 10px;
    color: #23241f;
}
.tt-egg-bar {
    display: flex;
    height: 26px;
    border-radius: 99px;
    overflow: hidden;
    border: 2px solid #23241f;
    background: #fff;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.tt-egg-bar span {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    transition: width .6s ease;
}
.tt-egg-bar .tt-egg-kill { background: #8c2f2f; }
.tt-egg-bar .tt-egg-save { background: #2c6e63; }
#tt-egg-counts { font-size: .8rem; color: #6b6c63; margin: 0; }

@media (prefers-reduced-motion: reduce) {
    #tt-egg-peek, .tt-egg-bar span, #tt-egg-buttons button { transition: none; }
}
@media (max-width: 600px) {
    #tt-egg-peek img { height: 110px; }
    #tt-egg-peek { transform: translateX(calc(100% - 26px)); }
    #tt-egg-peek:hover, #tt-egg-peek.tt-egg-nudge { transform: translateX(calc(100% - 60px)); }
}
