/* popCTA Frontend Styles */

.popcta-wrapper {
    position: fixed;
    z-index: 99999;
    font-family: var(--popcta-font), sans-serif;
    pointer-events: none;
    /* Let clicks pass through until fully visible */
    visibility: hidden;
}

.popcta-wrapper.is-visible {
    pointer-events: auto;
    visibility: visible;
}

/* Positions Container Variables */
.popcta-pos-top-left {
    top: 20px;
    left: 20px;
}

.popcta-pos-top-middle {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popcta-pos-top-right {
    top: 20px;
    right: 20px;
}

.popcta-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popcta-pos-bottom-left {
    bottom: 20px;
    left: 20px;
}

.popcta-pos-bottom-middle {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popcta-pos-bottom-right {
    bottom: 20px;
    right: 20px;
}

/* The Box */
.popcta-box {
    background: var(--popcta-bg);
    border: var(--popcta-border-w) solid var(--popcta-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #fff;
    position: relative;
    max-width: 350px;
    width: 0px;
    height: auto;
    opacity: 0;
    overflow: hidden;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popcta-wrapper.is-visible .popcta-box {
    width: auto;
    min-width: 280px;
    opacity: 1;
    transform: scale(1);
}

/* Close button */
.popcta-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.popcta-close:hover {
    color: #fff;
}

/* Content Area */
.popcta-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 20px;
}

.typewriter-text::after {
    content: '|';
    animation: popctaBlink 1s infinite;
}

/* Call to action button */
.popcta-btn {
    display: inline-block;
    background: var(--popcta-border);
    color: var(--popcta-bg);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, background 0.2s;
    opacity: 0;
    transform: translateY(10px);
}

.popcta-wrapper.typing-done .popcta-btn {
    opacity: 1;
    transform: translateY(0);
}

.popcta-btn:hover {
    filter: brightness(1.1);
}

@keyframes popctaBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Display Prompt (Chat Icon) */
.popcta-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--popcta-prompt-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--popcta-prompt-color);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    /* just behind wrapper */
    transition: transform 0.2s;
    font-family: var(--popcta-font), sans-serif;
}

.popcta-prompt:hover {
    transform: scale(1.1);
}

.popcta-prompt.is-hidden {
    display: none;
}