#cicero-popin-modal:checked ~ #cicero-popin-overlay {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
#cicero-popin-modal:checked ~ #cicero-button {
    opacity: 0;
    pointer-events: none;
}
#cicero-popin-modal:checked ~ #cicero-popin-overlay .cicero-popin {
    transform: translateY(0);
}
#cicero-popin-overlay {
    position: fixed;
    inset: 0; /* sets top: 0; right: 0; bottom: 0; left: 0 — no layout bugs */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transform: scale(0.98);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    z-index: 2147483647; /* max z-index to sit above any host content */
    pointer-events: none; /* inactive by default */
}

#cicero-popin-overlay.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#cicero-popin-overlay.active .cicero-popin {
    transform: translateY(0);
    opacity: 1;
}
.cicero-popin {
    background: #ccc;
    font-family: ui-sans-serif, system-ui, adelle-sans;
    width: 94%;
    max-width: 47rem;
    height: 97vh;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(5px);
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}
.cicero-popin iframe {
    width: 100%;
    height: 100%;
    border: none;
}
#cicero-button {
    position: fixed;
    bottom: 2em;
    right: 2em;
    cursor: pointer;
    padding: 12px 18px;
    background-color: #8053ff;
    color: white;
    font-weight: 700;
    font-size: 17px;
    font-family: ui-sans-serif, system-ui, adelle-sans;
    border-radius: 0.375rem;
    transition:
        background-color 0.3s ease,
        opacity 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow:
        rgba(0, 0, 0, 0.03) 0px 10px 15px -3px,
        rgba(0, 0, 0, 0.03) 0px 4px 6px -2px;
    z-index: 1000;
    border: none;
    outline: none;
}
#cicero-button:hover,
#cicero-button:active {
    filter: brightness(92%);
}
#cicero-link {
    position: fixed;
    display: block;
    bottom: 2em;
    right: 2em;
    cursor: pointer;
    color: #8053ff;
    font-weight: 700;
    font-size: 17px;
    font-family: ui-sans-serif, system-ui, adelle-sans;
    transition:
        background-color 0.3s ease,
        opacity 0.3s ease;
    z-index: 2000;
}
#cicero-popin-close {
    position: absolute;
    top: 9px;
    right: 16px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}
.cicero-popin-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
