/**
 * ChatCon - Frontend Widget Styles
 * by Zorketing
 */

.chatcon-widget-container {
    position: fixed;
    contain: layout style;
    pointer-events: none;
}

.chatcon-widget {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    will-change: transform;
    color: #ffffff;
}

.chatcon-widget:hover,
.chatcon-widget:focus {
    text-decoration: none;
    color: #ffffff;
    outline: none;
}

.chatcon-widget .chatcon-icon,
.chatcon-widget:hover .chatcon-icon {
    opacity: 1;
    visibility: visible;
}

.chatcon-size-small {
    width: 50px;
    height: 50px;
}

.chatcon-size-medium {
    width: 60px;
    height: 60px;
}

.chatcon-size-large {
    width: 70px;
    height: 70px;
}

.chatcon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55%;
    height: 55%;
}

.chatcon-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.chatcon-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 16px;
    background: #1e2329;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.chatcon-position-bottom-right .chatcon-tooltip,
.chatcon-position-top-right .chatcon-tooltip {
    right: calc(100% + 14px);
}

.chatcon-position-bottom-left .chatcon-tooltip,
.chatcon-position-top-left .chatcon-tooltip {
    left: calc(100% + 14px);
}

.chatcon-tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
}

.chatcon-position-bottom-right .chatcon-tooltip::after,
.chatcon-position-top-right .chatcon-tooltip::after {
    left: 100%;
    border-left-color: #1e2329;
}

.chatcon-position-bottom-left .chatcon-tooltip::after,
.chatcon-position-top-left .chatcon-tooltip::after {
    right: 100%;
    border-right-color: #1e2329;
}

.chatcon-widget:hover .chatcon-tooltip {
    opacity: 1;
    visibility: visible;
}

.chatcon-hover-scale:hover {
    transform: scale(1.1);
}

.chatcon-hover-glow:hover {
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chatcon-hover-bounce:hover {
    animation: chatconBounce 0.5s ease;
}

@keyframes chatconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-12px);
    }

    50% {
        transform: translateY(-6px);
    }

    75% {
        transform: translateY(-10px);
    }
}

.chatcon-animate-fade-up {
    animation: chatconFadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chatcon-animate-scale-in {
    animation: chatconScaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chatcon-animate-slide {
    animation: chatconSlide 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chatconFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes chatconScaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes chatconSlide {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

.chatcon-position-bottom-left.chatcon-animate-slide,
.chatcon-position-top-left.chatcon-animate-slide {
    animation-name: chatconSlideLeft;
}

@keyframes chatconSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

.chatcon-lazy {
    opacity: 0;
    visibility: hidden;
}

.chatcon-lazy.chatcon-loaded {
    visibility: visible;
}

@media (max-width: 768px) {
    .chatcon-size-small {
        width: 46px;
        height: 46px;
    }

    .chatcon-size-medium {
        width: 54px;
        height: 54px;
    }

    .chatcon-size-large {
        width: 62px;
        height: 62px;
    }

    .chatcon-widget::before {
        content: "";
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
    }

    .chatcon-tooltip {
        display: none;
    }
}

@media (prefers-contrast: high) {
    .chatcon-widget {
        border: 2px solid #ffffff;
    }
}

@media (prefers-reduced-motion: reduce) {

    .chatcon-widget,
    .chatcon-tooltip {
        transition: none;
        animation: none;
    }

    .chatcon-animate-fade-up,
    .chatcon-animate-scale-in,
    .chatcon-animate-slide {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .chatcon-hover-bounce:hover {
        animation: none;
    }
}

@media print {
    .chatcon-widget-container {
        display: none !important;
    }
}

.chatcon-widget:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.chatcon-pulse {
    animation: chatconPulse 2s infinite;
}

@keyframes chatconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}