/* Engagement Toast Styles */
.abc-toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999990; /* Abaixo do container do toast */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
    cursor: pointer;
}

.abc-toast-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.abc-toast-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    gap: 1rem;
    pointer-events: none; /* Deixa o clique passar para o site */
}

.abc-toast-container.pos-bottom-right {
    bottom: 2rem; right: 2rem;
    flex-direction: column-reverse; /* Mais novo em baixo */
    align-items: flex-end;
}
.abc-toast-container.pos-bottom-left {
    bottom: 2rem; left: 2rem;
    flex-direction: column-reverse;
    align-items: flex-start;
}
.abc-toast-container.pos-top-right {
    top: 2rem; right: 2rem;
    flex-direction: column; /* Mais novo no topo */
    align-items: flex-end;
}
.abc-toast-container.pos-top-left {
    top: 2rem; left: 2rem;
    flex-direction: column;
    align-items: flex-start;
}
.abc-toast-container.pos-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
}

.abc-engagement-toast {
    position: relative;
    width: 420px;
    max-width: calc(100vw - 2rem);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #212121;
    opacity: 0;
    pointer-events: auto; /* Reativa o clique no toast em si */
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
}

.abc-engagement-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.abc-engagement-toast-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    top: 5px;
    right: 10px;
}

.abc-engagement-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abc-engagement-toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
    transform: rotate(90deg) scale(1.1);
}

.abc-engagement-toast-content-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.abc-engagement-toast-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.abc-engagement-toast:hover .abc-engagement-toast-icon {
    transform: scale(1.15) rotate(-8deg);
}

.abc-engagement-toast-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.abc-engagement-toast-text {
    flex: 1;
}

.abc-engagement-toast-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    color: inherit !important;
}

.abc-engagement-toast-desc {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    color: inherit !important;
}

.abc-engagement-toast-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--btn-bg, #f9a045);
    color: var(--btn-text, #ffffff);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.abc-engagement-toast-link.btn-align-left {
    display: inline-block;
}

.abc-engagement-toast-link.btn-align-center {
    display: block;
    width: max-content;
    margin: 0 auto;
}

.abc-engagement-toast-link.btn-align-right {
    display: block;
    width: max-content;
    margin: 0 0 0 auto;
}

.abc-engagement-toast-link.btn-align-full {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.abc-engagement-toast-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Dark mode compatibility if theme supports it */
@media (prefers-color-scheme: dark) {
    .abc-engagement-toast {
        background: rgba(30, 30, 30, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .abc-engagement-toast-close:hover {
        background: rgba(255,255,255,0.1);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .abc-toast-container.pos-bottom-right,
    .abc-toast-container.pos-bottom-left,
    .abc-toast-container.pos-center {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .abc-toast-container.pos-top-right,
    .abc-toast-container.pos-top-left {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .abc-engagement-toast {
        width: 100%;
        max-width: none;
    }
}
