.tnz-chaty-widget {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tnz-chaty-group-mode {
    position: fixed;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.tnz-chaty-group-icon {
    width: var(--tnz-chaty-size, 58px);
    height: var(--tnz-chaty-size, 58px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--channel-color, #7d5cff);
    color: var(--channel-text, #ffffff);
    font-size: 20px;
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.24);
}

.tnz-chaty-group-icon .dashicons,
.tnz-chaty-trigger-icon .dashicons,
.tnz-chaty-channel-badge .dashicons {
    width: auto;
    height: auto;
    font-size: inherit;
    line-height: inherit;
}

.tnz-chaty-group-label {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ffffff;
    color: #172033;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.tnz-chaty-label-left {
    flex-direction: row-reverse;
}

.tnz-chaty-position-bottom-right {
    right: var(--tnz-chaty-desktop-right, 24px);
    bottom: var(--tnz-chaty-desktop-bottom, 24px);
}

.tnz-chaty-position-bottom-left {
    left: var(--tnz-chaty-desktop-left, 24px);
    bottom: var(--tnz-chaty-desktop-bottom, 24px);
}

.tnz-chaty-position-top-right {
    right: var(--tnz-chaty-desktop-right, 24px);
    top: var(--tnz-chaty-desktop-top, 24px);
    flex-direction: column-reverse;
}

.tnz-chaty-position-top-left {
    left: var(--tnz-chaty-desktop-left, 24px);
    top: var(--tnz-chaty-desktop-top, 24px);
    flex-direction: column-reverse;
}

.tnz-chaty-position-right-center {
    right: var(--tnz-chaty-desktop-right, 24px);
    top: 50%;
    transform: translateY(-50%);
}

.tnz-chaty-position-left-center {
    left: var(--tnz-chaty-desktop-left, 24px);
    top: 50%;
    transform: translateY(-50%);
}

.tnz-chaty-group-button.tnz-chaty-position-bottom-right {
    right: var(--tnz-chaty-desktop-right, 24px);
    bottom: calc(var(--tnz-chaty-desktop-bottom, 24px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
}

.tnz-chaty-group-button.tnz-chaty-position-bottom-left {
    left: var(--tnz-chaty-desktop-left, 24px);
    bottom: calc(var(--tnz-chaty-desktop-bottom, 24px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
}

.tnz-chaty-group-button.tnz-chaty-position-top-right {
    right: var(--tnz-chaty-desktop-right, 24px);
    top: calc(var(--tnz-chaty-desktop-top, 24px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
}

.tnz-chaty-group-button.tnz-chaty-position-top-left {
    left: var(--tnz-chaty-desktop-left, 24px);
    top: calc(var(--tnz-chaty-desktop-top, 24px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
}

.tnz-chaty-group-button.tnz-chaty-position-right-center {
    right: var(--tnz-chaty-desktop-right, 24px);
    top: calc(50% + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)) - var(--tnz-chaty-size, 58px));
}

.tnz-chaty-group-button.tnz-chaty-position-left-center {
    left: var(--tnz-chaty-desktop-left, 24px);
    top: calc(50% + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)) - var(--tnz-chaty-size, 58px));
}

.tnz-chaty-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--tnz-chaty-size, 58px);
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--tnz-chaty-button, #7d5cff);
    color: var(--tnz-chaty-text, #ffffff);
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.24);
    cursor: pointer;
}

.tnz-chaty-shape-square .tnz-chaty-trigger,
.tnz-chaty-shape-square .tnz-chaty-panel,
.tnz-chaty-shape-square .tnz-chaty-channel-badge {
    border-radius: 18px;
}

.tnz-chaty-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: calc(var(--tnz-chaty-size, 58px) - 18px);
    height: calc(var(--tnz-chaty-size, 58px) - 18px);
    padding: 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--tnz-chaty-icon, var(--tnz-chaty-text, #ffffff));
}

.tnz-chaty-trigger-text {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.tnz-chaty-panel {
    width: min(var(--tnz-chaty-panel, 320px), calc(100vw - 28px));
    padding: 18px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.tnz-chaty-panel-header {
    margin-bottom: 16px;
}

.tnz-chaty-panel-header strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    color: #172033;
}

.tnz-chaty-panel-header p,
.tnz-chaty-empty-state {
    margin: 0;
    color: #60708a;
    line-height: 1.5;
}

.tnz-chaty-channel-list {
    display: grid;
    gap: 10px;
}

.tnz-chaty-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    background: #f8faff;
    color: #172033;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease;
}

.tnz-chaty-channel-item:hover {
    transform: translateY(-1px);
    background: #eef4ff;
}

.tnz-chaty-channel-badge {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--channel-color, #7d5cff);
    color: var(--channel-text, #ffffff);
    font-size: 11px;
    font-weight: 700;
}

.tnz-chaty-channel-label {
    font-size: 14px;
    font-weight: 600;
}

.tnz-chaty-widget[data-open="true"] .tnz-chaty-panel[hidden] {
    display: block;
}

.tnz-chaty-animation-pulse .tnz-chaty-trigger {
    animation: tnzChatyPulse 2.4s infinite;
}

.tnz-chaty-animation-bounce .tnz-chaty-trigger {
    animation: tnzChatyBounce 2.2s infinite;
}

@media (max-width: 767px) {
    .tnz-chaty-position-bottom-right {
        right: var(--tnz-chaty-mobile-right, 18px);
        bottom: var(--tnz-chaty-mobile-bottom, 18px);
    }

    .tnz-chaty-position-bottom-left {
        left: var(--tnz-chaty-mobile-left, 18px);
        bottom: var(--tnz-chaty-mobile-bottom, 18px);
    }

    .tnz-chaty-position-top-right {
        right: var(--tnz-chaty-mobile-right, 18px);
        top: var(--tnz-chaty-mobile-top, 18px);
    }

    .tnz-chaty-position-top-left {
        left: var(--tnz-chaty-mobile-left, 18px);
        top: var(--tnz-chaty-mobile-top, 18px);
    }

    .tnz-chaty-position-right-center {
        right: var(--tnz-chaty-mobile-right, 18px);
    }

    .tnz-chaty-position-left-center {
        left: var(--tnz-chaty-mobile-left, 18px);
    }

    .tnz-chaty-group-button.tnz-chaty-position-bottom-right {
        right: var(--tnz-chaty-mobile-right, 18px);
        bottom: calc(var(--tnz-chaty-mobile-bottom, 18px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
    }

    .tnz-chaty-group-button.tnz-chaty-position-bottom-left {
        left: var(--tnz-chaty-mobile-left, 18px);
        bottom: calc(var(--tnz-chaty-mobile-bottom, 18px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
    }

    .tnz-chaty-group-button.tnz-chaty-position-top-right {
        right: var(--tnz-chaty-mobile-right, 18px);
        top: calc(var(--tnz-chaty-mobile-top, 18px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
    }

    .tnz-chaty-group-button.tnz-chaty-position-top-left {
        left: var(--tnz-chaty-mobile-left, 18px);
        top: calc(var(--tnz-chaty-mobile-top, 18px) + (var(--tnz-chaty-stack, 0) * (var(--tnz-chaty-size, 58px) + 12px)));
    }

    .tnz-chaty-group-button.tnz-chaty-position-right-center {
        right: var(--tnz-chaty-mobile-right, 18px);
    }

    .tnz-chaty-group-button.tnz-chaty-position-left-center {
        left: var(--tnz-chaty-mobile-left, 18px);
    }

    .tnz-chaty-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .tnz-chaty-hide-desktop {
        display: none !important;
    }
}

@keyframes tnzChatyPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 18px 40px rgba(30, 41, 59, 0.24);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 22px 46px rgba(125, 92, 255, 0.34);
    }
}

@keyframes tnzChatyBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}
