/* Goftino — hide default bubble; position chat near Nahamta contact buttons */

#box-widget-icon,
#box-widget-icon * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#goftino_win {
    z-index: 1060 !important;
}

@media (min-width: 768px) {
    #goftino_win {
        right: 1.5rem !important;
        left: auto !important;
        bottom: 6.5rem !important;
    }
}

@media (max-width: 767px) {
    #goftino_win {
        right: 50% !important;
        left: auto !important;
        bottom: 5.75rem !important;
        transform: translateX(50%) !important;
        max-width: min(100vw - 2rem, 360px) !important;
        width: min(100vw - 2rem, 360px) !important;
    }
}

/* Unread message counter on custom chat buttons */
.nahamta-goftino-counter {
    position: absolute;
    top: -0.2rem;
    inset-inline-end: -0.15rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
    z-index: 3;
    pointer-events: none;
}

.nahamta-goftino-counter:empty {
    display: none;
}

/* Proactive message preview bubble (replaces default Goftino icon teaser) */
.nahamta-goftino-preview {
    position: fixed;
    z-index: 1065;
    max-width: min(280px, calc(100vw - 2rem));
    margin: 0;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 1rem;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.55;
    text-align: start;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    animation: nahamta-goftino-preview-in 0.28s ease;
}

.nahamta-goftino-preview[hidden] {
    display: none !important;
}

.nahamta-goftino-preview__text {
    display: block;
}

.nahamta-goftino-preview::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

[data-theme="dark"] .nahamta-goftino-preview {
    background: var(--color-bg-elevated, #1e293b);
    color: var(--color-text, #f8fafc);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .nahamta-goftino-preview::after {
    border-top-color: var(--color-bg-elevated, #1e293b);
}

@media (min-width: 768px) {
    .nahamta-goftino-preview::after {
        left: auto;
        right: 1.35rem;
        transform: none;
    }
}

@keyframes nahamta-goftino-preview-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
